Added an icon to make the plugin update option somewhat more obvious HEAD
authorDirk Haun <dirk@haun-online.de>
Mon Sep 28 22:20:30 2009 +0200 (4 months ago)
branchHEAD
changeset 7394fdb273c78589
parent 7341db4c6eb6e843
child 7395bb675c876cb9
Added an icon to make the plugin update option somewhat more obvious
language/english.php
language/english_utf-8.php
public_html/admin/plugins.php
public_html/docs/english/theme.html
public_html/docs/history
public_html/layout/professional/images/update.png
system/lib-admin.php
     1.1 --- a/language/english.php	Sun Sep 27 21:26:06 2009 +0200
     1.2 +++ b/language/english.php	Mon Sep 28 22:20:30 2009 +0200
     1.3 @@ -1065,6 +1065,7 @@
     1.4      39 => 'Upload a plugin',
     1.5      40 => 'You can upload a plugin archive (.tar.gz, .tgz, .zip) directly here:',
     1.6      41 => 'Upload',
     1.7 +    42 => 'Click to update',
     1.8  
     1.9      // to match the PHP error constants,
    1.10      // http://www.php.net/manual/en/features.file-upload.errors.php
     2.1 --- a/language/english_utf-8.php	Sun Sep 27 21:26:06 2009 +0200
     2.2 +++ b/language/english_utf-8.php	Mon Sep 28 22:20:30 2009 +0200
     2.3 @@ -1065,6 +1065,7 @@
     2.4      39 => 'Upload a plugin',
     2.5      40 => 'You can upload a plugin archive (.tar.gz, .tgz, .zip) directly here:',
     2.6      41 => 'Upload',
     2.7 +    42 => 'Click to update',
     2.8  
     2.9      // to match the PHP error constants,
    2.10      // http://www.php.net/manual/en/features.file-upload.errors.php
     3.1 --- a/public_html/admin/plugins.php	Sun Sep 27 21:26:06 2009 +0200
     3.2 +++ b/public_html/admin/plugins.php	Mon Sep 28 22:20:30 2009 +0200
     3.3 @@ -1165,17 +1165,23 @@
     3.4  
     3.5  // MAIN
     3.6  $display = '';
     3.7 -if (isset($_POST['pluginenabler']) && SEC_checkToken()) {
     3.8 -    if (isset($_POST['enabledplugins'])) {
     3.9 -        changePluginStatus($_POST['enabledplugins']);
    3.10 -    } else {
    3.11 -        changePluginStatus(array());
    3.12 +if (isset($_POST['pluginenabler'])) { // JavaScript-triggered POST request
    3.13 +    if (isset($_POST['updatethisplugin'])) {
    3.14 +        // translate into a standard update request (see below)
    3.15 +        $_POST['mode'] = $LANG32[34];
    3.16 +        $_POST['pi_name'] = $_POST['updatethisplugin'];
    3.17 +    } elseif (SEC_checkToken()) {
    3.18 +        if (isset($_POST['enabledplugins'])) {
    3.19 +            changePluginStatus($_POST['enabledplugins']);
    3.20 +        } else {
    3.21 +            changePluginStatus(array());
    3.22 +        }
    3.23 +
    3.24 +        // force a refresh so that the information of the plugin that was just
    3.25 +        // enabled / disabled (menu entries, etc.) is displayed properly
    3.26 +        header('Location: ' . $_CONF['site_admin_url'] . '/plugins.php');
    3.27 +        exit;
    3.28      }
    3.29 -
    3.30 -    // force a refresh so that the information of the plugin that was just
    3.31 -    // enabled / disabled (menu entries, etc.) is displayed properly
    3.32 -    header('Location: ' . $_CONF['site_admin_url'] . '/plugins.php');
    3.33 -    exit;
    3.34  }
    3.35  
    3.36  $mode = '';
     4.1 --- a/public_html/docs/english/theme.html	Sun Sep 27 21:26:06 2009 +0200
     4.2 +++ b/public_html/docs/english/theme.html	Mon Sep 28 22:20:30 2009 +0200
     4.3 @@ -198,6 +198,9 @@
     4.4  <h2><a name="changes">Theme changes in Geeklog 1.6.1</a></h2>
     4.5  
     4.6  <ul>
     4.7 +<li>Added an icon, <tt>images/update.png</tt>, to be displayed in the admin's
     4.8 +    list of plugins when a plugin needs to be updated. The icon should have the
     4.9 +    same size as the "edit" icon (16x16 pixel in the Professional theme).</li>
    4.10  <li>Cosmetics: Fixed the position of the story preview when using the
    4.11      advanced editor (was slightly shifted to the right, <a
    4.12      href="http://project.geeklog.net/tracking/view.php?id=963">bug #0000963</a>). Changes to the <code>&lt;div id="preview"&gt;</code> in
     5.1 --- a/public_html/docs/history	Sun Sep 27 21:26:06 2009 +0200
     5.2 +++ b/public_html/docs/history	Mon Sep 28 22:20:30 2009 +0200
     5.3 @@ -3,6 +3,9 @@
     5.4  Oct ??, 2009 (1.6.1)
     5.5  ------------
     5.6  
     5.7 +- Added an icon to make the plugin update option somewhat more obvious [Dirk]
     5.8 +  (icon "stock_update-data.png" taken from Gnome 2.18 icon theme set by
     5.9 +  AMAZIGH Aneglus, released under the GPL)
    5.10  - Changing the Post Mode in Advanced Editor mode selected the wrong tab
    5.11    (bug #0000980, patch provided by dengen)
    5.12  - Made the former $cc parameter for COM_mail an optional array of additional
     6.1 Binary file public_html/layout/professional/images/update.png has changed
     7.1 --- a/system/lib-admin.php	Sun Sep 27 21:26:06 2009 +0200
     7.2 +++ b/system/lib-admin.php	Mon Sep 28 22:20:30 2009 +0200
     7.3 @@ -1064,7 +1064,17 @@
     7.4              } else {
     7.5                  $retval = "{$LANG32[37]}: $pi_installed_version,&nbsp;{$LANG32[36]}: $plugin_code_version";
     7.6                  if ($A['pi_enabled'] == 1) {
     7.7 -                    $retval .= " <b>{$LANG32[38]}</b>";
     7.8 +                    $retval .= " <b>{$LANG32[38]}</b>"
     7.9 +                        . ' <input type="image" src="' . $_CONF['layout_url']
    7.10 +                        . '/images/update.png" alt="[' . $LANG32[38]
    7.11 +                        . ']" name="updatethisplugin" value="' . $A['pi_name']
    7.12 +                        . '" onclick="submit()" title="' . $LANG32[42] . '"'
    7.13 +                        . XHTML . '>';
    7.14 +                    if (! isset($added_token)) {
    7.15 +                        $retval .= '<input type="hidden" name="' . CSRF_TOKEN
    7.16 +                                . '" ' . 'value="' . $token . '"' . XHTML . '>';
    7.17 +                        $added_token = true;
    7.18 +                    }
    7.19                  }
    7.20              }
    7.21              break;