Changeset 13088
- Timestamp:
- 10/24/07 22:15:49 (11 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/support/Role_Midgardelement/Midgardelement.php
r5960 r13088 39 39 function probeStyle($name, $up = 0) 40 40 { 41 $qb = new MidgardQueryBuilder('midgard_style'); 41 $qbclass = (class_exists('MidgardQueryBuilder'))? 'MidgardQueryBuilder' : 'midgard_query_builder'; 42 $qb = new $qbclass('midgard_style'); 42 43 $qb->add_constraint('up', '=', $up); 43 44 $qb->add_constraint('name', '=', $name); … … 229 230 { 230 231 // 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'); 232 234 $qb->add_constraint('style', '=', $style->id); 233 235 $qb->add_constraint('name', '=', $element_name);
