22 $this->_aViewData[
"edit"] = $oArticle =
oxNew(
"oxarticle");
25 if ($soxId !=
"-1" && isset($soxId)) {
27 $oArticle->load($soxId);
31 if ($oArticle->oxarticles__oxparentid->value) {
32 $oParentArticle =
oxNew(
"oxarticle");
33 $oParentArticle->load($oArticle->oxarticles__oxparentid->value);
34 $this->_aViewData[
"parentarticle"] = $oParentArticle;
35 $this->_aViewData[
"oxparentid"] = $oArticle->oxarticles__oxparentid->value;
39 $this->_aViewData[
"iPicCount"] = $this->
getConfig()->getConfigParam(
'iPicCount');
41 return "article_pictures.tpl";
55 $oEx =
oxNew(
"oxExceptionToDisplay");
56 $oEx->setMessage(
'ARTICLE_PICTURES_UPLOADISDISABLED');
64 $oArticle =
oxNew(
"oxarticle");
65 if ($oArticle->load($this->getEditObjectId())) {
71 $oEx =
oxNew(
"oxExceptionToDisplay");
72 $oEx->setMessage(
'NO_PICTURES_CHANGES');
93 $oEx =
oxNew(
"oxExceptionToDisplay");
94 $oEx->setMessage(
'ARTICLE_PICTURES_UPLOADISDISABLED');
103 $oArticle =
oxNew(
"oxarticle");
104 $oArticle->load($sOxId);
106 if ($iIndex ==
"ICO") {
109 } elseif ($iIndex ==
"TH") {
113 $iIndex = (int) $iIndex;
135 if ($oArticle->{
"oxarticles__oxpic" . $iIndex}->value) {
137 if (!$oArticle->isDerived()) {
139 $oPicHandler->deleteArticleMasterPicture($oArticle, $iIndex, $blDeleteMaster);
142 if ($blDeleteMaster) {
144 $oArticle->{
"oxarticles__oxpic" . $iIndex} =
new oxField();
148 if (isset($oArticle->{
"oxarticles__oxzoom" . $iIndex})) {
149 $oArticle->{
"oxarticles__oxzoom" . $iIndex} =
new oxField();
153 $this->_cleanupCustomFields($oArticle);
165 protected function _deleteMainIcon($oArticle)
167 if ($oArticle->oxarticles__oxicon->value) {
169 if (!$oArticle->isDerived()) {
171 $oPicHandler->deleteMainIcon($oArticle);
175 $oArticle->oxarticles__oxicon =
new oxField();
186 protected function _deleteThumbnail($oArticle)
188 if ($oArticle->oxarticles__oxthumb->value) {
190 if (!$oArticle->isDerived()) {
192 $oPicHandler->deleteThumbnail($oArticle);
196 $oArticle->oxarticles__oxthumb =
new oxField();
206 protected function _cleanupCustomFields($oArticle)
210 $sIcon = $oArticle->oxarticles__oxicon->value;
211 $sThumb = $oArticle->oxarticles__oxthumb->value;
213 if ($sIcon ==
"nopic.jpg") {
214 $oArticle->oxarticles__oxicon =
new oxField();
217 if ($sThumb ==
"nopic.jpg") {
218 $oArticle->oxarticles__oxthumb =
new oxField();