Commit in phpslash-dev on MAIN
CHANGES +5 -1 1.164 -> 1.165
config_setup.php +35 -27 1.19 -> 1.20
config-dist.ini.php +2 -2 1.30 -> 1.31
+42 -30
3 modified files
<pre class="comment">
config-setup.php, config-dist.ini.php - correct check for randomization string. config file saving cleaned up some.
</pre>
<hr /><a name="file1" /><div class="file">
<span class="pathname">phpslash-dev<br /></span>
<div class="fileheader"><big><b>CHANGES</b></big> <small id="info">1.164 -> 1.165</small></div>
<pre class="diff"><small id="info">diff -u -r1.164 -r1.165
--- CHANGES 11 May 2005 19:07:22 -0000 1.164
+++ CHANGES 11 May 2005 21:27:07 -0000 1.165
@@ -1,4 +1,4 @@
</small></pre><pre class="diff" id="removed">-$Id: CHANGES,v 1.164 2005/05/11 19:07:22 joestewart Exp $
</pre><pre class="diff" id="added">+$Id: CHANGES,v 1.165 2005/05/11 21:27:07 joestewart Exp $
</pre><pre class="diff" id="context">
Changes Legend...
</pre><pre class="diff"><small id="info">@@ -13,6 +13,10 @@
</small></pre><pre class="diff" id="context"> 9 - Removal of something (kill -9 :)
2005-May 11 Joe Stewart <jo...@ph...>
</pre><pre class="diff" id="added">+[B] - config-setup.php, config-dist.ini.php - correct check for randomization
+ string. config file saving cleaned up some.
+
+2005-May 11 Joe Stewart <jo...@ph...>
</pre><pre class="diff" id="context"> [B] - Author.class, author/index.php, Story_base.class - correct permission
issues when saving profile and saving stories reported by tobozo and
crashfr.
</pre></div>
<hr /><a name="file2" /><div class="file">
<span class="pathname">phpslash-dev/public_html<br /></span>
<div class="fileheader"><big><b>config_setup.php</b></big> <small id="info">1.19 -> 1.20</small></div>
<pre class="diff"><small id="info">diff -u -r1.19 -r1.20
--- config_setup.php 26 Jan 2005 18:44:40 -0000 1.19
+++ config_setup.php 11 May 2005 21:27:09 -0000 1.20
@@ -2,7 +2,7 @@
</small></pre><pre class="diff" id="context"> /* Back-End configurator 0.4.2
* Evan Hughes (ev...@op...), OpenConcept Consulting
*
</pre><pre class="diff" id="removed">- * $Id: config_setup.php,v 1.<span id="removedchars">19 2005/01/26 18:44:40</span> joestewart Exp $
</pre><pre class="diff" id="added">+ * $Id: config_setup.php,v 1.<span id="addedchars">20 2005/05/11 21:27:09</span> joestewart Exp $
</pre><pre class="diff" id="context"> *
* This is the backend configurator. It's a quick and dirty configuration tool
* designed to be used to configure an initial install of Back-End. It is NOT
</pre><pre class="diff"><small id="info">@@ -45,7 +45,7 @@
</small></pre><pre class="diff" id="context"> define('PSL_INIFILE_PATH','/etc/'.strtolower(PRODUCT).'/'); // Location for phpslash configurations. This is the location that phpslash will fall back to if config.ini.php is not found in "public_html" (the publicly accessible files of phpslash): HINT check config.php for $psl_inifile_path content
define('CONFIG_IN', 'config-dist.ini.php'); // Name of the blank config file.
</pre><pre class="diff" id="removed">-define('CONFIG_OUT', <span id="removedchars">$_SERVER['SERVER_NAME'].'-</span>config.ini.php'); // Name of the target config file. FQDN-config.ini.php or config.ini.php are both good. (where FQDN is: www.domain.com)
</pre><pre class="diff" id="added">+define('CONFIG_OUT', <span id="addedchars">'</span>config.ini.php'); // Name of the target config file. FQDN-config.ini.php or config.ini.php are both good. (where FQDN is: www.domain.com)
</pre><pre class="diff" id="context">
define('TABLE_PATH', '/tables/0.8/'); // Path to the sql table directory.
define('DEBIAN_DOC_PATH', '/usr/share/doc/'.strtolower(PRODUCT).'/'); // Path to the sql table directory under debian (for .deb package. strings are all lowercase)
</pre><pre class="diff"><small id="info">@@ -559,9 +559,9 @@
</small></pre><pre class="diff" id="context"> $vars["/<$name>/"] = $value;
}
</pre><pre class="diff" id="removed">- // Generate a ranom value
- if (!isset($vars['RANDOMIZATION']) || empty($vars['RANDOMIZATION'])) {
- $vars['RANDOMIZATION'] = rand();
</pre><pre class="diff" id="added">+ // Generate a random value
+ if (!isset($vars['/<RANDOMIZATION>/']) || empty($vars['/<RANDOMIZATION>/'])) {
+ $vars['/<RANDOMIZATION>/'] = rand();
</pre><pre class="diff" id="context"> }
$result = _filterFile(CONFIG_IN, CONFIG_OUT, $vars);
</pre><pre class="diff"><small id="info">@@ -1221,11 +1221,15 @@
</small></pre><pre class="diff" id="context"> function _parse_ini_file ($filename)
{
$parse=array();
</pre><pre class="diff" id="removed">- if (!is_file($filename)) {
- // fallback to default multi-hosts localtion:
- $parse = parse_ini_file( PSL_INIFILE_PATH . $filename );
</pre><pre class="diff" id="added">+ if (is_file($filename)) {
+ // found config.ini.php in public_html
+ $parse = parse_ini_file( $filename );
+ } elseif (is_file($_SERVER['SERVER_NAME'].'-'.$filename)) {
+ // found host-config.ini.php in public_html
+ $parse = parse_ini_file($_SERVER['SERVER_NAME'].'-'.$filename );
</pre><pre class="diff" id="context"> } else {
</pre><pre class="diff" id="removed">- $parse = parse_ini_file( $filename );
</pre><pre class="diff" id="added">+ // fallback to default multi-hosts location:
+ $parse = parse_ini_file( PSL_INIFILE_PATH .$_SERVER['SERVER_NAME'].'-'. $filename );
</pre><pre class="diff" id="context"> }
return $parse;
}
</pre><pre class="diff"><small id="info">@@ -1239,28 +1243,32 @@
</small></pre><pre class="diff" id="context">
global $modifiedConfigFile;
</pre><pre class="diff" id="removed">- if (!$in = @fopen($fileIn, "r")) {
- // fallback to default multi-hosts localtion:
- $fileIn = PSL_INIFILE_PATH . $fileIn;
- if (!$in = @fopen($fileIn, "r")) {
- return FF_READ_FAIL;
- }
- }
-
- if (!$out = @fopen($fileOut, "w")) {
- // fallback to default multi-hosts localtion:
- $fileOut = PSL_INIFILE_PATH . $fileOut;
- if (!$out = @fopen($fileOut, "w")) {
- // spit out configuration
- while (!feof ($in)) {
</pre><pre class="diff" id="added">+ if (!$in = @fopen($fileIn, "r")) {
+ // fallback to default multi-hosts localtion:
+ $fileIn = PSL_INIFILE_PATH . $fileIn;
+ if (!$in = @fopen($fileIn, "r")) {
+ return FF_READ_FAIL;
+ }
+ }
+
+ if (!$out = @fopen($fileOut, "w")) {
+ // config.ini.php not found check for host-config.ini.php
+ $fileOut = $_SERVER['SERVER_NAME'].'-'.$fileOut;
+ if (!$out = @fopen($fileOut, "w")) {
+ // fallback to default multi-hosts location:
+ $fileOut = PSL_INIFILE_PATH . $fileOut;
+ if (!$out = @fopen($fileOut, "w")) {
+ // spit out configuration
+ while (!feof ($in)) {
</pre><pre class="diff" id="context"> $buffer = fgets($in);
foreach ($variables as $regex => $replacement) {
</pre><pre class="diff" id="removed">- <span id="removedchars"> </span>$buffer = preg_replace($regex, $replacement, $buffer);
</pre><pre class="diff" id="added">+ $buffer = preg_replace($regex, $replacement, $buffer);
</pre><pre class="diff" id="context"> }
$modifiedConfigFile .= htmlentities($buffer);
</pre><pre class="diff" id="removed">- }
- return FF_WRITE_FAIL;
- }
</pre><pre class="diff" id="added">+ }
+ return FF_WRITE_FAIL;
+ }
+ }
</pre><pre class="diff" id="context"> }
while (!feof ($in)) {
</pre></div>
<hr /><a name="file3" /><div class="file">
<span class="pathname">phpslash-dev/public_html<br /></span>
<div class="fileheader"><big><b>config-dist.ini.php</b></big> <small id="info">1.30 -> 1.31</small></div>
<pre class="diff"><small id="info">diff -u -r1.30 -r1.31
--- config-dist.ini.php 26 Jan 2005 18:44:40 -0000 1.30
+++ config-dist.ini.php 11 May 2005 21:27:09 -0000 1.31
@@ -1,7 +1,7 @@
</small></pre><pre class="diff" id="context"> ; <?php die(); DO NOT REMOVE THIS LINE
;;;;;;;;;;
;; config.ini.php - Configuration File for PHPSlash
</pre><pre class="diff" id="removed">-;; $Id: config-dist.ini.php,v 1.3<span id="removedchars">0 2005/01/26 18:44:40</span> joestewart Exp $
</pre><pre class="diff" id="added">+;; $Id: config-dist.ini.php,v 1.3<span id="addedchars">1 2005/05/11 21:27:09</span> joestewart Exp $
</pre><pre class="diff" id="context"> ;; vi: set ft=dosini :
;;;;;;;;;;
</pre><pre class="diff"><small id="info">@@ -283,7 +283,7 @@
</small></pre><pre class="diff" id="context"> ;; The "skin" is the basic look for your site. PHPSlash ships with two,
;; both HTML 4.0 Transitional. The "basic" skin does all formatting
;; with CSS, whereas the "default" skin uses <font> tags and such.
</pre><pre class="diff" id="removed">-defaultskin = "<span id="removedchars">default</span>"
</pre><pre class="diff" id="added">+defaultskin = "<span id="addedchars">basic</span>"
</pre><pre class="diff" id="context">
;;;
;; Authorization mode:
</pre></div>
http://www.badgers-in-foil.co.uk/projects/cvsspam/ - CVSspam - 0.2.10
|