Changeset 1025

Show
Ignore:
Timestamp:
03/30/2008 11:23:56 AM (15 months ago)
Author:
BrianKoontz
Message:

Installer was failing when both WAKKA_VERSION and wakka_version were
set to the same annotated trunk-r<ver> format. Refs #719

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/wikka.php

    r1024 r1025  
    806806// "trunk_r1009", we only want to compare against "trunk").  
    807807$version1 = preg_split('/-|_/', WAKKA_VERSION); 
    808 $version2 = preg_split('/-|_/', $wakkaConfig['wakka_version']); 
     808// There is some weirdness with the way PHP either (1) returns from 
     809// preg_replace when the search string is "0", or (2) a type 
     810// comparison beetween a string and an integer 0.  In any case,  
     811// remove the if clause below at your own risk. 
     812if(0 === $wakkaConfig['wakka_version']) 
     813{ 
     814        $version2[0] = $wakkaConfig['wakka_version']; 
     815} 
     816else     
     817{ 
     818        $version2 = preg_split('/-|_/', $wakkaConfig['wakka_version']); 
     819} 
    809820if ( $version1[0] !== $version2[0] ) 
     821//if($wakkaConfig['wakka_version'] !== WAKKA_VERSION) 
    810822{ 
    811823        // set up (intended) config location for the installer 
    812824        #$wakkaConfigLocation = SITE_CONFIGFILE;                // @@@ use directly in installer 
    813 if ($debug) echo 'site configuration file (to be) lodated at: '.SITE_CONFIGFILE."<br/>\n"; 
     825        if ($debug) echo 'site configuration file (to be) lodated at: '.SITE_CONFIGFILE."<br/>\n"; 
    814826        $htaccessLocation = str_replace('\\', '/', dirname(__FILE__)).DIRECTORY_SEPARATOR.'.htaccess'; 
    815827        #if (file_exists('setup'.DIRECTORY_SEPARATOR.'index.php'))      #89