[zi-cvs] packages/com.zzoss.zic setup.php,1.16,1.17
Sandro Zic <[email protected]> Tue, 18 May 2004 16:45:21 +0000
| Newsgroups | gmane.comp.php.zzoss.installer.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/zzossinstaller/packages/com.zzoss.zic
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12149
Modified Files:
setup.php
Log Message:
fix bug: installer installed with instant installer could not detect the installer it was installed with because of double ending slash in application root
Index: setup.php
===================================================================
RCS file: /cvsroot/zzossinstaller/packages/com.zzoss.zic/setup.php,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** setup.php 17 May 2004 11:15:56 -0000 1.16
--- setup.php 18 May 2004 16:45:19 -0000 1.17
***************
*** 29,46 ****
if(!isset($GLOBALS['ZI']['data']) || !strlen($GLOBALS['ZI']['data'])){
- require_once 'themes/setup_header.php';
- echo "<h2>Data Directory</h2>";
echo "<p>You need to set the absolute path to the directory where the installer stores all its data.</p>";
echo "<p>Do this in <code>\$GLOBALS['ZI']['data']</code> of the file '<code>".getcwd().DIRECTORY_SEPARATOR."inc".DIRECTORY_SEPARATOR."config_params.php</code>'.";
echo "<p>For example:</p>";
echo "<pre>\$GLOBALS['ZI']['data'] = '".addslashes(ZZOSS_File::fixPath(dirname($_SERVER['DOCUMENT_ROOT']).DIRECTORY_SEPARATOR."zic_data".DIRECTORY_SEPARATOR))."';</pre>";
- require_once 'themes/setup_footer.php';
exit;
} elseif(!is_writeable($GLOBALS['ZI']['data'].DIRECTORY_SEPARATOR.'.')){
- require_once 'themes/setup_header.php';
- echo "<h2>Data Directory</h2>";
echo "<p>Please make sure that the data directory '<code>".ZZOSS_File::fixPath($GLOBALS['ZI']['data'])."</code>' exists and is writeable.";
echo "<p>Or change the path in <code>\$GLOBALS['ZI']['data']</code> of the file <code>".getcwd().DIRECTORY_SEPARATOR."inc".DIRECTORY_SEPARATOR."config_params.php</code>.";
- require_once 'themes/setup_footer.php';
exit;
}
--- 29,40 ----
***************
*** 55,58 ****
--- 49,63 ----
// within itself and can be updated.
$installs = ZZOSS_InstallerUtils::unserializeFromFile($zi_setup->getDataDir().'.installed_by.reg');
+
+ // workaround for bug:
+ // In versions <= 1.1.0dev1, the application root could be saved unsanitized, e.g. with multiple slashes at the end.
+ // So here we sanitize the paths.
+ if(is_array($installs) && count($installs)){
+ require_once 'ZZOSS_File/File.php';
+ foreach($installs as $key => $val){
+ $installs[ZZOSS_File::fixPath($key)] = $val;
+ }
+ }
+
if(isset($installs[getcwd().DIRECTORY_SEPARATOR])){
$installed_by = $installs[getcwd().DIRECTORY_SEPARATOR];
-------------------------------------------------------
This SF.Net email is sponsored by: SourceForge.net Broadband
Sign-up now for SourceForge Broadband and get the fastest
6.0/768 connection for only $19.95/mo for the first 3 months!
http://ads.osdn.com/?ad_id=2562&alloc_id=6184&op=click