Changeset 875 for trunk/admin
- Timestamp:
- Sep 24, 2005, 9:05:55 PM (19 years ago)
- Location:
- trunk/admin
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/element_set_global.php
r834 r875 94 94 case 'selection' : 95 95 { 96 $collection = $_POST['selection']; 96 if (!isset($_POST['selection']) or count($_POST['selection']) == 0) 97 { 98 array_push($page['errors'], l10n('Select at least one picture')); 99 } 100 else 101 { 102 $collection = $_POST['selection']; 103 } 97 104 break; 98 105 } 99 106 } 100 107 101 if ($_POST['associate'] != 0 )108 if ($_POST['associate'] != 0 and count($collection) > 0) 102 109 { 103 110 $datas = array(); … … 126 133 } 127 134 128 if ($_POST['dissociate'] != 0 )135 if ($_POST['dissociate'] != 0 and count($collection) > 0) 129 136 { 130 137 // physical links must not be broken, so we must first retrieve image_id … … 167 174 168 175 // updating elements is useful only if needed... 169 if (count($dbfields['update']) > 0 )176 if (count($dbfields['update']) > 0 and count($collection) > 0) 170 177 { 171 178 $query = ' … … 393 400 394 401 $page['cols'] = !empty($_GET['cols']) ? intval($_GET['cols']) : 5; 395 $page['nb_images'] = !empty($_GET['display']) ? intval($_GET['display']) : 20; 402 403 // how many items to display on this page 404 if (!empty($_GET['display'])) 405 { 406 if ('all' == $_GET['display']) 407 { 408 $page['nb_images'] = count($page['cat_elements_id']); 409 } 410 else 411 { 412 $page['nb_images'] = intval($_GET['display']); 413 } 414 } 415 else 416 { 417 $page['nb_images'] = 20; 418 } 396 419 397 420 if (count($page['cat_elements_id']) > 0) -
trunk/admin/element_set_unit.php
r836 r875 158 158 // +-----------------------------------------------------------------------+ 159 159 160 $page['nb_images'] = !empty($_GET['display']) ? intval($_GET['display']) : 5; 160 // how many items to display on this page 161 if (!empty($_GET['display'])) 162 { 163 if ('all' == $_GET['display']) 164 { 165 $page['nb_images'] = count($page['cat_elements_id']); 166 } 167 else 168 { 169 $page['nb_images'] = intval($_GET['display']); 170 } 171 } 172 else 173 { 174 $page['nb_images'] = 5; 175 } 176 161 177 162 178
Note: See TracChangeset
for help on using the changeset viewer.