diff options
Diffstat (limited to '')
-rw-r--r-- | admin/themes/default/template/updates_ext.tpl | 7 | ||||
-rw-r--r-- | admin/updates_ext.php | 11 | ||||
-rw-r--r-- | include/ws_functions.inc.php | 17 |
3 files changed, 24 insertions, 11 deletions
diff --git a/admin/themes/default/template/updates_ext.tpl b/admin/themes/default/template/updates_ext.tpl index a4f52f10b..84795571d 100644 --- a/admin/themes/default/template/updates_ext.tpl +++ b/admin/themes/default/template/updates_ext.tpl @@ -4,7 +4,7 @@ {footer_script require='jquery.effects.blind,jquery.ajaxmanager,jquery.jgrowl'} var pwg_token = '{$PWG_TOKEN}'; -var extList = new Array(); +var extType = '{$EXT_TYPE}'; var confirmMsg = '{'Are you sure?'|@translate|@escape:'javascript'}'; var errorHead = '{'ERROR'|@translate|@escape:'javascript'}'; var successHead = '{'Update Complete'|@translate|@escape:'javascript'}'; @@ -41,7 +41,7 @@ function resetIgnored() { type: 'GET', url: 'ws.php', dataType: 'json', - data: { method: 'pwg.extensions.ignoreUpdate', reset: true, pwg_token: pwg_token, format: 'json' }, + data: { method: 'pwg.extensions.ignoreUpdate', reset: true, type: extType, pwg_token: pwg_token, format: 'json' }, success: function(data) { if (data['stat'] == 'ok') { jQuery(".pluginBox, fieldset").show(); @@ -144,7 +144,6 @@ checkFieldsets(); </div> <div class="autoupdate_bar"> -<br> <input type="submit" id="update_all" value="{'Update All'|@translate}" onClick="updateAll(); return false;"> <input type="submit" id="ignore_all" value="{'Ignore All'|@translate}" onClick="ignoreAll(); return false;"> <input type="submit" id="reset_ignore" value="{'Reset ignored updates'|@translate}" onClick="resetIgnored(); return false;" {if !$SHOW_RESET}style="display:none;"{/if}> @@ -153,7 +152,7 @@ checkFieldsets(); {'Please wait...'|@translate}<br><img src="admin/themes/default/images/ajax-loader-bar.gif"> </div> -<p id="up_to_date" style="display:none; text-align:left; margin-left:20px;">{'All extensions are up to date.'|@translate}</p> +<p id="up_to_date" style="display:none; text-align:left; margin-left:20px;">{'All %s are up to date.'|@sprintf:$EXT_TYPE|@translate}</p> {if not empty($update_plugins)} <div> diff --git a/admin/updates_ext.php b/admin/updates_ext.php index 4ce47b83f..fcbd729ca 100644 --- a/admin/updates_ext.php +++ b/admin/updates_ext.php @@ -27,8 +27,9 @@ if( !defined("PHPWG_ROOT_PATH") ) $conf['updates_ignored'] = unserialize($conf['updates_ignored']);
include_once(PHPWG_ROOT_PATH.'admin/include/updates.class.php');
-$autoupdate = new updates();
+$autoupdate = new updates($page['page']);
+$show_reset = false;
if (!$autoupdate->get_server_extensions())
{
array_push($page['errors'], l10n('Can\'t connect to server.'));
@@ -76,10 +77,16 @@ foreach ($autoupdate->types as $type) );
}
}
+
+ if (!empty($conf['updates_ignored'][$type]))
+ {
+ $show_reset = true;
+ }
}
-$template->assign('SHOW_RESET', (!empty($conf['updates_ignored']['plugins']) or !empty($conf['updates_ignored']['themes']) or !empty($conf['updates_ignored']['languages'])));
+$template->assign('SHOW_RESET', $show_reset);
$template->assign('PWG_TOKEN', get_pwg_token());
+$template->assign('EXT_TYPE', $page['page'] == 'updates' ? 'extensions' : $page['page']);
$template->set_filename('plugin_admin_content', 'updates_ext.tpl');
$template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content');
diff --git a/include/ws_functions.inc.php b/include/ws_functions.inc.php index 4f302a427..c706c7f75 100644 --- a/include/ws_functions.inc.php +++ b/include/ws_functions.inc.php @@ -2873,11 +2873,18 @@ function ws_extensions_ignoreupdate($params, &$service) // Reset ignored extension if ($params['reset']) { - $conf['updates_ignored'] = array( - 'plugins'=>array(), - 'themes'=>array(), - 'languages'=>array() - ); + if (!empty($params['type']) and isset($conf['updates_ignored'][$params['type']])) + { + $conf['updates_ignored'][$params['type']] = array(); + } + else + { + $conf['updates_ignored'] = array( + 'plugins'=>array(), + 'themes'=>array(), + 'languages'=>array() + ); + } conf_update_param('updates_ignored', pwg_db_real_escape_string(serialize($conf['updates_ignored']))); unset($_SESSION['extensions_need_update']); return true; |