Ignore:
Timestamp:
Mar 16, 2011, 11:45:17 PM (13 years ago)
Author:
patdenice
Message:

Remove useless function.
Update englich language key.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/autoupdate/trunk/ajax/ignore_list.php

    r9723 r9735  
    1818}
    1919
    20 if (empty($_POST['id']) or empty($_POST['type']))
     20if (empty($_POST['id']) or empty($_POST['type'])
     21  or !in_array($_POST['type'], array('plugins', 'themes', 'languages')))
    2122{
    2223  die;
     
    2425
    2526// Add or remove plugin from ignore list
    26 $ignore = $conf['AU_ignore'][$_POST['type']];
    27 $ignore = array_flip($ignore);
    28 
    29 if (isset($ignore[$_POST['id']]))
     27if (!in_array($_POST['id'], $conf['AU_ignore'][$_POST['type']]))
    3028{
    31   unset($ignore[$_POST['id']]);
    32   $ignore = array_flip($ignore);
     29  array_push($conf['AU_ignore'][$_POST['type']], $_POST['id']);
    3330}
    34 else
    35 {
    36   $ignore = array_flip($ignore);
    37   array_push($ignore, $_POST['id']);
    38 }
    39 
    40 sort($ignore);
    41 $conf['AU_ignore'][$_POST['type']] = $ignore;
    4231conf_update_param('autoupdate_ignore_list', pwg_db_real_escape_string(serialize($conf['AU_ignore'])));
    4332unset($_SESSION['extensions_need_update']);
Note: See TracChangeset for help on using the changeset viewer.