includes/namespaces/special.php
changeset 1278 9a4b0c3056ac
parent 1227 bdac73ed481e
child 1286 14be93201c10
equal deleted inserted replaced
1277:4264ace0855f 1278:9a4b0c3056ac
    29 	public function build_cdata()
    29 	public function build_cdata()
    30 	{
    30 	{
    31 		global $db, $session, $paths, $template, $plugins; // Common objects
    31 		global $db, $session, $paths, $template, $plugins; // Common objects
    32 		global $lang;
    32 		global $lang;
    33 		
    33 		
    34 		$this->exists = function_exists("page_{$this->namespace}_{$this->page_id}");
    34 		if ( strstr($this->page_id, '/') )
       
    35 			list($base_page_id) = explode('/', $this->page_id);
       
    36 		else
       
    37 			$base_page_id = $this->page_id;
       
    38 		$this->exists = function_exists("page_{$this->namespace}_{$base_page_id}");
    35 		
    39 		
    36 		if ( isset($paths->pages[ $paths->get_pathskey($this->page_id, $this->namespace) ]) )
    40 		if ( isset($paths->pages[ $paths->get_pathskey($this->page_id, $this->namespace) ]) )
    37 		{
    41 		{
    38 			$page_name = $paths->pages[ $paths->get_pathskey($this->page_id, $this->namespace) ]['name'];
    42 			$page_name = $paths->pages[ $paths->get_pathskey($this->page_id, $this->namespace) ]['name'];
    39 		}
    43 		}
    55 				'comments_on' => 0,
    59 				'comments_on' => 0,
    56 				'protected' => 0,
    60 				'protected' => 0,
    57 				'delvotes' => 0,
    61 				'delvotes' => 0,
    58 				'delvote_ips' => '',
    62 				'delvote_ips' => '',
    59 				'wiki_mode' => 2,
    63 				'wiki_mode' => 2,
    60 				'page_exists' => false,
    64 				'page_exists' => $this->exists,
    61 				'page_format' => getConfig('default_page_format', 'wikitext')
    65 				'page_format' => getConfig('default_page_format', 'wikitext')
    62 			);
    66 			);
    63 		$this->cdata = Namespace_Default::bake_cdata($this->cdata);
    67 		$this->cdata = Namespace_Default::bake_cdata($this->cdata);
    64 		
    68 		
    65 		$this->title =& $this->cdata['name'];
    69 		$this->title =& $this->cdata['name'];