plugins/SpecialSearch.php
changeset 590 03a60844c7c5
parent 564 a1c450a911a6
child 592 27377179fe58
equal deleted inserted replaced
589:88d4ed0a2898 590:03a60844c7c5
    20  *
    20  *
    21  * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
    21  * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
    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 $plugins->attachHook('session_started', '
    25 $plugins->attachHook('session_started', 'SpecialSearch_paths_init();');
       
    26 
       
    27 function SpecialSearch_paths_init()
       
    28 {
    26   global $paths;
    29   global $paths;
    27     $paths->add_page(Array(
    30   $paths->add_page(Array(
    28       \'name\'=>\'specialpage_search_rebuild\',
    31     'name'=>'specialpage_search_rebuild',
    29       \'urlname\'=>\'SearchRebuild\',
    32     'urlname'=>'SearchRebuild',
    30       \'namespace\'=>\'Special\',
    33     'namespace'=>'Special',
    31       \'special\'=>0,\'visible\'=>1,\'comments_on\'=>0,\'protected\'=>1,\'delvotes\'=>0,\'delvote_ips\'=>\'\',
    34     'special'=>0,'visible'=>1,'comments_on'=>0,'protected'=>1,'delvotes'=>0,'delvote_ips'=>'',
    32       ));
    35     ));
    33     
    36   
    34     $paths->add_page(Array(
    37   $paths->add_page(Array(
    35       \'name\'=>\'specialpage_search\',
    38     'name'=>'specialpage_search',
    36       \'urlname\'=>\'Search\',
    39     'urlname'=>'Search',
    37       \'namespace\'=>\'Special\',
    40     'namespace'=>'Special',
    38       \'special\'=>0,\'visible\'=>1,\'comments_on\'=>0,\'protected\'=>1,\'delvotes\'=>0,\'delvote_ips\'=>\'\',
    41     'special'=>0,'visible'=>1,'comments_on'=>0,'protected'=>1,'delvotes'=>0,'delvote_ips'=>'',
    39       ));
    42     ));
    40     ');
    43 }
    41 
    44 
    42 function page_Special_SearchRebuild()
    45 function page_Special_SearchRebuild()
    43 {
    46 {
    44   global $db, $session, $paths, $template, $plugins; // Common objects
    47   global $db, $session, $paths, $template, $plugins; // Common objects
    45   if ( !$session->get_permissions('mod_misc') )
    48   if ( !$session->get_permissions('mod_misc') )