I have made changes and it seems to work fine for language files, database connection settings and configuration settings, but I still have problems with CSS files.
Here are the changes I made:
$ svn diff include/constants.php include/template.class.php
Index: include/constants.php
===================================================================
--- include/constants.php (revision 8719)
+++ include/constants.php (working copy)
@@ -27,6 +27,7 @@
define('PHPWG_DEFAULT_TEMPLATE', 'Sylvia');
define('PHPWG_THEMES_PATH', $conf['themes_dir'].'/');
+define('PWG_COMBINED_DIR', PWG_LOCAL_DIR.'combined/');
// Required versions
define('REQUIRED_PHP_VERSION', '5.0.0');
Index: include/template.class.php
===================================================================
--- include/template.class.php (revision 8719)
+++ include/template.class.php (working copy)
@@ -797,13 +797,13 @@
$css = array();
foreach ($smarty->get_template_vars('themes') as $theme)
{
- $f = 'local/css/'.$theme['id'].'-rules.css';
+ $f = PWG_LOCAL_DIR.'css/'.$theme['id'].'-rules.css';
if (file_exists(PHPWG_ROOT_PATH.$f))
{
array_push($css, "{combine_css path='$f' order=10}");
}
}
- $f = 'local/css/rules.css';
+ $f = PWG_LOCAL_DIR.'css/rules.css';
if (file_exists(PHPWG_ROOT_PATH.$f))
{
array_push($css, "{combine_css path='$f' order=10}");
@@ -1133,7 +1133,7 @@
/*Allows merging of javascript and css files into a single one.*/
final class FileCombiner
{
- const OUT_SUB_DIR = 'local/combined/';
+ const OUT_SUB_DIR = PWG_COMBINED_DIR;
private $type; // js or css
private $files = array();
private $versions = array();
but:
[pierrick@pierrick-desktop] ~/public_html/piwigo/dev/trunk
$ cat local/combined/uw2xo6.css | grep '^\/*BEGIN'
/*BEGIN themes/default/theme.css */
/*BEGIN themes/default/print.css */
/*BEGIN themes/clear/theme.css */
/*BEGIN local2/css/clear-rules.css */
/*BEGIN local2/css/rules.css */
the
local combined script uses the
local2 CSS files :-/