Changeset 408 for trunk/services
- Timestamp:
- Aug 30, 2012 5:52:29 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/services/admins.php
r405 r408 81 81 $page->setPageNumber(getFormData('page_number')); 82 82 83 // Search limiters retain their values between page requests. 84 $app->carryQuery('search_query'); 85 83 // Query parameters to retain only locally. 84 $locally_carried_queries = array( 85 'search_query', 86 ); 86 87 87 88 /******************************************************************** … … 121 122 if ($app->validBoomerangURL('admins')) { 122 123 // Display boomerang page. 123 $app->dieBoomerangURL('admins' );124 $app->dieBoomerangURL('admins', $locally_carried_queries); 124 125 } 125 126 // Display default page. 126 $app->dieURL($_SERVER['PHP_SELF'] );127 $app->dieURL($_SERVER['PHP_SELF'], $locally_carried_queries); 127 128 break; 128 129 … … 131 132 if ($app->validBoomerangURL('admins')) { 132 133 // Display boomerang page. 133 $app->dieBoomerangURL('admins' );134 $app->dieBoomerangURL('admins', $locally_carried_queries); 134 135 } 135 136 // Display default page. 136 $app->dieURL($_SERVER['PHP_SELF'] );137 $app->dieURL($_SERVER['PHP_SELF'], $locally_carried_queries); 137 138 } 138 139 validateInput(); … … 146 147 if (getFormdata('repeat', false)) { 147 148 // Display function again. 148 $app->dieURL($_SERVER['PHP_SELF'] . '?op=add' );149 $app->dieURL($_SERVER['PHP_SELF'] . '?op=add', $locally_carried_queries); 149 150 } else if ($app->validBoomerangURL('admins')) { 150 151 // Display boomerang page. 151 $app->dieBoomerangURL('admins' );152 $app->dieBoomerangURL('admins', $locally_carried_queries); 152 153 } 153 154 // Display default page. 154 $app->dieURL($_SERVER['PHP_SELF'] );155 $app->dieURL($_SERVER['PHP_SELF'], $locally_carried_queries); 155 156 } 156 157 break; … … 159 160 if (getFormdata('reset', false)) { 160 161 $app->raiseMsg(_("Saved values have been reloaded."), MSG_NOTICE, __FILE__, __LINE__); 161 $app->dieURL($_SERVER['PHP_SELF'] . '?op=edit&admin_id=' . getFormData('admin_id') );162 $app->dieURL($_SERVER['PHP_SELF'] . '?op=edit&admin_id=' . getFormData('admin_id'), $locally_carried_queries); 162 163 } 163 164 if (getFormdata('cancel', false)) { … … 167 168 if ($app->validBoomerangURL('admins')) { 168 169 // Display boomerang page. 169 $app->dieBoomerangURL('admins' );170 $app->dieBoomerangURL('admins', $locally_carried_queries); 170 171 } 171 172 // Display default page. 172 $app->dieURL($_SERVER['PHP_SELF'] );173 $app->dieURL($_SERVER['PHP_SELF'], $locally_carried_queries); 173 174 } 174 175 validateInput(); … … 184 185 $qid = $db->query("SELECT " . $auth->getParam('db_primary_key') . " FROM " . $auth->getParam('db_table') . " WHERE " . $auth->getParam('db_primary_key') . " > '" . $db->escapeString(getFormData('admin_id')) . "' ORDER BY " . $auth->getParam('db_primary_key') . " ASC LIMIT 1"); 185 186 if (list($next_id) = mysql_fetch_row($qid)) { 186 $app->dieURL($_SERVER['PHP_SELF'] . '?op=edit&admin_id=' . $next_id );187 $app->dieURL($_SERVER['PHP_SELF'] . '?op=edit&admin_id=' . $next_id, $locally_carried_queries); 187 188 } else { 188 189 $app->raiseMsg(_("Cannot edit next, the end of the list was reached"), MSG_NOTICE, __FILE__, __LINE__); … … 190 191 } else if ($app->validBoomerangURL('admins')) { 191 192 // Display boomerang page. 192 $app->dieBoomerangURL('admins' );193 $app->dieBoomerangURL('admins', $locally_carried_queries); 193 194 } 194 195 // Display default page. 195 $app->dieURL($_SERVER['PHP_SELF'] );196 $app->dieURL($_SERVER['PHP_SELF'], $locally_carried_queries); 196 197 } 197 198 break; … … 208 209 209 210 include 'header.ihtml'; 211 $app->carryQuery($locally_carried_queries); 210 212 include 'codebase/services/templates/' . $main_template; 211 213 include 'footer.ihtml'; … … 305 307 $app->logMsg('Could not find record with admin_id: ' . $id, LOG_WARNING, __FILE__, __LINE__); 306 308 $app->raiseMsg(sprintf(_("The requested record %s could not be found."), $id), MSG_ERR, __FILE__, __LINE__); 307 $app->dieBoomerangURL( );309 $app->dieBoomerangURL('admins', $locally_carried_queries); 308 310 } 309 311 … … 366 368 $app->logMsg('Could not find record with admin_id: ' . $id, LOG_WARNING, __FILE__, __LINE__); 367 369 $app->raiseMsg(sprintf(_("The requested record %s could not be found."), $id), MSG_ERR, __FILE__, __LINE__); 368 $app->dieBoomerangURL( );370 $app->dieBoomerangURL('admins', $locally_carried_queries); 369 371 } 370 372
Note: See TracChangeset
for help on using the changeset viewer.