Ignore:
Timestamp:
Jun 3, 2006 7:47:48 PM (18 years ago)
Author:
scdev
Message:

Q - Merged branches/2.0singleton into trunk. Completed updating classes to use singleton methods. Implemented tests. Fixed some bugs. Changed some interfaces.

File:
1 edited

Legend:

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

    r111 r136  
    3434
    3535    // Get requested record.
    36     $qid = DB::query("
     36    $qid = $db->query("
    3737        SELECT * FROM %DB_TBL%
    38         WHERE %PRIMARY_KEY% = '" . DB::escapeString(getFormData('%PRIMARY_KEY%')) . "'
     38        WHERE %PRIMARY_KEY% = '" . $db->escapeString(getFormData('%PRIMARY_KEY%')) . "'
    3939        AND publish = 'true'
    4040        <##>AND (publish_date <= CURDATE() OR publish_date = '0000-00-00')
     
    4242    ");
    4343    if (!$item = mysql_fetch_assoc($qid)) {
    44         App::raiseMsg(_("Sorry that %ITEM_TITLE% could not be found"), MSG_WARNING, __FILE__, __LINE__);
    45         App::dieBoomerangURL();
     44        $app->raiseMsg(_("Sorry that %ITEM_TITLE% could not be found"), MSG_WARNING, __FILE__, __LINE__);
     45        $app->dieBoomerangURL();
    4646    }
    4747
    4848    // Update the hit counter for this record.
    49     DB::query("
     49    $db->query("
    5050        UPDATE %DB_TBL%
    5151        SET hit_count = hit_count + 1
    52         WHERE %PRIMARY_KEY% = '" . DB::escapeString(getFormData('%PRIMARY_KEY%')) . "'
     52        WHERE %PRIMARY_KEY% = '" . $db->escapeString(getFormData('%PRIMARY_KEY%')) . "'
    5353    ");
    5454
     
    6161    // Get the DEFAULT list.
    6262    $%NAME_SINGULAR%_list = array();
    63     $qid = DB::query("
     63    $qid = $db->query("
    6464        SELECT *
    6565        FROM %DB_TBL%
     
    7979    // Get the FEATURED list.
    8080    $featured_list = array();
    81     $qid = DB::query("
     81    $qid = $db->query("
    8282        SELECT *
    8383        FROM %DB_TBL%
     
    9292    // Get the POPULAR list.
    9393    $popular_list = array();
    94     $qid = DB::query("
     94    $qid = $db->query("
    9595        SELECT *
    9696        FROM %DB_TBL%
     
    104104    // Get the RECENT list.
    105105    $recent_list = array();
    106     $qid = DB::query("
     106    $qid = $db->query("
    107107        SELECT *
    108108        FROM %DB_TBL%
Note: See TracChangeset for help on using the changeset viewer.