Dotclear

Ticket #468: patch

File patch, 899 bytes (added by jcdubacq, 17 years ago)

Patch to implement has_pings and has_comments

  • /tmp/

    old new  
    6060               } 
    6161          } 
    6262           
     63    if (isset($attr['has_comments'])) { 
     64      if ((boolean) $attr['has_comments']) { 
     65        $if[] = '($_ctx->posts->hasComments())'; 
     66      } else { 
     67        $if[] = '(!$_ctx->posts->hasComments())'; 
     68      } 
     69    } 
     70     
    6371          if (isset($attr['show_pings'])) { 
    6472               if ((boolean) $attr['show_pings']) { 
    6573                    $if[] = '($_ctx->posts->hasTrackbacks() || $_ctx->posts->trackbacksActive())'; 
     
    6876               } 
    6977          } 
    7078           
     79    if (isset($attr['has_pings'])) { 
     80      if ((boolean) $attr['has_pings']) { 
     81        $if[] = '($_ctx->posts->hasTrackbacks())'; 
     82      } else { 
     83        $if[] = '(!$_ctx->posts->hasTrackbacks())'; 
     84      } 
     85    } 
     86     
    7187          if (!empty($if)) { 
    7288               return '<?php if('.implode(' '.$operator.' ',$if).') : ?>'.$content.'<?php endif; ?>'; 
    7389          } else { 

Sites map