Changeset 8765


Ignore:
Timestamp:
01/19/11 15:59:49 (9 years ago)
Author:
plg
Message:

feature 1289 updated: add pwg_token on the delete_orphan_tags maintenance action
(and all other maintenace actions as well)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/maintenance.php

    r8762 r8765  
    3232// | Check Access and exit when user status is not ok                      | 
    3333// +-----------------------------------------------------------------------+ 
     34 
    3435check_status(ACCESS_ADMINISTRATOR); 
     36 
     37if (isset($_GET['action'])) 
     38{ 
     39  check_pwg_token(); 
     40} 
    3541 
    3642// +-----------------------------------------------------------------------+ 
     
    133139$template->set_filenames(array('maintenance'=>'maintenance.tpl')); 
    134140 
    135 $start_url = get_root_url().'admin.php?page=maintenance&action='; 
     141$url_format = get_root_url().'admin.php?page=maintenance&action=%s&pwg_token='.get_pwg_token(); 
    136142 
    137143$template->assign( 
    138144  array( 
    139     'U_MAINT_CATEGORIES' => $start_url.'categories', 
    140     'U_MAINT_IMAGES' => $start_url.'images', 
    141     'U_MAINT_ORPHAN_TAGS' => $start_url.'delete_orphan_tags', 
    142     'U_MAINT_HISTORY_DETAIL' => $start_url.'history_detail', 
    143     'U_MAINT_HISTORY_SUMMARY' => $start_url.'history_summary', 
    144     'U_MAINT_SESSIONS' => $start_url.'sessions', 
    145     'U_MAINT_FEEDS' => $start_url.'feeds', 
    146     'U_MAINT_DATABASE' => $start_url.'database', 
    147     'U_MAINT_C13Y' => $start_url.'c13y', 
    148     'U_MAINT_SEARCH' => $start_url.'search', 
    149     'U_MAINT_COMPILED_TEMPLATES' => $start_url.'compiled-templates', 
     145    'U_MAINT_CATEGORIES' => sprintf($url_format, 'categories'), 
     146    'U_MAINT_IMAGES' => sprintf($url_format, 'images'), 
     147    'U_MAINT_ORPHAN_TAGS' => sprintf($url_format, 'delete_orphan_tags'), 
     148    'U_MAINT_HISTORY_DETAIL' => sprintf($url_format, 'history_detail'), 
     149    'U_MAINT_HISTORY_SUMMARY' => sprintf($url_format, 'history_summary'), 
     150    'U_MAINT_SESSIONS' => sprintf($url_format, 'sessions'), 
     151    'U_MAINT_FEEDS' => sprintf($url_format, 'feeds'), 
     152    'U_MAINT_DATABASE' => sprintf($url_format, 'database'), 
     153    'U_MAINT_C13Y' => sprintf($url_format, 'c13y'), 
     154    'U_MAINT_SEARCH' => sprintf($url_format, 'search'), 
     155    'U_MAINT_COMPILED_TEMPLATES' => sprintf($url_format, 'compiled-templates'), 
    150156    'U_HELP' => get_root_url().'admin/popuphelp.php?page=maintenance', 
    151157    ) 
Note: See TracChangeset for help on using the changeset viewer.