includes/paths.php
changeset 960 e74741b8360b
parent 953 323c4cd1aa37
child 974 6bfe9eb428e9
equal deleted inserted replaced
959:68a91587271a 960:e74741b8360b
  1113     
  1113     
  1114   }
  1114   }
  1115   
  1115   
  1116 }
  1116 }
  1117 
  1117 
       
  1118 /**
       
  1119  * Register a special page.
       
  1120  * @param string urlname of the page ("Administration" in "Special:Administration")
       
  1121  * @param string Page title; if in the right format, will be treated as a l10n string identifier
       
  1122  * @param bool If true, page is visible (shown in lists/search). Otherwise, hidden. Defaults to true.
       
  1123  */
       
  1124 
       
  1125 function register_special_page($urlname, $name, $visible = true)
       
  1126 {
       
  1127   global $paths;
       
  1128   
       
  1129   return $paths->add_page(Array(
       
  1130       'name' => $name,
       
  1131       'urlname' => $urlname,
       
  1132       'namespace' => 'Special',
       
  1133       'special' => 0,
       
  1134       'visible' => $visible ? 1 : 0,
       
  1135       'comments_on' => 0,
       
  1136       'protected' => 1,
       
  1137       'delvotes' => 0,
       
  1138       'delvote_ips' => '',
       
  1139     ));
       
  1140 }
       
  1141 
  1118 ?>
  1142 ?>