plugins/gallery/viewimage.php
changeset 34 5e9bd8e5c6bf
parent 33 6dc190e2158b
child 37 3afbd6374442
equal deleted inserted replaced
33:6dc190e2158b 34:5e9bd8e5c6bf
   458       }
   458       }
   459       if ( $db->numrows() < 1 )
   459       if ( $db->numrows() < 1 )
   460       {
   460       {
   461         // Image not found
   461         // Image not found
   462         $this->exists = false;
   462         $this->exists = false;
       
   463         $this->cdata = array(
       
   464             'urlname' => $this->page_id,
       
   465             'namespace' => $this->namespace,
       
   466             'name' => 'Image not found',
       
   467             'special' => 0,
       
   468             'visible' => 0,
       
   469             'comments_on' => 0,
       
   470             'protected' => 0,
       
   471             'delvotes' => 0,
       
   472             'delvote_ips' => '',
       
   473             'wiki_mode' => 0,
       
   474             'page_exists' => false,
       
   475             'page_format' => getConfig('default_page_format', 'wikitext')
       
   476           );
   463       }
   477       }
   464       else
   478       else
   465       {
   479       {
   466         $this->image_info = $db->fetchrow();
   480         $this->image_info = $db->fetchrow();
   467         $this->exists = true;
   481         $this->exists = true;
       
   482         $this->cdata = array(
       
   483             'urlname' => $this->page_id,
       
   484             'namespace' => $this->namespace,
       
   485             'name' => $this->image_info['img_title'],
       
   486             'special' => 1,
       
   487             'visible' => 1,
       
   488             'comments_on' => 1,
       
   489             'protected' => 0,
       
   490             'delvotes' => 0,
       
   491             'delvote_ips' => '',
       
   492             'wiki_mode' => 0,
       
   493             'page_exists' => true,
       
   494             'page_format' => getConfig('default_page_format', 'wikitext')
       
   495           );
   468       }
   496       }
       
   497       $this->title =& $this->cdata['name'];
       
   498       $this->cdata = Namespace_Default::bake_cdata($this->cdata);
   469       
   499       
   470       $db->free_result();
   500       $db->free_result();
   471     }
   501     }
   472   }
   502   }
   473   
   503