Changeset 30310 for documentation/trunk

Show
Ignore:
Timestamp:
04.11.2015 13:59:07 (4 years ago)
Author:
jmt12
Message:

Replaced conditional using the result of function calls, with a version that stores intermediate results in a variable before comparison in order to be compatible with PHP 5.3.3

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • documentation/trunk/wiki/plugins/greenstonedocs/syntax.php

    r30226 r30310  
    3434 
    3535        $this->target_namespace_prefix = $this->getConf('currentnamespace'); 
    36  
    3736        // Prerequisite testing. Ensure the following list of plugins are also 
    3837        // installed and complain otherwise. 
     
    7170        // matically update the internal links within the Greenstone wiki pages 
    7271        // to have a different base namespace 
    73         if ($this->getConf('updatenamespace')) 
     72        $update_namespace = $this->getConf('updatenamespace'); 
     73        if ($update_namespace != 0) 
    7474        { 
    7575            // Determine the starting point for the update 
    7676            $base_dir = DOKU_INC . 'data/pages/'; 
    77             if (!empty($this->getConf('currentnamespace'))) 
    78             { 
    79                 $base_dir .= $this->getConf('currentnamespace') . '/'; 
    80             } 
    8177            // - ensure trailing : for consistency in namespaces 
    8278            $current_namespace = $this->getConf('currentnamespace'); 
     79            if (!empty($current_namespace)) 
     80            { 
     81                $base_dir .= $current_namespace . '/'; 
     82            } 
    8383            if (strlen($current_namespace) > 0 && substr($current_namespace, -1) != ':') 
    8484            {