Dotclear

Changeset 3812:bc19aeafa1c2


Ignore:
Timestamp:
08/17/18 11:08:51 (7 years ago)
Author:
franck <carnet.franck.paul@…>
Branch:
default
Message:

Allows superadmin to force check update of plugins/themes

Files:
5 edited

Legend:

Unmodified
Added
Removed
  • admin/blog_theme.php

    r3731 r3812  
    2020    $core->themes, 
    2121    $core->blog->themes_path, 
    22     $core->blog->settings->system->store_theme_url 
     22    $core->blog->settings->system->store_theme_url, 
     23    !empty($_GET['nocache']) 
    2324); 
    2425adminThemesList::$distributed_modules = explode(',', DC_DISTRIB_THEMES); 
     
    105106# -- Display modules lists -- 
    106107if ($core->auth->isSuperAdmin()) { 
     108 
     109    if (!$core->error->flag()) { 
     110        if (!empty($_GET['nocache'])) { 
     111            dcPage::success(__('Manual checking of themes update done successfully.')); 
     112        } 
     113    } 
    107114 
    108115    # Updated modules from repo 
     
    134141 
    135142            '</div>'; 
     143    } else { 
     144        echo 
     145        '<form action="' . $list->getURL('', false) . '" method="get">' . 
     146        '<p><input type="hidden" name="nocache" value="1" />' . 
     147        '<input type="submit" value="' . __('Force checking update of themes') . '" /></p>' . 
     148            '</form>'; 
    136149    } 
    137150} 
  • admin/plugins.php

    r3731 r3812  
    1616    $core->plugins, 
    1717    DC_PLUGINS_ROOT, 
    18     $core->blog->settings->system->store_plugin_url 
     18    $core->blog->settings->system->store_plugin_url, 
     19    !empty($_GET['nocache']) 
    1920); 
    2021 
     
    115116# -- Display modules lists -- 
    116117if ($core->auth->isSuperAdmin()) { 
     118 
     119    if (!$core->error->flag()) { 
     120        if (!empty($_GET['nocache'])) { 
     121            dcPage::success(__('Manual checking of plugins update done successfully.')); 
     122        } 
     123    } 
    117124 
    118125    # Updated modules from repo 
     
    144151 
    145152            '</div>'; 
     153    } else { 
     154        echo 
     155        '<form action="' . $list->getURL('', false) . '" method="get">' . 
     156        '<p><input type="hidden" name="nocache" value="1" />' . 
     157        '<input type="submit" value="' . __('Force checking update of plugins') . '" /></p>' . 
     158            '</form>'; 
    146159    } 
    147160} 
  • inc/admin/lib.moduleslist.php

    r3775 r3812  
    5454     * 
    5555     * @param    object    $modules        dcModules instance 
    56      * @param    string    $modules_root    Modules root directories 
     56     * @param    string    $modules_root   Modules root directories 
    5757     * @param    string    $xml_url        URL of modules feed from repository 
    58      */ 
    59     public function __construct(dcModules $modules, $modules_root, $xml_url) 
     58     * @param    boolean   $force          Force query repository 
     59     */ 
     60    public function __construct(dcModules $modules, $modules_root, $xml_url, $force = false) 
    6061    { 
    6162        $this->core    = $modules->core; 
    6263        $this->modules = $modules; 
    63         $this->store   = new dcStore($modules, $xml_url); 
     64        $this->store   = new dcStore($modules, $xml_url, $force); 
    6465 
    6566        $this->page_url = $this->core->adminurl->get('admin.plugins'); 
     
    14681469     * 
    14691470     * @param    object    $modules        dcModules instance 
    1470      * @param    string    $modules_root    Modules root directories 
     1471     * @param    string    $modules_root   Modules root directories 
    14711472     * @param    string    $xml_url        URL of modules feed from repository 
    1472      */ 
    1473     public function __construct(dcModules $modules, $modules_root, $xml_url) 
    1474     { 
    1475         parent::__construct($modules, $modules_root, $xml_url); 
     1473     * @param    boolean   $force          Force query repository 
     1474     */ 
     1475    public function __construct(dcModules $modules, $modules_root, $xml_url, $force = false) 
     1476    { 
     1477        parent::__construct($modules, $modules_root, $xml_url, $force); 
    14761478        $this->page_url = $this->core->adminurl->get('admin.blog.theme'); 
    14771479    } 
  • inc/core/class.dc.store.php

    r3731 r3812  
    3838     * @param    object    $modules        dcModules instance 
    3939     * @param    string    $xml_url        XML feed URL 
    40      */ 
    41     public function __construct(dcModules $modules, $xml_url) 
     40     * @param    boolean   $force          Force query repository 
     41     */ 
     42    public function __construct(dcModules $modules, $xml_url, $force = false) 
    4243    { 
    4344        $this->core       = $modules->core; 
     
    4647        $this->user_agent = sprintf('Dotclear/%s)', DC_VERSION); 
    4748 
    48         $this->check(); 
     49        $this->check($force); 
    4950    } 
    5051 
  • locales/fr/main.po

    r3795 r3812  
    591591msgstr "Mettre à jour les thèmes" 
    592592 
     593msgid "Manual checking of themes update done successfully." 
     594msgstr "La vérification manuelle de mise à jour des thèmes a été effectuée." 
     595 
     596msgid "Force checking update of themes" 
     597msgstr "Forcer la vérification de mise à jour des thèmes" 
     598 
    593599#, php-format 
    594600msgid "There is one theme to update available from repository." 
     
    17821788msgstr "Mise à jour des plugins" 
    17831789 
     1790msgid "Manual checking of plugins update done successfully." 
     1791msgstr "La vérification manuelle de mise à jour des plugins a été effectuée." 
     1792 
     1793msgid "Force checking update of plugins" 
     1794msgstr "Forcer la vérification de mise à jour des plugins" 
     1795 
    17841796#, php-format 
    17851797msgid "There is one plugin to update available from repository." 
Note: See TracChangeset for help on using the changeset viewer.

Sites map