Changeset 5647 for extensions/photoWidget/admin.php
- Timestamp:
- Apr 4, 2010, 10:44:52 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/photoWidget/admin.php
r5611 r5647 30 30 31 31 if (!empty($_POST['submit'])) { 32 if (isset($_POST['pw_all_categories']) && $_POST['pw_all_categories']!=$me->pw_all_categories) { 33 $me->pw_all_categories = $_POST['pw_all_categories']; 34 array_push($GLOBALS['page']['infos'], 35 l10n('You choose that mode for').' '.l10n('all categories')); 36 $save_config = true; 37 } else { 38 if (!empty($_POST['pw_categories']) && $_POST['pw_categories']!=$me->pw_categories) { 39 $me->pw_categories = $_POST['pw_categories']; 32 if (isset($_POST['pw_all_categories'])) { 33 if ($_POST['pw_all_categories']==1) { 40 34 array_push($GLOBALS['page']['infos'], 41 l10n('You choose that mode for').' '. 42 l10n_dec('one category', 43 'severals categories', 44 count($_POST['pw_categories']))); 35 l10n('You choose that mode for').' '.l10n('all categories')); 36 $me->pw_all_categories = 1; 37 $me->pw_categories = array(); 45 38 $save_config = true; 39 } else { 40 if (isset($_POST['pw_categories'])) { 41 if (count($_POST['pw_categories'])==1 && ($_POST['pw_categories'][0]=='__none__')) { 42 array_push($GLOBALS['page']['errors'], 43 l10n('You must choose at least one category')); 44 $me->pw_categories = array(); 45 $save_config = true; 46 } else { 47 array_push($GLOBALS['page']['infos'], 48 l10n('You choose that mode for').' '. 49 l10n_dec('one category', 50 'severals categories', 51 count($_POST['pw_categories']))); 52 $me->pw_all_categories = 0; 53 $me->pw_categories = $_POST['pw_categories']; 54 $save_config = true; 55 } 56 } else { 57 array_push($GLOBALS['page']['errors'], 58 l10n('You must choose at least one category')); 59 } 46 60 } 47 61 } 48 if (!empty($_POST['pw_width']) && intval($_POST['pw_width'])!=$me->pw_width) { 62 63 if (!empty($_POST['pw_width']) && intval($_POST['pw_width'])!=$me->pw_width) { 49 64 $me->pw_width = intval($_POST['pw_width']); 50 65 array_push($GLOBALS['page']['infos'], l10n('Width has been updated'));
Note: See TracChangeset
for help on using the changeset viewer.