Dotclear


Ignore:
Timestamp:
10/04/13 16:33:44 (12 years ago)
Author:
Denis Jean-Chirstian <contact@…>
Branch:
dcRepo
Message:

better this way, redir ok, noisy friday

File:
1 edited

Legend:

Unmodified
Added
Removed
  • inc/admin/lib.moduleslist.php

    r2252 r2259  
    4242     protected $page_qs = '?';                    /**< @var string    Page query string */ 
    4343     protected $page_tab = '';                    /**< @var string    Page tab */ 
     44     protected $page_redir = '';                  /**< @var string    Page redirection */ 
    4445 
    4546     public static $nav_indexes = 'abcdefghijklmnopqrstuvwxyz0123456789'; /**< @var  string    Index list */ 
     
    203204     { 
    204205          return $this->page_tab; 
     206     } 
     207 
     208     /** 
     209      * Set page redirection. 
     210      * 
     211      * @param string    $default       Default redirection 
     212      * @return     adminModulesList self instance 
     213      */ 
     214     public function setRedir($default='') 
     215     { 
     216          $this->page_redir = empty($_REQUEST['redir']) ? $default : $_REQUEST['redir']; 
     217 
     218          return $this; 
     219     } 
     220 
     221     /** 
     222      * Get page redirection. 
     223      * 
     224      * @return     Page redirection 
     225      */ 
     226     public function getRedir() 
     227     { 
     228          return empty($this->page_redir) ? $this->getURL() : $this->page_redir; 
    205229     } 
    206230     //@} 
     
    10041028               return null; 
    10051029          } 
     1030          $this->setRedir($this->getURL().'#plugins'); 
    10061031 
    10071032          ob_start(); 
     
    10361061     { 
    10371062          if ($this->config_file) { 
    1038                $redir = empty($_REQUEST['redir']) ? $this->getURL().'#plugins' : $_REQUEST['redir']; 
    10391063 
    10401064               if (!$this->config_module['standalone_config']) { 
     
    10421066                    '<form id="module_config" action="'.$this->getURL('conf=1').'" method="post" enctype="multipart/form-data">'. 
    10431067                    '<h3>'.sprintf(__('Configure plugin "%s"'), html::escapeHTML($this->config_module['name'])).'</h3>'. 
    1044                     '<p><a class="back" href="'.$redir.'">'.__('Back').'</a></p>'; 
     1068                    '<p><a class="back" href="'.$this->getRedir().'">'.__('Back').'</a></p>'; 
    10451069               } 
    10461070 
     
    10511075                    '<p class="clear"><input type="submit" name="save" value="'.__('Save').'" />'. 
    10521076                    form::hidden('module', $this->config_module['id']). 
    1053                     form::hidden('redir', $redir). 
     1077                    form::hidden('redir', $this->getRedir()). 
    10541078                    $this->core->formNonce().'</p>'. 
    10551079                    '</form>'; 
Note: See TracChangeset for help on using the changeset viewer.

Sites map