Changeset 6116

Show
Ignore:
Timestamp:
06/02/07 16:22:32 (1 year ago)
Author:
bergie
Message:

MidgardQueryBuilder? -> midgard_query_builder since the old class name is deprecated and we don't support 1.7 any more

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/midcom/midcom.core/midcom/baseclasses/core/dbobject.php

    r5761 r6116  
    18681868     * 
    18691869     * @param MidgardObject $object A class inherited from one of the MgdSchema driven Midgard classes supporting the above callbacks. 
    1870      * @return MidgardQueryBuilder Prepared QueryBuilder or false on failure. 
     1870     * @return midgard_query_builder Prepared QueryBuilder or false on failure. 
    18711871     */ 
    18721872    function get_attachment_qb(&$object) 
  • trunk/midcom/midcom.core/midcom/core/group_midgard.php

    r5594 r6116  
    138138    function list_subordinate_groups() 
    139139    { 
    140         $qb = new MidgardQueryBuilder('midgard_group'); 
     140        $qb = new midgard_query_builder('midgard_group'); 
    141141        $qb->add_constraint('owner', '=', $this->_storage->id); 
    142142        $result = $qb->execute(); 
     
    153153        debug_push_class(__CLASS__, __FUNCTION__); 
    154154 
    155         $qb = new MidgardQueryBuilder('midgard_member'); 
     155        $qb = new midgard_query_builder('midgard_member'); 
    156156        $qb->add_constraint('gid', '=', $this->_storage->id); 
    157157        $result = @$qb->execute(); 
     
    192192        debug_push_class(__CLASS__, __FUNCTION__); 
    193193 
    194         $qb = new MidgardQueryBuilder('midgard_member'); 
     194        $qb = new midgard_query_builder('midgard_member'); 
    195195        $qb->add_constraint('uid', '=', $user->_storage->id); 
    196196        $result = @$qb->execute(); 
  • trunk/midcom/midcom.core/midcom/core/group_virtual.php

    r5594 r6116  
    8787 
    8888            // Try to load the VGroup from the database 
    89             $qb = new MidgardQueryBuilder('midcom_core_group_virtual_db'); 
     89            $qb = new midgard_query_builder('midcom_core_group_virtual_db'); 
    9090            $qb->add_constraint('component', '=', $component); 
    9191            $qb->add_constraint('identifier', '=', $localname); 
  • trunk/midcom/midcom.core/midcom/core/privilege.php

    r5616 r6116  
    522522    function get_privilege(&$object, $name, $assignee, $classname = '') 
    523523    { 
    524         $qb = new MidgardQueryBuilder('midcom_core_privilege_db'); 
     524        $qb = new midgard_query_builder('midcom_core_privilege_db'); 
    525525        $qb->add_constraint('objectguid', '=', $object->guid); 
    526526        $qb->add_constraint('name', '=', $name); 
  • trunk/midcom/midcom.core/midcom/core/querybuilder.php

    r5840 r6116  
    1212 * 
    1313 * This class must be used instead anyplace within MidCOM instead of the real 
    14  * MidgardQueryBuilder object within the MidCOM Framework. This wrapper is 
     14 * midgard_query_builder object within the MidCOM Framework. This wrapper is 
    1515 * required for the correct operation of many MidCOM services. 
    1616 * 
     
    4848     * The query builder instance that is internally used. 
    4949     * 
    50      * @var MidgardQueryBuilder 
     50     * @var midgard_query_builder 
    5151     * @access private 
    5252     */ 
     
    194194     * and a MIDCOM_ERRCRIT level error is triggered, halting execution. 
    195195     * 
    196      * @param MidgardQueryBuilder $qb An instance of the Query builder obtained by the new_query_builder 
     196     * @param midgard_query_builder $qb An instance of the Query builder obtained by the new_query_builder 
    197197     *     function of this class. 
    198198     * @return Array The result of the query builder or null on any error. Note, that empty resultsets 
     
    615615     * core deliberatly on this point. 
    616616     * 
    617      * Therefore, it is currently <i>strongly discouraged</i> to assume MidgardQueryBuilder::count 
     617     * Therefore, it is currently <i>strongly discouraged</i> to assume midgard_query_builder::count 
    618618     * to be useful as-is. See http://midgard.tigris.org/issues/show_bug.cgi?id=56 for details. 
    619619     * 
  • trunk/midcom/midcom.core/midcom/core/temporary_object.php

    r3766 r6116  
    104104        // Parameters, we handle them directly, without using the DBA API, 
    105105        // we cannot move parameters with DBA: 
    106         $query = new MidgardQueryBuilder('midgard_parameter'); 
     106        $query = new midgard_query_builder('midgard_parameter'); 
    107107        $query->add_constraint('tablename', '=', $this->__table__); 
    108108        $query->add_constraint('oid', '=', $this->id); 
  • trunk/midcom/midcom.core/midcom/core/user.php

    r5377 r6116  
    743743 
    744744        // Delete login sessions 
    745         $qb = new MidgardQueryBuilder('midcom_core_login_session_db'); 
     745        $qb = new midgard_query_builder('midcom_core_login_session_db'); 
    746746        $qb->add_constraint('userid', '=', $this->id); 
    747747        $result = @$qb->execute(); 
     
    756756 
    757757        // Delete all ACL records which have the user as assignee 
    758         $qb = new MidgardQueryBuilder('midcom_core_privilege_db'); 
     758        $qb = new midgard_query_builder('midcom_core_privilege_db'); 
    759759        $qb->add_constraint('assignee', '=', $this->id); 
    760760        $result = @$qb->execute(); 
  • trunk/midcom/midcom.core/midcom/exec/about.php

    r4049 r6116  
    7171                    && class_exists('midgard_quota')) 
    7272                { 
    73                     $qb = new MidgardQueryBuilder('midgard_quota'); 
     73                    $qb = new midgard_query_builder('midgard_quota'); 
    7474                    $qb->add_constraint('tablename', '=', 'wholesg'); 
    7575                    $qb->add_constraint('typename', '=', ''); 
  • trunk/midcom/midcom.core/midcom/helper/_dbfactory.php

    r5810 r6116  
    7474 
    7575    /** 
    76      * This function will determine the correct type of MidgardQueryBuilder that 
     76     * This function will determine the correct type of midgard_query_builder that 
    7777     * has to be created. It will also call the _on_prepare_new_query_builder event handler. 
    7878     * 
     
    9494     * This function will execute the Querybuilder. 
    9595     * 
    96      * @param MidgardQueryBuilder $qb An instance of the Query builder obtained by the new_query_builder 
     96     * @param midgard_query_builder $qb An instance of the Query builder obtained by the new_query_builder 
    9797     *     function of this class. 
    9898     * @return Array The result of the query builder. Note, that empty resultsets 
  • trunk/midcom/midcom.core/midcom/services/auth.php

    r6088 r6116  
    15861586        if (is_null($this->_vgroups)) 
    15871587        { 
    1588             $qb = new MidgardQueryBuilder('midcom_core_group_virtual_db'); 
     1588            $qb = new midgard_query_builder('midcom_core_group_virtual_db'); 
    15891589            $result = @$qb->execute(); 
    15901590            if (! $result) 
     
    16541654    function & get_user_by_name($name) 
    16551655    { 
    1656         $qb = new MidgardQueryBuilder('midgard_person'); 
     1656        $qb = new midgard_query_builder('midgard_person'); 
    16571657        $qb->add_constraint('username', '=', $name); 
    16581658        $result = @$qb->execute(); 
     
    16811681    { 
    16821682                //$sg_id = $sg_id == null || !is_integer($sg_id) ? $_MIDGARD['sitegroup'] : $sg_id; 
    1683         $qb = new MidgardQueryBuilder('midgard_group'); 
     1683        $qb = new midgard_query_builder('midgard_group'); 
    16841684        $qb->add_constraint('name', '=', $name); 
    16851685                if (is_integer($sg_id)) 
     
    19741974 
    19751975        // Check if the group does already exist 
    1976         $qb = new MidgardQueryBuilder('midcom_core_group_virtual_db'); 
     1976        $qb = new midgard_query_builder('midcom_core_group_virtual_db'); 
    19771977        $qb->add_constraint('component', '=', $component); 
    19781978        $qb->add_constraint('identifier', '=', $identifier); 
  • trunk/midcom/midcom.core/midcom/services/auth/sessionmgr.php

    r5737 r6116  
    159159        } 
    160160 
    161         $qb = new MidgardQueryBuilder('midcom_core_login_session_db'); 
     161        $qb = new midgard_query_builder('midcom_core_login_session_db'); 
    162162        $qb->add_constraint('userid', '=', $user->id); 
    163163        $result = @$qb->execute(); 
     
    412412    function _update_user_password(&$user, $new) 
    413413    { 
    414         $qb = new MidgardQueryBuilder('midcom_core_login_session_db'); 
     414        $qb = new midgard_query_builder('midcom_core_login_session_db'); 
    415415        $qb->add_constraint('userid', '=', $user->id); 
    416416        $result = @$qb->execute(); 
     
    440440    function _update_user_username(&$user, $new) 
    441441    { 
    442         $qb = new MidgardQueryBuilder('midcom_core_login_session_db'); 
     442        $qb = new midgard_query_builder('midcom_core_login_session_db'); 
    443443        $qb->add_constraint('userid', '=', $user->id); 
    444444        $result = @$qb->execute(); 
     
    476476 
    477477        $timed_out = time() - $GLOBALS['midcom_config']['auth_login_session_timeout']; 
    478         $qb = new MidgardQueryBuilder('midcom_core_login_session_db'); 
     478        $qb = new midgard_query_builder('midcom_core_login_session_db'); 
    479479        $qb->add_constraint('userid', '=', $user->id); 
    480480        $qb->add_constraint('timestamp', '>=', $timed_out); 
     
    501501    { 
    502502        $timed_out = time() - $GLOBALS['midcom_config']['auth_login_session_timeout']; 
    503         $qb = new MidgardQueryBuilder('midcom_core_login_session_db'); 
     503        $qb = new midgard_query_builder('midcom_core_login_session_db'); 
    504504        $qb->add_constraint('timestamp', '>=', $timed_out); 
    505505        $result = @$qb->execute(); 
     
    528528    { 
    529529        $timed_out = time() - $GLOBALS['midcom_config']['auth_login_session_timeout']; 
    530         $qb = new MidgardQueryBuilder('midcom_core_login_session_db'); 
     530        $qb = new midgard_query_builder('midcom_core_login_session_db'); 
    531531        $qb->add_constraint('timestamp', '>=', $timed_out); 
    532532        $query_result = @$qb->execute(); 
  • trunk/midcom/midcom.core/support/export_style.php

    r5673 r6116  
    128128                continue; 
    129129            } 
    130             $qb = new MidgardQueryBuilder('midgard_style'); 
     130            $qb = new midgard_query_builder('midgard_style'); 
    131131            $qb->add_constraint('name', '=', $name); 
    132132            $qb->add_constraint('up', '=', $up); 
     
    232232    function dump_style($style_id) 
    233233    { 
    234         $qb = new MidgardQueryBuilder('midgard_element'); 
     234        $qb = new midgard_query_builder('midgard_element'); 
    235235        $qb->add_constraint('style', '=', $style_id); 
    236236        $qb->add_order('name'); 
     
    247247        } 
    248248         
    249         $qb2 = new MidgardQueryBuilder('midgard_style'); 
     249        $qb2 = new midgard_query_builder('midgard_style'); 
    250250        $qb2->add_constraint('up', '=', $style_id); 
    251251        //mgd_debug_start(); 
  • trunk/midcom/midcom.core/support/migrate_26.php

    r4470 r6116  
    8484 
    8585// Map components 
    86 $qb_component = new MidgardQueryBuilder('midgard_parameter'); 
     86$qb_component = new midgard_query_builder('midgard_parameter'); 
    8787$qb_component->add_constraint('domain', '=', 'midcom'); 
    8888$qb_component->add_constraint('name', '=', 'component'); 
     
    124124 
    125125// Clear style parameters 
    126 $qb_style = new MidgardQueryBuilder('midgard_parameter'); 
     126$qb_style = new midgard_query_builder('midgard_parameter'); 
    127127$qb_style->add_constraint('domain', '=', 'midcom'); 
    128128$qb_style->add_constraint('tablename', '=', 'topic'); 
     
    145145 
    146146// Convert topic owner to midcom_core_privilege_db object 
    147 $qb_topic = new MidgardQueryBuilder('midgard_topic'); 
     147$qb_topic = new midgard_query_builder('midgard_topic'); 
    148148$qb_topic->add_constraint('owner', '<>', 0); 
    149149$topics = $qb_topic->execute(); 
     
    176176 
    177177// Convert old ViewerGroups parameters to midcom_core_privilege_db objects 
    178 $qb_vg = new MidgardQueryBuilder('midgard_parameter'); 
     178$qb_vg = new midgard_query_builder('midgard_parameter'); 
    179179$qb_vg->add_constraint('domain', '=', 'ViewerGroups'); 
    180180$qb_vg->add_constraint('tablename', '=', 'topic'); 
     
    276276    return $obj->guid; 
    277277} 
    278 $qb_dm1p = new MidgardQueryBuilder('midgard_parameter'); 
     278$qb_dm1p = new midgard_query_builder('midgard_parameter'); 
    279279$qb_dm1p->begin_group('OR'); 
    280280    $qb_dm1p->add_constraint('domain', '=', 'midcom.helper.datamanager.datatype.blob'); 
     
    474474// Convert parameters metadata/keywords & metadata/target values CSV to PSV (and add extr pipes to start and end as well fro DM2s benefit) 
    475475/* 
    476 $qb_md = new MidgardQueryBuilder('midgard_parameter'); 
     476$qb_md = new midgard_query_builder('midgard_parameter'); 
    477477$qb_md->add_constraint('domain', '=', 'metadata'); 
    478478$qb_md->begin_group('OR'); 
     
    495495// Clean up article expiry 
    496496/* 
    497 $qb_exp = new MidgardQueryBuilder('midgard_article'); 
     497$qb_exp = new midgard_query_builder('midgard_article'); 
    498498$qb_exp->begin_group('OR'); 
    499499    $qb_exp->add_constraint('extra1', 'LIKE', '%.%.%');