Changeset 1739

Show
Ignore:
Timestamp:
09/03/2008 03:53:30 PM (3 months ago)
Author:
driehle
Message:

Some Bugfixes for old Jlog-Versions

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/admin/update.php

    r1738 r1739  
    77  // load prepend.inc.php 
    88  require_once('..'.DIRECTORY_SEPARATOR.'scripts'.DIRECTORY_SEPARATOR.'prepend.inc.php'); 
    9     
    10   if (!defined(JLOG_LANGUAGE)) { 
    11       define('JLOG_LANGUAGE', 'de'); 
    12   } 
    13    
     9 
    1410  include(JLOG_BASEPATH.'lang'.DIRECTORY_SEPARATOR.'lang.'.JLOG_LANGUAGE.'.inc.php'); 
    1511  include(JLOG_BASEPATH.'lang'.DIRECTORY_SEPARATOR.'lang-admin.'.JLOG_LANGUAGE.'.inc.php'); 
  • trunk/scripts/JlogUpdater.php

    r1738 r1739  
    1515    ); 
    1616     
    17     function JlogUpdater() { 
    18         /** 
    19          * If there is no version information available we think of the installation 
    20          * as of Jlog 1.0.2, which means that it will be impossible to upgrade from any 
    21          * version earlier as 1.0.2 - you MUST upgrade to 1.0.2 before 
    22          * you can install this version of Jlog. 
    23          */ 
    24         if (!defined('JLOG_INSTALLED_VERSION')) { 
    25             define('JLOG_INSTALLED_VERSION', '1.0.2'); 
    26         } 
    27         if (!defined('JLOG_UPDATE')) { 
    28             define('JLOG_UPDATE', true); 
    29         } 
     17    function JlogUpdater()  
     18    { 
     19        // nothing to do here now 
    3020    } 
    3121     
    32     function getOldVersion() { 
     22    function getOldVersion()  
     23    { 
    3324        return JLOG_INSTALLED_VERSION; 
    3425    } 
    3526     
    36     function getNewVersion() { 
     27    function getNewVersion()  
     28    { 
    3729        return JLOG_SOFTWARE_VERSION; 
    3830    } 
    3931     
    40     function isUp2Date() { 
     32    function isUp2Date()  
     33    { 
    4134        if (version_compare($this->getOldVersion(), $this->getNewVersion(), '<')) { 
    4235            return false; 
     
    4538    } 
    4639     
    47     function prepareForm($l) { 
     40    function prepareForm($l)  
     41    { 
    4842        $html = '<form action="' . $_SERVER['SCRIPT_NAME'] . '" method="post">' 
    4943              . '<p>' . $l['admin']['e_admin_password'] . ': ' 
     
    6256    } 
    6357     
    64     function performUpdate($l) { 
     58    function performUpdate($l)  
     59    { 
    6560        if (JLOG_AMDIN_PASSWORD !== md5($_POST['jlog_password']) and JLOG_ADMIN_PASSWORD !== md5(utf8_decode($_POST['jlog_password']))) { 
    6661            return '<p>' . $l['admin']['login_false_pw'] . '</p>'; 
     
    9287    } 
    9388     
    94     function _getUpdateFile($oldver, $newver) { 
     89    function _getUpdateFile($oldver, $newver)  
     90    { 
    9591        $oldver = str_replace('.', '', $oldver); 
    9692        $newver = str_replace('.', '', $newver); 
     
    9894    } 
    9995     
    100     function _getUpdateClass($oldver, $newver) { 
     96    function _getUpdateClass($oldver, $newver)  
     97    { 
    10198        $oldver = str_replace('.', '', $oldver); 
    10299        $newver = str_replace('.', '', $newver); 
     
    104101    } 
    105102     
    106     function _loadUpdateClass($oldver, $newver) { 
     103    function _loadUpdateClass($oldver, $newver)  
     104    { 
    107105        $file = $this->_getUpdateFile($oldver, $newver); 
    108106        $class = $this->_getUpdateClass($oldver, $newver); 
  • trunk/scripts/prepend.inc.php

    r1736 r1739  
    2929require_once(JLOG_BASEPATH."scripts".DIRECTORY_SEPARATOR."version.inc.php"); 
    3030  
     31// these two constants did not exist in Jlog 1.0.2 
     32if (!defined('JLOG_INSTALLED_VERSION')) { 
     33    define('JLOG_INSTALLED_VERSION', '1.0.2'); 
     34} 
     35if (!defined('JLOG_LANGUAGE')) { 
     36    define('JLOG_LANGUAGE', 'de'); 
     37} 
     38 
    3139// redirect to update-script if new jlog version was installed 
    32 if((!defined('JLOG_INSTALLED_VERSION') 
    33   OR version_compare(JLOG_INSTALLED_VERSION, JLOG_SOFTWARE_VERSION, '<')) 
     40if(version_compare(JLOG_INSTALLED_VERSION, JLOG_SOFTWARE_VERSION, '<') 
    3441        AND substr($_SERVER['SCRIPT_FILENAME'], -17) !== '/admin/update.php') 
    3542{