Ignore:
Timestamp:
Dec 16, 2007 7:21:57 AM (16 years ago)
Author:
quinn
Message:

Updated example config file. Added admin2.inc.css and minor corrections into HTML. Module maker fixes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bin/module_maker/skel/admin.php

    r202 r295  
    203203        'new_op' => 'insert',
    204204        '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'),
    208208        ),
    209209    );
     
    216216    global $lock;
    217217    $db =& DB::getInstance();
     218    $app =& App::getInstance();
    218219   
    219220    $lock->select('%DB_TBL%', '%PRIMARY_KEY%', $id);
     
    242243        'new_op' => 'update',
    243244        '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'),
    248249        ),
    249250    ), $frm);
     
    257258    global $cache;
    258259    $db =& DB::getInstance();
     260    $app =& App::getInstance();
    259261   
    260262    $lock->select('%DB_TBL%', '%PRIMARY_KEY%', $id);
     
    292294    global $cache;
    293295    $db =& DB::getInstance();
     296    $app =& App::getInstance();
    294297   
    295298    // Remove any stale cached list data.
     
    313316    global $lock;
    314317    global $cache;
     318    $db =& DB::getInstance();
    315319    $app =& App::getInstance();
    316320   
     
    342346    global $cache;
    343347    $db =& DB::getInstance();   
     348    $app =& App::getInstance();
    344349   
    345350    $where_clause = '';
     
    374379        SELECT
    375380            %DB_TBL%.*,
    376             a1.username AS added_admin_username,
    377             a2.username AS modified_admin_username
     381            a1.username AS added_by_username,
     382            a2.username AS modified_by_username
    378383        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)
    381386        $where_clause
    382387        " . $so->getSortOrderSQL() . "
     
    398403    // First try to return from the cache.
    399404    if ($cache->exists('list')) {
    400         return $cache->get('list');
     405        $list = $cache->get('list');
     406        return $list;
    401407    }
    402408   
     
    419425    global $cache;
    420426    $db =& DB::getInstance();
     427    $app =& App::getInstance();
    421428   
    422429    if (!is_array($ranks)) {
Note: See TracChangeset for help on using the changeset viewer.