Index: themes_tag_processor.php =================================================================== --- themes_tag_processor.php (revision 13152) +++ themes_tag_processor.php (working copy) @@ -18,52 +18,10 @@ { function StylesheetFile($params) { - $object =& $this->getObject($params); - if (!$object->GetDBField('StyleName')) { - // no stylesheet is associated with current theme - return ''; - } + // not using theme-based stylesheets anymore + trigger_error('Tag "StylesheetFile" is depricated and should not be used.', E_USER_NOTICE); - $css_url = $this->Application->BaseURL(WRITEBALE_BASE . '/stylesheets'); - $css_path = rtrim( str_replace( $this->Application->BaseURL(), FULL_PATH . '/', $css_url), '/' ); - - $last_compiled = $object->GetDBField('LastCompiled'); - - $style_name = mb_strtolower( $object->GetDBField('StyleName') ); - - if( file_exists($css_path.'/'.$style_name.'-'.$last_compiled.'.css') ) - { - $ret = rtrim($css_url, '/').'/'.$style_name.'-'.$last_compiled.'.css'; - - } - else - { - // search for previously compiled stylesheet - $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) { - // found - $ret = $css_url.'/'.$style_name.'-'.$last_compiled.'.css'; - } - else { - // not found - return ''; - } - } - - if (isset($params['file_only'])) return $ret; - - return ''; + return ''; } function SelectedTheme($params) Index: themes_config.php =================================================================== --- themes_config.php (revision 13159) +++ themes_config.php (working copy) @@ -107,27 +107,14 @@ 'AutoDelete' => true, 'AutoClone' => true, - 'ListSQLs' => Array ('' => ' SELECT %1$s.* %2$s - FROM %s - LEFT JOIN '.TABLE_PREFIX.'Stylesheets st ON st.StylesheetId = %1$s.StylesheetId'), + 'ListSQLs' => Array ('' => 'SELECT %1$s.* %2$s FROM %s'), - 'ItemSQLs' => Array ( '' => ' SELECT %1$s.* %2$s - FROM %s - LEFT JOIN '.TABLE_PREFIX.'Stylesheets st ON st.StylesheetId = %1$s.StylesheetId'), - 'ListSortings' => Array ( '' => Array( 'Sorting' => Array('Name' => 'asc'), ) ), - 'CalculatedFields' => Array ( - '' => Array ( - 'StyleName' => 'st.Name', - 'LastCompiled' => 'st.LastCompiled', - ), - ), - 'Fields' => Array( 'ThemeId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0), 'Name' => Array('type' => 'string','not_null' => 1, 'required' => 1, 'default' => ''), @@ -135,7 +122,7 @@ 'Description' => Array('type' => 'string', 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => null), 'PrimaryTheme' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 0), 'CacheTimeout' => Array('type' => 'int', 'not_null' => 1, 'default' => 0), - 'StylesheetId' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options_sql' => 'SELECT %s FROM '.TABLE_PREFIX.'Stylesheets', 'option_key_field' => 'StylesheetId', 'option_title_field' => 'Name', 'not_null' => 1, 'default' => 0), + 'StylesheetId' => Array('type' => 'int', /*'formatter' => 'kOptionsFormatter', 'options_sql' => 'SELECT %s FROM '.TABLE_PREFIX.'Stylesheets', 'option_key_field' => 'StylesheetId', 'option_title_field' => 'Name',*/ 'not_null' => 1, 'default' => 0), 'LanguagePackInstalled' => Array ( 'type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1, @@ -144,11 +131,6 @@ 'TemplateAliases' => Array ('type' => 'string', 'formatter' => 'kSerializedFormatter', 'default' => 'a:0:{}'), ), - 'VirtualFields' => Array ( - 'StyleName' => Array ('type' => 'string', 'default' => ''), - 'LastCompiled' => Array ('type' => 'int', 'default' => null), - ), - 'Grids' => Array( 'Default' => Array( 'Icons' => Array (