Dotclear


Ignore:
Timestamp:
04/09/10 09:34:08 (14 years ago)
Author:
bruno
Message:

Added dotclear 2.2 compatibility.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • themes/freshy2/_config.php

    r1984 r2170  
    1818require dirname(__FILE__).'/lib/class.freshy2.config.php'; 
    1919 
     20if (!version_compare(DC_VERSION,'2.1.6','<=')) { 
     21     $core->blog->settings->addNamespace('freshy2'); 
     22     $freshy2_settings =& $core->blog->settings->freshy2; 
     23} else { 
     24     $core->blog->settings->setNamespace('freshy2'); 
     25     $freshy2_settings =& $core->blog->settings; 
     26} 
     27 
    2028$config = new freshy2Config($core); 
    2129 
     
    2331$custom_themes_combo = $config->getCustomThemes(); 
    2432$images = $config->getHeaderImages(); 
    25 $current_custom_theme = $core->blog->settings->freshy2_custom; 
    26 $current_top_image = $core->blog->settings->freshy2_top_image; 
    27 $left_sidebar = $core->blog->settings->freshy2_sidebar_left; 
    28 $right_sidebar = $core->blog->settings->freshy2_sidebar_right; 
     33$current_custom_theme = $freshy2_settings->freshy2_custom; 
     34$current_top_image = $freshy2_settings->freshy2_top_image; 
     35$left_sidebar = $freshy2_settings->freshy2_sidebar_left; 
     36$right_sidebar = $freshy2_settings->freshy2_sidebar_right; 
    2937if ($current_custom_theme == null) { 
    3038     $current_custom_theme = 'default'; 
     
    4250     $left_sidebar = $_POST['left_sidebar']; 
    4351     $right_sidebar = $_POST['right_sidebar']; 
    44      $core->blog->settings->setNamespace('themes'); 
    45      $core->blog->settings->put('freshy2_custom',$current_custom_theme,'string'); 
    46      $core->blog->settings->put('freshy2_top_image',$current_top_image,'string'); 
    47      $core->blog->settings->put('freshy2_sidebar_left',$left_sidebar,'string'); 
    48      $core->blog->settings->put('freshy2_sidebar_right',$right_sidebar,'string'); 
     52     $freshy2_settings->put('freshy2_custom',$current_custom_theme,'string'); 
     53     $freshy2_settings->put('freshy2_top_image',$current_top_image,'string'); 
     54     $freshy2_settings->put('freshy2_sidebar_left',$left_sidebar,'string'); 
     55     $freshy2_settings->put('freshy2_sidebar_right',$right_sidebar,'string'); 
    4956     $core->blog->triggerBlog(); 
    5057} 
Note: See TracChangeset for help on using the changeset viewer.

Sites map