Changeset 16

Show
Ignore:
Timestamp:
08/10/05 21:20:03 (6 years ago)
Author:
alexx
Message:
  • cleanup crapy code in dotnode-xml.php
  • include new Smarty_dotnode object to fix #14
  • modify reset_data.sh bash script to fix log problem
  • remove hardcoded ini_set error_log in config (it must bi fixed in vhost, or if not possible: in config_server.inc.php
  • fix impossibility to change language in dotpage (cookie name not set correctly)
Location:
trunk
Files:
11 modified

Legend:

Unmodified
Added
Removed
  • trunk/actions/select_language.action.php

    r1 r16  
    2929        $lang = 'en_US'; 
    3030 
    31 setcookie('lang', $lang, time()+31536000, '/', COOKIE_DOMAIN); 
     31setcookie('lang', $lang, time()+31536000, '/', $config['domain']); 
    3232setcookie('lang', $lang, time()+31536000, '/'); 
    3333 
  • trunk/dotnode-dotpage.php

    r12 r16  
    3131$login = $regs[1]; 
    3232 
    33 $smarty = new Smarty; 
     33$smarty = new Smarty_dotnode; 
     34$smarty->template_dir = SMARTYPATH.'/templates_hp/'; 
     35$smarty->compile_id = 'hp'; 
     36$smarty->cache_lifetime = 600; 
    3437 
    35 $smarty->template_dir = SMARTYPATH.'/templates_hp/'; 
    36 $smarty->compile_dir = SMARTYPATH.'/templates_c/'; 
    37 $smarty->config_dir = SMARTYPATH.'/configs/'; 
    38 $smarty->cache_dir = SMARTYPATH.'/cache/'; 
    39 $smarty->debugging_ctrl = false; 
    40 $smarty->register_block('t', 'smarty_translate'); 
    41 $smarty->register_modifier('wikise', 'Wikise'); 
    42 $smarty->register_modifier('utf8', 'smarty_modifier_utf8'); 
    43  
    44 $smarty->compile_id = 'hp'; 
    45 $smarty->caching = false; 
    46 $smarty->cache_lifetime = 600; 
    47 $smarty->cache_modified_check = 1; 
    48 $smarty->use_sub_dirs = 1; 
    4938if(!$smarty->is_cached('index.tpl', $login.'.'.$lang.'.'.$_SERVER['PHP_SELF'] )) 
    5039{ 
  • trunk/dotnode-error.php

    r10 r16  
    2626include('../includes/config/global.inc.php'); 
    2727 
    28 $smarty = new Smarty; 
    29  
    30 $smarty->template_dir = SMARTYPATH.'/templates/'; 
    31 $smarty->compile_dir = SMARTYPATH.'/templates_c/'; 
    32 $smarty->config_dir = SMARTYPATH.'/configs/'; 
    33 $smarty->cache_dir = SMARTYPATH.'/cache/'; 
    34 $smarty->register_block('t', 'smarty_translate'); 
    35 $smarty->use_sub_dirs = true; 
     28$smarty = new Smarty_dotnode; 
    3629 
    3730$token = retreive_url_info($_SERVER['PHP_SELF']); 
  • trunk/dotnode-id.php

    r10 r16  
    3232} 
    3333 
    34 $smarty = new Smarty; 
     34$smarty = new Smarty_dotnode; 
    3535 
    3636$smarty->template_dir = SMARTYPATH.'/templates/'; 
    3737$smarty->compile_dir = SMARTYPATH.'/templates_c/'; 
    38 $smarty->config_dir = SMARTYPATH.'/configs/'; 
    39 $smarty->cache_dir = SMARTYPATH.'/cache/'; 
    40  
    4138$smarty->compile_id = 'www'; 
    42  
    43 $smarty->register_block('t', 'smarty_translate'); 
    44 $smarty->register_modifier('wikise', 'Wikise'); 
    45 $smarty->register_modifier('linkurl', 'smarty_modifier_linkurl'); 
    46 $smarty->register_modifier('utf8', 'smarty_modifier_utf8'); 
    47 $smarty->register_function('html_access_options', 'smarty_function_html_access_options'); 
    48 $smarty->use_sub_dirs = true; 
    49 #$smarty->force_compile = true; 
    5039 
    5140$token = retreive_url_info($_SERVER['PHP_SELF']); 
  • trunk/dotnode-new.php

    r10 r16  
    2727include('../includes/config/global.inc.php'); 
    2828 
    29 $smarty = new Smarty; 
    30  
    31 $smarty->template_dir = SMARTYPATH.'/templates/'; 
    32 $smarty->compile_dir = SMARTYPATH.'/templates_c/'; 
    33 $smarty->config_dir = SMARTYPATH.'/configs/'; 
    34 $smarty->cache_dir = SMARTYPATH.'/cache/'; 
    35  
     29$smarty = new Smarty_dotnode; 
    3630$smarty->compile_id = 'new'; 
    37  
    38 $smarty->debugging_ctrl = false; 
    39  
    40 $smarty->register_block('t', 'smarty_translate'); 
    41 $smarty->register_modifier('wikise', 'Wikise'); 
    42 $smarty->register_function('html_access_options', 'smarty_function_html_access_options'); 
    43 $smarty->use_sub_dirs = true; 
    44  
    45 #$smarty->force_compile = true; 
    4631 
    4732$token = retreive_url_info($_SERVER['PHP_SELF']); 
  • trunk/dotnode-pub.php

    r10 r16  
    2525include('../includes/includes.inc.php'); 
    2626include('../includes/config/global.inc.php'); 
    27 $smarty = new Smarty; 
    2827 
    29 $smarty->template_dir = SMARTYPATH.'/templates/'; 
    30 $smarty->compile_dir = SMARTYPATH.'/templates_c/'; 
    31 $smarty->config_dir = SMARTYPATH.'/configs/'; 
    32 $smarty->cache_dir = SMARTYPATH.'/cache/'; 
     28$smarty = new Smarty_dotnode; 
    3329$smarty->compile_id = 'pub'; 
    34 $smarty->use_sub_dirs = true; 
    35  
    36 $smarty->register_block('t', 'smarty_translate'); 
    3730 
    3831$token = retreive_url_info($_SERVER["PHP_SELF"]); 
    39  
    4032 
    4133if( array_key_exists('dotnodeSessID', $_COOKIE) ) 
  • trunk/dotnode-xml.php

    r12 r16  
    3131$login = $regs[1]; 
    3232 
    33 $smarty = new Smarty; 
    34  
     33$smarty = new Smarty_dotnode; 
    3534$smarty->template_dir = SMARTYPATH.'/templates_xml/'; 
    36 $smarty->compile_dir = SMARTYPATH.'/templates_c/'; 
    37 $smarty->config_dir = SMARTYPATH.'/configs/'; 
    38 $smarty->cache_dir = SMARTYPATH.'/cache/'; 
    39 $smarty->debugging_ctrl = false; 
    40 $smarty->register_modifier('wikise', 'Wikise'); 
    4135$smarty->compile_id = 'xml'; 
    42 $smarty->caching = false; 
    43 $smarty->cache_lifetime = 3600; 
    44 $smarty->use_sub_dirs = true; 
    45  
    46 ini_set('session.name','dotnodeSessID'); 
    47 ini_set('session.save_path',BASEPATH.'/../sessions'); 
    48  
    49 include(INCLUDESPATH.'/session_save_handler.inc.php'); 
    50 session_set_save_handler ("_sess_open", "_sess_close", "_sess_read", "_sess_write", "_sess_destroy", "_sess_gc"); 
    5136 
    5237session_start(); 
  • trunk/includes/config.inc.php

    r10 r16  
    5656 
    5757ini_set('register_globals', 'off'); 
    58 ini_set('error_log', BASEPATH.'/../log/php.log'); 
    5958?> 
  • trunk/includes/config/xml.inc.php

    r1 r16  
    2525define('INCLUDEPATH',BASEPATH.'/../inc_xml'); 
    2626ini_set('zlib.output_compression', 'off'); 
     27ini_set('session.name','dotnodeSessID'); 
     28ini_set('session.save_path',BASEPATH.'/../sessions'); 
     29include(INCLUDESPATH.'/session_save_handler.inc.php'); 
     30session_set_save_handler ("_sess_open", "_sess_close", "_sess_read", "_sess_write", "_sess_destroy", "_sess_gc"); 
    2731?> 
  • trunk/includes/includes.inc.php

    r1 r16  
    2323 ******************** http://opensource.ikse.net/projects/dotnode ***/ 
    2424 
    25 include('Smarty/Smarty.class.php'); 
    26 include('smarty_plugins/block.gettext.php'); 
    27 include('smarty_plugins/modifier.linkalize.php'); 
    28 include('smarty_plugins/modifier.linkurl.php'); 
    29  
    30  
    31 include('smarty_plugins/function.html_access_options.php'); 
    32 include('smarty_plugins/modifier.utf8.php'); 
    33  
    34 include('wiki.inc.php'); 
    35  
    36 include('Mail.php'); 
    37  
    38 include('DB.php'); 
    3925include('config.inc.php'); 
    4026 
     27include('Mail.php'); // PEAR 
     28 
     29include('DB.php'); // PEAR 
     30 
     31include('smarty.inc.php'); 
    4132include('functions.inc.php'); 
    42 include('logikse.class.php'); 
    4333 
    4434// To handle difference in PHP_SELF under Apache1 and Apache2 
  • trunk/reset_data.sh

    r6 r16  
    66rm -fr data/*/thumb/?? 
    77rm -fr sessions/* 
    8 :> log/php.log 
     8:> log/* 
    99 
    1010if [ -e data.tar.gz ]; then 
     
    1414chmod 707 smarty/templates_c 
    1515chmod 707 smarty/cache 
    16 chmod 707 log/php.log 
     16chmod -R 707 log 
    1717chmod 707 sessions 
    1818chmod -R 707 data