Dotclear

Changeset 1204


Ignore:
Timestamp:
06/06/09 11:48:15 (14 years ago)
Author:
annso
Message:

cleaner version

Location:
plugins/entryCSS
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • plugins/entryCSS/_public.php

    r1199 r1204  
    2020     { 
    2121          if($core->url->type == "post" || $core->url->type == "pages") { 
    22                $query = 'SELECT post_css FROM '.$GLOBALS['core']->prefix.'post WHERE post_id = '.$_ctx->posts->post_id.';'; 
    23                $rs = $core->con->select($query); 
    24                $value = $rs->f('post_css'); 
    25                echo '<style type="text/css">'.$value.'</style>'; 
     22               echo '<style type="text/css">'.self::getCSS($_ctx->posts->post_id).'</style>'; 
    2623          } 
     24     } 
     25      
     26     public static function getCSS($id_post) 
     27     { 
     28          global $core, $_ctx; 
     29           
     30          $query = 'SELECT post_css FROM '.$core->prefix.'post WHERE post_id = '.$id_post.';'; 
     31          $rs = $core->con->select($query); 
     32          $value = $rs->f('post_css'); 
     33          return $value; 
    2734     } 
    2835} 
Note: See TracChangeset for help on using the changeset viewer.

Sites map