Changeset 8722 for trunk/include


Ignore:
Timestamp:
Jan 17, 2011, 7:48:13 PM (13 years ago)
Author:
plg
Message:

feature 2112 added: ability to set an additional local directory
$conflocal_dir_site in local/config/multisite.inc.php

Location:
trunk/include
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/common.inc.php

    r8247 r8722  
    7171$filter = array();
    7272
    73 @include(PHPWG_ROOT_PATH .'local/config/database.inc.php');
     73if (is_file(PHPWG_ROOT_PATH .'local/config/multisite.inc.php'))
     74{
     75  include(PHPWG_ROOT_PATH .'local/config/multisite.inc.php');
     76  define('PWG_LOCAL_DIR', $conf['local_dir_site']);
     77}
     78else
     79{
     80  define('PWG_LOCAL_DIR', 'local/');
     81}
     82
     83@include(PHPWG_ROOT_PATH.PWG_LOCAL_DIR .'config/database.inc.php');
    7484if (!defined('PHPWG_INSTALLED'))
    7585{
     
    93103include(PHPWG_ROOT_PATH . 'include/config_default.inc.php');
    94104@include(PHPWG_ROOT_PATH. 'local/config/config.inc.php');
     105if (isset($conf['local_dir_site']))
     106{
     107  @include(PHPWG_ROOT_PATH.PWG_LOCAL_DIR. 'config/config.inc.php');
     108}
    95109include(PHPWG_ROOT_PATH .'include/dblayer/functions_'.$conf['dblayer'].'.inc.php');
    96110
     
    152166}
    153167trigger_action('loading_lang');
    154 load_language('lang', PHPWG_ROOT_PATH.'local/', array('no_fallback'=>true, 'local'=>true) );
     168load_language('lang', PHPWG_ROOT_PATH.PWG_LOCAL_DIR, array('no_fallback'=>true, 'local'=>true) );
    155169
    156170// only now we can set the localized username of the guest user (and not in
  • trunk/include/constants.php

    r8651 r8722  
    2828
    2929define('PHPWG_THEMES_PATH', $conf['themes_dir'].'/');
     30define('PWG_COMBINED_DIR', PWG_LOCAL_DIR.'combined/');
    3031
    3132// Required versions
  • trunk/include/functions.inc.php

    r8665 r8722  
    576576    load_language('common.lang');
    577577    trigger_action('loading_lang');
    578     load_language('lang', PHPWG_ROOT_PATH.'local/', array('no_fallback'=>true, 'local'=>true) );
     578    load_language('lang', PHPWG_ROOT_PATH.PWG_LOCAL_DIR, array('no_fallback'=>true, 'local'=>true) );
    579579    $template = new Template(PHPWG_ROOT_PATH.'themes', get_default_theme());
    580580  }
  • trunk/include/functions_mail.inc.php

    r8131 r8722  
    224224    load_language('admin.lang', '', array('language'=>$language) );
    225225    trigger_action('loading_lang');
    226     load_language('lang', PHPWG_ROOT_PATH.'local/',
     226    load_language('lang', PHPWG_ROOT_PATH.PWG_LOCAL_DIR,
    227227      array('language'=>$language, 'no_fallback'=>true, 'local'=>true)
    228228    );
  • trunk/include/template.class.php

    r8634 r8722  
    798798    foreach ($smarty->get_template_vars('themes') as $theme)
    799799    {
    800       $f = 'local/css/'.$theme['id'].'-rules.css';
     800      $f = PWG_LOCAL_DIR.'css/'.$theme['id'].'-rules.css';
    801801      if (file_exists(PHPWG_ROOT_PATH.$f))
    802802      {
     
    804804      }
    805805    }
    806     $f = 'local/css/rules.css';
     806    $f = PWG_LOCAL_DIR.'css/rules.css';
    807807    if (file_exists(PHPWG_ROOT_PATH.$f))
    808808    {
     
    11341134final class FileCombiner
    11351135{
    1136   const OUT_SUB_DIR = 'local/combined/';
     1136  const OUT_SUB_DIR = PWG_COMBINED_DIR;
    11371137  private $type; // js or css
    11381138  private $files = array();
Note: See TracChangeset for help on using the changeset viewer.