Changeset 13088

Show
Ignore:
Timestamp:
10/24/07 22:15:49 (11 months ago)
Author:
tarjei
Message:

Make Midgardelement support Midgard 1.9

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/support/Role_Midgardelement/Midgardelement.php

    r5960 r13088  
    3939    function probeStyle($name, $up = 0) 
    4040    { 
    41         $qb = new MidgardQueryBuilder('midgard_style'); 
     41        $qbclass = (class_exists('MidgardQueryBuilder'))? 'MidgardQueryBuilder' : 'midgard_query_builder'; 
     42        $qb = new $qbclass('midgard_style'); 
    4243        $qb->add_constraint('up', '=', $up); 
    4344        $qb->add_constraint('name', '=', $name); 
     
    229230        { 
    230231            // We have the style in DB, update the element contents 
    231             $qb = new MidgardQueryBuilder('midgard_element'); 
     232            $qbclass = (class_exists('MidgardQueryBuilder'))? 'MidgardQueryBuilder' : 'midgard_query_builder'; 
     233            $qb = new $qbclass('midgard_element'); 
    232234            $qb->add_constraint('style', '=', $style->id); 
    233235            $qb->add_constraint('name', '=', $element_name);