plugins/SpecialPageFuncs.php
changeset 590 03a60844c7c5
parent 588 20484deb89cd
child 593 4f9bec0d65c1
equal deleted inserted replaced
589:88d4ed0a2898 590:03a60844c7c5
    22  * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
    22  * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
    23  */
    23  */
    24  
    24  
    25 global $db, $session, $paths, $template, $plugins; // Common objects
    25 global $db, $session, $paths, $template, $plugins; // Common objects
    26 
    26 
    27 $plugins->attachHook('session_started', '
    27 $plugins->attachHook('session_started', 'SpecialPageFuncs_paths_init();');
       
    28 
       
    29 function SpecialPageFuncs_paths_init()
       
    30 {
    28   global $paths;
    31   global $paths;
    29     $paths->add_page(Array(
    32   $paths->add_page(Array(
    30       \'name\'=>\'specialpage_create_page\',
    33     'name'=>'specialpage_create_page',
    31       \'urlname\'=>\'CreatePage\',
    34     'urlname'=>'CreatePage',
    32       \'namespace\'=>\'Special\',
    35     'namespace'=>'Special',
    33       \'special\'=>0,\'visible\'=>1,\'comments_on\'=>0,\'protected\'=>1,\'delvotes\'=>0,\'delvote_ips\'=>\'\',
    36     'special'=>0,'visible'=>1,'comments_on'=>0,'protected'=>1,'delvotes'=>0,'delvote_ips'=>'',
    34       ));
    37     ));
    35     
    38   
    36     $paths->add_page(Array(
    39   $paths->add_page(Array(
    37       \'name\'=>\'specialpage_all_pages\',
    40     'name'=>'specialpage_all_pages',
    38       \'urlname\'=>\'AllPages\',
    41     'urlname'=>'AllPages',
    39       \'namespace\'=>\'Special\',
    42     'namespace'=>'Special',
    40       \'special\'=>0,\'visible\'=>1,\'comments_on\'=>0,\'protected\'=>1,\'delvotes\'=>0,\'delvote_ips\'=>\'\',
    43     'special'=>0,'visible'=>1,'comments_on'=>0,'protected'=>1,'delvotes'=>0,'delvote_ips'=>'',
    41       ));
    44     ));
    42     
    45   
    43     $paths->add_page(Array(
    46   $paths->add_page(Array(
    44       \'name\'=>\'specialpage_special_pages\',
    47     'name'=>'specialpage_special_pages',
    45       \'urlname\'=>\'SpecialPages\',
    48     'urlname'=>'SpecialPages',
    46       \'namespace\'=>\'Special\',
    49     'namespace'=>'Special',
    47       \'special\'=>0,\'visible\'=>1,\'comments_on\'=>0,\'protected\'=>1,\'delvotes\'=>0,\'delvote_ips\'=>\'\',
    50     'special'=>0,'visible'=>1,'comments_on'=>0,'protected'=>1,'delvotes'=>0,'delvote_ips'=>'',
    48       ));
    51     ));
    49     
    52   
    50     $paths->add_page(Array(
    53   $paths->add_page(Array(
    51       \'name\'=>\'specialpage_about_enano\',
    54     'name'=>'specialpage_about_enano',
    52       \'urlname\'=>\'About_Enano\',
    55     'urlname'=>'About_Enano',
    53       \'namespace\'=>\'Special\',
    56     'namespace'=>'Special',
    54       \'special\'=>0,\'visible\'=>1,\'comments_on\'=>0,\'protected\'=>1,\'delvotes\'=>0,\'delvote_ips\'=>\'\',
    57     'special'=>0,'visible'=>1,'comments_on'=>0,'protected'=>1,'delvotes'=>0,'delvote_ips'=>'',
    55       ));
    58     ));
    56     
    59   
    57     $paths->add_page(Array(
    60   $paths->add_page(Array(
    58       \'name\'=>\'specialpage_gnu_gpl\',
    61     'name'=>'specialpage_gnu_gpl',
    59       \'urlname\'=>\'GNU_General_Public_License\',
    62     'urlname'=>'GNU_General_Public_License',
    60       \'namespace\'=>\'Special\',
    63     'namespace'=>'Special',
    61       \'special\'=>0,\'visible\'=>1,\'comments_on\'=>0,\'protected\'=>1,\'delvotes\'=>0,\'delvote_ips\'=>\'\',
    64     'special'=>0,'visible'=>1,'comments_on'=>0,'protected'=>1,'delvotes'=>0,'delvote_ips'=>'',
    62       ));
    65     ));
    63     
    66   
    64     $paths->add_page(Array(
    67   $paths->add_page(Array(
    65       \'name\'=>\'specialpage_tag_cloud\',
    68     'name'=>'specialpage_tag_cloud',
    66       \'urlname\'=>\'TagCloud\',
    69     'urlname'=>'TagCloud',
    67       \'namespace\'=>\'Special\',
    70     'namespace'=>'Special',
    68       \'special\'=>0,\'visible\'=>1,\'comments_on\'=>0,\'protected\'=>1,\'delvotes\'=>0,\'delvote_ips\'=>\'\',
    71     'special'=>0,'visible'=>1,'comments_on'=>0,'protected'=>1,'delvotes'=>0,'delvote_ips'=>'',
    69       ));
    72     ));
    70     
    73   
    71     $paths->add_page(Array(
    74   $paths->add_page(Array(
    72       \'name\'=>\'specialpage_autofill\',
    75     'name'=>'specialpage_autofill',
    73       \'urlname\'=>\'Autofill\',
    76     'urlname'=>'Autofill',
    74       \'namespace\'=>\'Special\',
    77     'namespace'=>'Special',
    75       \'special\'=>0,\'visible\'=>1,\'comments_on\'=>0,\'protected\'=>1,\'delvotes\'=>0,\'delvote_ips\'=>\'\',
    78     'special'=>0,'visible'=>1,'comments_on'=>0,'protected'=>1,'delvotes'=>0,'delvote_ips'=>'',
    76       ));
    79     ));
    77     ');
    80 }
    78 
    81 
    79 // function names are IMPORTANT!!! The name pattern is: page_<namespace ID>_<page URLname, without namespace>
    82 // function names are IMPORTANT!!! The name pattern is: page_<namespace ID>_<page URLname, without namespace>
    80 
    83 
    81 function page_Special_CreatePage()
    84 function page_Special_CreatePage()
    82 {
    85 {