21         $this->_aViewData[
"edit"] = $oArticle = 
oxNew( 
"oxarticle");
 
   24         if ( $soxId != 
"-1" && isset( $soxId ) ) {
 
   26             $oArticle->load( $soxId);
 
   30             if ( $oArticle->oxarticles__oxparentid->value) {
 
   31                 $oParentArticle = 
oxNew( 
"oxarticle");
 
   32                 $oParentArticle->load( $oArticle->oxarticles__oxparentid->value);
 
   33                 $this->_aViewData[
"parentarticle"] =  $oParentArticle;
 
   34                 $this->_aViewData[
"oxparentid"] =  $oArticle->oxarticles__oxparentid->value;
 
   38         $this->_aViewData[
"iPicCount"] =  $this->
getConfig()->getConfigParam( 
'iPicCount' );
 
   40         return "article_pictures.tpl";
 
   54             $oEx = 
oxNew( 
"oxExceptionToDisplay" );
 
   55             $oEx->setMessage( 
'ARTICLE_PICTURES_UPLOADISDISABLED' );
 
   63         $oArticle = 
oxNew( 
"oxarticle");
 
   64         if ( $oArticle->load( $this->getEditObjectId() ) ) {
 
   70                 $oEx = 
oxNew( 
"oxExceptionToDisplay" );
 
   71                 $oEx->setMessage( 
'NO_PICTURES_CHANGES' );
 
   92             $oEx = 
oxNew( 
"oxExceptionToDisplay" );
 
   93             $oEx->setMessage( 
'ARTICLE_PICTURES_UPLOADISDISABLED' );
 
  102         $oArticle = 
oxNew( 
"oxarticle" );
 
  103         $oArticle->load( $sOxId );
 
  105         if ( $iIndex == 
"ICO" ) {
 
  108         } elseif ( $iIndex == 
"TH" ) {
 
  112             $iIndex = (int) $iIndex;
 
  134         if ( $oArticle->{
"oxarticles__oxpic".$iIndex}->value ) {
 
  136             if ( !$oArticle->isDerived() ) {
 
  138                 $oPicHandler->deleteArticleMasterPicture( $oArticle, $iIndex, $blDeleteMaster );
 
  141             if ( $blDeleteMaster ) {
 
  143                 $oArticle->{
"oxarticles__oxpic".$iIndex} = 
new oxField();
 
  147             if ( isset( $oArticle->{
"oxarticles__oxzoom".$iIndex} ) ) {
 
  148                 $oArticle->{
"oxarticles__oxzoom".$iIndex} = 
new oxField();
 
  151             if ( $iIndex == 1 ) {
 
  152                 $this->_cleanupCustomFields( $oArticle );
 
  164     protected function _deleteMainIcon( $oArticle )
 
  166         if ( $oArticle->oxarticles__oxicon->value ) {
 
  168             if ( !$oArticle->isDerived() ) {
 
  170                 $oPicHandler->deleteMainIcon( $oArticle );
 
  174             $oArticle->oxarticles__oxicon = 
new oxField();
 
  185     protected function _deleteThumbnail( $oArticle )
 
  187         if ( $oArticle->oxarticles__oxthumb->value ) {
 
  189             if ( !$oArticle->isDerived() ) {
 
  191                 $oPicHandler->deleteThumbnail( $oArticle );
 
  195             $oArticle->oxarticles__oxthumb = 
new oxField();
 
  207     protected function _cleanupCustomFields( $oArticle )
 
  211         $sIcon  = $oArticle->oxarticles__oxicon->value;
 
  212         $sThumb = $oArticle->oxarticles__oxthumb->value;
 
  214         if ( $sIcon == 
"nopic.jpg" ) {
 
  215             $oArticle->oxarticles__oxicon = 
new oxField();
 
  218         if ( $sThumb == 
"nopic.jpg" ) {
 
  219             $oArticle->oxarticles__oxthumb = 
new oxField();