Changeset 9735 for extensions/autoupdate/trunk/ajax/ignore_list.php
- Timestamp:
- Mar 16, 2011, 11:45:17 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/autoupdate/trunk/ajax/ignore_list.php
r9723 r9735 18 18 } 19 19 20 if (empty($_POST['id']) or empty($_POST['type'])) 20 if (empty($_POST['id']) or empty($_POST['type']) 21 or !in_array($_POST['type'], array('plugins', 'themes', 'languages'))) 21 22 { 22 23 die; … … 24 25 25 26 // 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']])) 27 if (!in_array($_POST['id'], $conf['AU_ignore'][$_POST['type']])) 30 28 { 31 unset($ignore[$_POST['id']]); 32 $ignore = array_flip($ignore); 29 array_push($conf['AU_ignore'][$_POST['type']], $_POST['id']); 33 30 } 34 else35 {36 $ignore = array_flip($ignore);37 array_push($ignore, $_POST['id']);38 }39 40 sort($ignore);41 $conf['AU_ignore'][$_POST['type']] = $ignore;42 31 conf_update_param('autoupdate_ignore_list', pwg_db_real_escape_string(serialize($conf['AU_ignore']))); 43 32 unset($_SESSION['extensions_need_update']);
Note: See TracChangeset
for help on using the changeset viewer.