Application->recallObject( $this->getPrefixSpecial(), $this->Prefix, $params ); $css_url = $this->Application->BaseURL('/kernel/stylesheets'); $css_path = rtrim( str_replace( $this->Application->BaseURL(), DOC_ROOT.BASE_PATH.'/', $css_url), '/' ); $last_compiled = $object->GetDBField('LastCompiled'); $style_name = strtolower( $object->GetDBField('StyleName') ); if( file_exists($css_path.'/'.$style_name.'-'.$last_compiled.'.css') ) { $ret = $css_url.'/'.$style_name.'-'.$last_compiled.'.css'; } elseif( $this->Application->isDebugMode() ) { $last_compiled = 0; if( $dh = opendir($css_path) ) { while( ($file = readdir($dh)) !== false ) { if( preg_match('/(.*)-([\d]+).css/', $file, $rets) ) { if( $rets[1] == $style_name && $rets[2] > $last_compiled ) $last_compiled = $rets[2]; } } closedir($dh); } if($last_compiled) $ret = $css_url.'/'.$style_name.'-'.$last_compiled.'.css'; } return ''; } } ?>