Changeset 295 for trunk/bin/module_maker/skel/admin.php
- Timestamp:
- Dec 16, 2007 7:21:57 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bin/module_maker/skel/admin.php
r202 r295 203 203 'new_op' => 'insert', 204 204 'submit_buttons' => array( 205 'submit' => _("Add %ITEM_TITLE%"),206 'repeat' => _("Add & repeat"),207 'cancel' => _("Cancel"),205 array('name' => 'submit', 'value' => _("Add %ITEM_TITLE%"), 'accesskey' => 's'), 206 array('name' => 'repeat', 'value' => _("Add & repeat"), 'accesskey' => 'r'), 207 array('name' => 'cancel', 'value' => _("Cancel"), 'accesskey' => 'c'), 208 208 ), 209 209 ); … … 216 216 global $lock; 217 217 $db =& DB::getInstance(); 218 $app =& App::getInstance(); 218 219 219 220 $lock->select('%DB_TBL%', '%PRIMARY_KEY%', $id); … … 242 243 'new_op' => 'update', 243 244 'submit_buttons' => array( 244 'submit' => _("Save changes"),245 'repeat' => _("Save & edit next"),246 'reset' => _("Reset"),247 'cancel' => _("Cancel"),245 array('name' => 'submit', 'value' => _("Save changes"), 'accesskey' => 's'), 246 array('name' => 'repeat', 'value' => _("Save & edit next"), 'accesskey' => 'e'), 247 array('name' => 'reset', 'value' => _("Reset"), 'accesskey' => 'r'), 248 array('name' => 'cancel', 'value' => _("Cancel"), 'accesskey' => 'c'), 248 249 ), 249 250 ), $frm); … … 257 258 global $cache; 258 259 $db =& DB::getInstance(); 260 $app =& App::getInstance(); 259 261 260 262 $lock->select('%DB_TBL%', '%PRIMARY_KEY%', $id); … … 292 294 global $cache; 293 295 $db =& DB::getInstance(); 296 $app =& App::getInstance(); 294 297 295 298 // Remove any stale cached list data. … … 313 316 global $lock; 314 317 global $cache; 318 $db =& DB::getInstance(); 315 319 $app =& App::getInstance(); 316 320 … … 342 346 global $cache; 343 347 $db =& DB::getInstance(); 348 $app =& App::getInstance(); 344 349 345 350 $where_clause = ''; … … 374 379 SELECT 375 380 %DB_TBL%.*, 376 a1.username AS added_ admin_username,377 a2.username AS modified_ admin_username381 a1.username AS added_by_username, 382 a2.username AS modified_by_username 378 383 FROM %DB_TBL% 379 LEFT JOIN admin_tbl a1 ON (%DB_TBL%.added_by_user_id = a1.admin_id)380 LEFT JOIN admin_tbl a2 ON (%DB_TBL%.modified_by_user_id = a2.admin_id)384 LEFT JOIN user_tbl a1 ON (%DB_TBL%.added_by_user_id = a1.user_id) 385 LEFT JOIN user_tbl a2 ON (%DB_TBL%.modified_by_user_id = a2.user_id) 381 386 $where_clause 382 387 " . $so->getSortOrderSQL() . " … … 398 403 // First try to return from the cache. 399 404 if ($cache->exists('list')) { 400 return $cache->get('list'); 405 $list = $cache->get('list'); 406 return $list; 401 407 } 402 408 … … 419 425 global $cache; 420 426 $db =& DB::getInstance(); 427 $app =& App::getInstance(); 421 428 422 429 if (!is_array($ranks)) {
Note: See TracChangeset
for help on using the changeset viewer.