- Timestamp:
- Aug 30, 2012 5:52:29 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bin/module_maker/skel/admin.php
r405 r408 67 67 $page->setPageNumber(getFormData('page_number')); 68 68 69 // Search limiters retain their values between page requests. 70 $app->carryQuery('search_query'); 71 $app->carryQuery('filter___///__'); 69 // Query parameters to retain always. 70 $app->carryQuery(array( 71 'filter___///__', 72 )); 73 74 // Query parameters to retain only locally. 75 $locally_carried_queries = array( 76 'search_query', 77 ); 72 78 %ADMIN_UPLOAD_CONFIG% 73 79 /******************************************************************** … … 107 113 if ($app->validBoomerangURL('%NAME_PLURAL%')) { 108 114 // Display boomerang page. 109 $app->dieBoomerangURL('%NAME_PLURAL%' );115 $app->dieBoomerangURL('%NAME_PLURAL%', $locally_carried_queries); 110 116 } 111 117 // Display default page. 112 $app->dieURL($_SERVER['PHP_SELF'] );118 $app->dieURL($_SERVER['PHP_SELF'], $locally_carried_queries); 113 119 break; 114 120 … … 117 123 if ($app->validBoomerangURL('%NAME_PLURAL%')) { 118 124 // Display boomerang page. 119 $app->dieBoomerangURL('%NAME_PLURAL%' );125 $app->dieBoomerangURL('%NAME_PLURAL%', $locally_carried_queries); 120 126 } 121 127 // Display default page. 122 $app->dieURL($_SERVER['PHP_SELF'] );128 $app->dieURL($_SERVER['PHP_SELF'], $locally_carried_queries); 123 129 } 124 130 validateInput(); … … 132 138 if (getFormdata('repeat', false)) { 133 139 // Display function again. 134 $app->dieURL($_SERVER['PHP_SELF'] . '?op=add' );140 $app->dieURL($_SERVER['PHP_SELF'] . '?op=add', $locally_carried_queries); 135 141 } else if ($app->validBoomerangURL('%NAME_PLURAL%')) { 136 142 // Display boomerang page. 137 $app->dieBoomerangURL('%NAME_PLURAL%' );143 $app->dieBoomerangURL('%NAME_PLURAL%', $locally_carried_queries); 138 144 } 139 145 // Display default page. 140 $app->dieURL($_SERVER['PHP_SELF'] );146 $app->dieURL($_SERVER['PHP_SELF'], $locally_carried_queries); 141 147 } 142 148 break; … … 145 151 if (getFormdata('reset', false)) { 146 152 $app->raiseMsg(_("Saved values have been reloaded."), MSG_NOTICE, __FILE__, __LINE__); 147 $app->dieURL($_SERVER['PHP_SELF'] . '?op=edit&%PRIMARY_KEY%=' . getFormData('%PRIMARY_KEY%') );153 $app->dieURL($_SERVER['PHP_SELF'] . '?op=edit&%PRIMARY_KEY%=' . getFormData('%PRIMARY_KEY%'), $locally_carried_queries); 148 154 } 149 155 if (getFormdata('cancel', false)) { … … 153 159 if ($app->validBoomerangURL('%NAME_PLURAL%')) { 154 160 // Display boomerang page. 155 $app->dieBoomerangURL('%NAME_PLURAL%' );161 $app->dieBoomerangURL('%NAME_PLURAL%', $locally_carried_queries); 156 162 } 157 163 // Display default page. 158 $app->dieURL($_SERVER['PHP_SELF'] );164 $app->dieURL($_SERVER['PHP_SELF'], $locally_carried_queries); 159 165 } 160 166 validateInput(); … … 170 176 $qid = $db->query("SELECT %PRIMARY_KEY% FROM %DB_TBL% WHERE %PRIMARY_KEY% > '" . $db->escapeString(getFormData('%PRIMARY_KEY%')) . "' ORDER BY %PRIMARY_KEY% ASC LIMIT 1"); 171 177 if (list($next_id) = mysql_fetch_row($qid)) { 172 $app->dieURL($_SERVER['PHP_SELF'] . '?op=edit&%PRIMARY_KEY%=' . $next_id );178 $app->dieURL($_SERVER['PHP_SELF'] . '?op=edit&%PRIMARY_KEY%=' . $next_id, $locally_carried_queries); 173 179 } else { 174 180 $app->raiseMsg(_("Cannot edit next, the end of the list was reached"), MSG_NOTICE, __FILE__, __LINE__); … … 176 182 } else if ($app->validBoomerangURL('%NAME_PLURAL%')) { 177 183 // Display boomerang page. 178 $app->dieBoomerangURL('%NAME_PLURAL%' );184 $app->dieBoomerangURL('%NAME_PLURAL%', $locally_carried_queries); 179 185 } 180 186 // Display default page. 181 $app->dieURL($_SERVER['PHP_SELF'] );187 $app->dieURL($_SERVER['PHP_SELF'], $locally_carried_queries); 182 188 } 183 189 break; … … 185 191 case _("Save rank") : 186 192 updateRank(getFormData('rank')); 187 $app->dieURL($_SERVER['PHP_SELF'] );193 $app->dieURL($_SERVER['PHP_SELF'], $locally_carried_queries); 188 194 break; 189 195 … … 199 205 200 206 include 'header.ihtml'; 207 $app->carryQuery($locally_carried_queries); 201 208 include $main_template; 202 209 include 'footer.ihtml'; … … 244 251 $app->logMsg('Could not find record with %PRIMARY_KEY%: ' . $id, LOG_WARNING, __FILE__, __LINE__); 245 252 $app->raiseMsg(sprintf(_("The requested record %s could not be found."), $id), MSG_ERR, __FILE__, __LINE__); 246 $app->dieBoomerangURL( );253 $app->dieBoomerangURL('%NAME_PLURAL%', $locally_carried_queries); 247 254 } 248 255 … … 289 296 $app->logMsg('Could not find record with %PRIMARY_KEY%: ' . $id, LOG_WARNING, __FILE__, __LINE__); 290 297 $app->raiseMsg(sprintf(_("The requested record %s could not be found."), $id), MSG_ERR, __FILE__, __LINE__); 291 $app->dieBoomerangURL( );298 $app->dieBoomerangURL('%NAME_PLURAL%', $locally_carried_queries); 292 299 } 293 300
Note: See TracChangeset
for help on using the changeset viewer.