Dotclear


Ignore:
Timestamp:
05/14/11 23:43:45 (12 years ago)
Author:
Moe
Message:

Contribute 1.0-alpha32: removed tests for Dotclear < 2.2

File:
1 edited

Legend:

Unmodified
Added
Removed
  • plugins/contribute/inc/lib.contribute.php

    r2940 r3034  
    8787          if (!is_array($mymeta_values)) {$mymeta_values = array();} 
    8888           
    89           if (version_compare(DC_VERSION,'2.2-alpha1','>=')) 
     89          foreach ($mymeta->getAll() as $meta) 
    9090          { 
    91                foreach ($mymeta->getAll() as $meta) 
     91               # section 
     92               if ($meta instanceof myMetaSection) 
    9293               { 
    93                     # section 
    94                     if ($meta instanceof myMetaSection) 
     94                    $active = in_array($meta->id,$mymeta_values); 
     95                     
     96                    $array[] = array( 
     97                         'id' => $meta->id, 
     98                         'type' => 'section', 
     99                         'prompt' => $meta->prompt, 
     100                         'active' => $active 
     101                    ); 
     102               } 
     103               elseif ($meta->enabled) 
     104               { 
     105                    $active = in_array($meta->id,$mymeta_values); 
     106                     
     107                    if ($meta->getMetaTypeId() == 'list') 
    95108                    { 
    96                          $active = in_array($meta->id,$mymeta_values); 
    97                           
     109                         $values = $meta->values; 
     110                    } 
     111                    else 
     112                    { 
     113                         $values = ''; 
     114                    } 
     115                     
     116                    if ($all || $active) 
     117                    { 
    98118                         $array[] = array( 
    99119                              'id' => $meta->id, 
    100                               'type' => 'section', 
     120                              'type' => $meta->getMetaTypeId(), 
    101121                              'prompt' => $meta->prompt, 
     122                              'default' => $meta->default, 
     123                              'values' => $values, 
    102124                              'active' => $active 
    103125                         ); 
    104126                    } 
    105                     elseif ($meta->enabled) 
    106                     { 
    107                          $active = in_array($meta->id,$mymeta_values); 
    108                           
    109                          if ($meta->getMetaTypeId() == 'list') 
    110                          { 
    111                               $values = $meta->values; 
    112                          } 
    113                          else 
    114                          { 
    115                               $values = ''; 
    116                          } 
    117                           
    118                          if ($all || $active) 
    119                          { 
    120                               $array[] = array( 
    121                                    'id' => $meta->id, 
    122                                    'type' => $meta->getMetaTypeId(), 
    123                                    'prompt' => $meta->prompt, 
    124                                    'default' => $meta->default, 
    125                                    'values' => $values, 
    126                                    'active' => $active 
    127                               ); 
    128                          } 
    129                     } 
    130127               } 
    131128          } 
    132           else 
    133           { 
    134                foreach ($mymeta->getAll() as $k => $v) 
    135                { 
    136                     if ($v->enabled) 
    137                     { 
    138                          $active = in_array($k,$mymeta_values); 
    139                          if ($all || $active) 
    140                          { 
    141                               $array[] = array( 
    142                                    'id' => $k, 
    143                                    'type' => $v->type, 
    144                                    'prompt' => $v->prompt, 
    145                                    'values' => $v->values, 
    146                                    'active' => $active 
    147                               ); 
    148                          } 
    149                     } 
    150                } 
    151           } 
    152            
     129 
    153130          return(staticRecord::newFromArray($array)); 
    154131     } 
Note: See TracChangeset for help on using the changeset viewer.

Sites map