Changeset 10596


Ignore:
Timestamp:
Apr 23, 2011, 3:32:08 PM (14 years ago)
Author:
patdenice
Message:

Only reset one type of extension.

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/themes/default/template/updates_ext.tpl

    r10538 r10596  
    55{footer_script require='jquery.effects.blind,jquery.ajaxmanager,jquery.jgrowl'}
    66var pwg_token = '{$PWG_TOKEN}';
    7 var extList = new Array();
     7var extType = '{$EXT_TYPE}';
    88var confirmMsg  = '{'Are you sure?'|@translate|@escape:'javascript'}';
    99var errorHead   = '{'ERROR'|@translate|@escape:'javascript'}';
     
    4242    url: 'ws.php',
    4343    dataType: 'json',
    44     data: { method: 'pwg.extensions.ignoreUpdate', reset: true, pwg_token: pwg_token, format: 'json' },
     44    data: { method: 'pwg.extensions.ignoreUpdate', reset: true, type: extType, pwg_token: pwg_token, format: 'json' },
    4545    success: function(data) {
    4646      if (data['stat'] == 'ok') {
     
    145145
    146146<div class="autoupdate_bar">
    147 <br>
    148147<input type="submit" id="update_all" value="{'Update All'|@translate}" onClick="updateAll(); return false;">
    149148<input type="submit" id="ignore_all" value="{'Ignore All'|@translate}" onClick="ignoreAll(); return false;">
     
    154153</div>
    155154
    156 <p id="up_to_date" style="display:none; text-align:left; margin-left:20px;">{'All extensions are up to date.'|@translate}</p>
     155<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>
    157156
    158157{if not empty($update_plugins)}
  • trunk/admin/updates_ext.php

    r10511 r10596  
    2828
    2929include_once(PHPWG_ROOT_PATH.'admin/include/updates.class.php');
    30 $autoupdate = new updates();
     30$autoupdate = new updates($page['page']);
    3131
     32$show_reset = false;
    3233if (!$autoupdate->get_server_extensions())
    3334{
     
    7778    }
    7879  }
     80
     81  if (!empty($conf['updates_ignored'][$type]))
     82  {
     83    $show_reset = true;
     84  }
    7985}
    8086
    81 $template->assign('SHOW_RESET', (!empty($conf['updates_ignored']['plugins']) or !empty($conf['updates_ignored']['themes']) or !empty($conf['updates_ignored']['languages'])));
     87$template->assign('SHOW_RESET', $show_reset);
    8288$template->assign('PWG_TOKEN', get_pwg_token());
     89$template->assign('EXT_TYPE', $page['page'] == 'updates' ? 'extensions' : $page['page']);
    8390$template->set_filename('plugin_admin_content', 'updates_ext.tpl');
    8491$template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content');
  • trunk/include/ws_functions.inc.php

    r10563 r10596  
    28742874  if ($params['reset'])
    28752875  {
    2876     $conf['updates_ignored'] = array(
    2877       'plugins'=>array(),
    2878       'themes'=>array(),
    2879       'languages'=>array()
    2880     );
     2876    if (!empty($params['type']) and isset($conf['updates_ignored'][$params['type']]))
     2877    {
     2878      $conf['updates_ignored'][$params['type']] = array();
     2879    }
     2880    else
     2881    {
     2882      $conf['updates_ignored'] = array(
     2883        'plugins'=>array(),
     2884        'themes'=>array(),
     2885        'languages'=>array()
     2886      );
     2887    }
    28812888    conf_update_param('updates_ignored', pwg_db_real_escape_string(serialize($conf['updates_ignored'])));
    28822889    unset($_SESSION['extensions_need_update']);
Note: See TracChangeset for help on using the changeset viewer.