From 44881bd0f492e789063188af34111af4b4117028 Mon Sep 17 00:00:00 2001
From: "henning.noren" <henning.noren@gmail.com>
Date: Wed, 3 Jan 2007 21:57:00 +0100
Subject: [PATCH] tf_rename_lower.patch

Name the TRUE/FALSE-constants consistently as lowercase everywhere.
This might also be an tiny optimization in some environments.

darcs-hash:20070103205700-d2a3e-e7ec0aedb938d563f583116a2d5b17f3a3fea36c.gz
---
 bin/dwpage.php                          |   2 +-
 bin/wantedpages.php                     |   4 +-
 inc/aspell.php                          |  12 +-
 inc/auth/mysql.class.php                |   2 +-
 inc/auth/pgsql.class.php                |   2 +-
 inc/cliopts.php                         |  14 +--
 inc/parser/handler.php                  | 144 ++++++++++++------------
 inc/parser/metadata.php                 |   2 +-
 inc/parser/parser.php                   |   8 +-
 inc/parser/renderer.php                 |   8 +-
 inc/parser/xhtml.php                    |  10 +-
 inc/parser/xhtmlsummary.php             |  14 +--
 inc/utf8.php                            |  18 +--
 lib/plugins/plugin/inc/TarLib.class.php |   6 +-
 14 files changed, 123 insertions(+), 123 deletions(-)

diff --git a/bin/dwpage.php b/bin/dwpage.php
index ac344dcdf..4f577d633 100755
--- a/bin/dwpage.php
+++ b/bin/dwpage.php
@@ -246,7 +246,7 @@ switch ( $OPTS->arg(0) ) {
             exit(1);
         }
 
-        if ( stristr( realpath(dirname($TARGET_FN)), realpath($conf['datadir']) ) !== FALSE ) {
+        if ( stristr( realpath(dirname($TARGET_FN)), realpath($conf['datadir']) ) !== false ) {
             fwrite( STDERR, "Attempt to check out file into data directory - not allowed\n");
             exit(1);
         }
diff --git a/bin/wantedpages.php b/bin/wantedpages.php
index b94539373..aa0e1818d 100755
--- a/bin/wantedpages.php
+++ b/bin/wantedpages.php
@@ -62,7 +62,7 @@ function dw_get_pages($dir) {
     
     $pages = array();
     $dh = opendir($dir);
-    while ( FALSE !== ( $entry = readdir($dh) ) ) {
+    while ( false !== ( $entry = readdir($dh) ) ) {
         $status = dw_dir_filter($entry, $dir);
         if ( $status == DW_DIR_CONTINUE ) {
             continue;
@@ -86,7 +86,7 @@ function dw_internal_links($page) {
     $instructions = p_get_instructions(file_get_contents($page['file']));
     $links = array();
     $cns = getNS($page['id']);
-    $exists = FALSE;
+    $exists = false;
     foreach($instructions as $ins){
         if($ins[0] == 'internallink' || ($conf['camelcase'] && $ins[0] == 'camelcaselink') ){
             $mid = $ins[1][0];
diff --git a/inc/aspell.php b/inc/aspell.php
index 8c033e2c8..9030d25c7 100644
--- a/inc/aspell.php
+++ b/inc/aspell.php
@@ -234,15 +234,15 @@ class Aspell{
 
         $txOff = 0;
         $txLen = strlen($stdin);
-        $stdoutDone = FALSE;
-        $stderrDone = FALSE;
+        $stdoutDone = false;
+        $stderrDone = false;
 
         stream_set_blocking($pipes[0], 0); // Make stdin/stdout/stderr non-blocking
         stream_set_blocking($pipes[1], 0);
         stream_set_blocking($pipes[2], 0);
 
         if ($txLen == 0) fclose($pipes[0]);
-        while (TRUE) {
+        while (true) {
             $rx = array(); // The program's stdout/stderr
             if (!$stdoutDone) $rx[] = $pipes[1];
             if (!$stderrDone) $rx[] = $pipes[2];
@@ -252,7 +252,7 @@ class Aspell{
 
             if (!empty($tx)) {
                 $txRet = fwrite($pipes[0], substr($stdin, $txOff, 8192));
-                if ($txRet !== FALSE) $txOff += $txRet;
+                if ($txRet !== false) $txOff += $txRet;
                 if ($txOff >= $txLen) fclose($pipes[0]);
             }
 
@@ -261,13 +261,13 @@ class Aspell{
                     $stdout .= fread($pipes[1], 8192);
                     if (feof($pipes[1])) {
                         fclose($pipes[1]);
-                        $stdoutDone = TRUE;
+                        $stdoutDone = true;
                     }
                 } else if ($r == $pipes[2]) {
                     $stderr .= fread($pipes[2], 8192);
                     if (feof($pipes[2])) {
                         fclose($pipes[2]);
-                        $stderrDone = TRUE;
+                        $stderrDone = true;
                     }
                 }
             }
diff --git a/inc/auth/mysql.class.php b/inc/auth/mysql.class.php
index aea11d35f..86a5fefa2 100644
--- a/inc/auth/mysql.class.php
+++ b/inc/auth/mysql.class.php
@@ -24,7 +24,7 @@ class auth_mysql extends auth_basic {
      * Constructor
      *
      * checks if the mysql interface is available, otherwise it will
-     * set the variable $success of the basis class to FALSE
+     * set the variable $success of the basis class to false
      *
      * @author Matthias Grimm <matthiasgrimm@users.sourceforge.net>
      */
diff --git a/inc/auth/pgsql.class.php b/inc/auth/pgsql.class.php
index 60c36e258..cb3d2319f 100644
--- a/inc/auth/pgsql.class.php
+++ b/inc/auth/pgsql.class.php
@@ -20,7 +20,7 @@ class auth_pgsql extends auth_mysql {
      * Constructor
      *
      * checks if the pgsql interface is available, otherwise it will
-     * set the variable $success of the basis class to FALSE
+     * set the variable $success of the basis class to false
      *
      * @author Matthias Grimm <matthiasgrimm@users.sourceforge.net>
      * @author Andreas Gohr <andi@splitbrain.org>
diff --git a/inc/cliopts.php b/inc/cliopts.php
index 074f48772..06167b0bd 100644
--- a/inc/cliopts.php
+++ b/inc/cliopts.php
@@ -31,13 +31,13 @@ if(!defined('DOKU_INC')) define('DOKU_INC',realpath(dirname(__FILE__).'/../').'/
 if (version_compare(phpversion(), '4.3.0', '<') || php_sapi_name() == 'cgi') {
     // Handle output buffering
     @ob_end_flush();
-    ob_implicit_flush(TRUE);
+    ob_implicit_flush(true);
 
     // PHP ini settings
     set_time_limit(0);
-    ini_set('track_errors', TRUE);
-    ini_set('html_errors', FALSE);
-    ini_set('magic_quotes_runtime', FALSE);
+    ini_set('track_errors', true);
+    ini_set('html_errors', false);
+    ini_set('magic_quotes_runtime', false);
 
     // Define stream constants
     define('STDIN', fopen('php://stdin', 'r'));
@@ -306,7 +306,7 @@ class Doku_Cli_Opts_Error {
     }
 
     function isError() {
-        return TRUE;
+        return true;
     }
 
 }
@@ -319,7 +319,7 @@ class Doku_Cli_Opts_Container {
 
     function Doku_Cli_Opts_Container($options) {
         foreach ( $options[0] as $option ) {
-            if ( FALSE !== ( strpos($option[0], '--') ) ) {
+            if ( false !== ( strpos($option[0], '--') ) ) {
                 $opt_name = substr($option[0], 2);
             } else {
                 $opt_name = $option[0];
@@ -356,7 +356,7 @@ class Doku_Cli_Opts_Container {
     }
 
     function isError() {
-        return FALSE;
+        return false;
     }
 
 }
diff --git a/inc/parser/handler.php b/inc/parser/handler.php
index a8a29783c..a5d07a07a 100644
--- a/inc/parser/handler.php
+++ b/inc/parser/handler.php
@@ -10,13 +10,13 @@ class Doku_Handler {
     var $calls = array();
 
     var $status = array(
-        'section' => FALSE,
+        'section' => false,
         'section_edit_start' => -1,
         'section_edit_level' => 1,
         'section_edit_title' => ''
     );
 
-    var $rewriteBlocks = TRUE;
+    var $rewriteBlocks = true;
 
     function Doku_Handler() {
         $this->CallWriter = & new Doku_Handler_CallWriter($this);
@@ -57,7 +57,7 @@ class Doku_Handler {
         if ( $call ) {
             return $call['value'];
         }
-        return FALSE;
+        return false;
     }
 
 
@@ -76,14 +76,14 @@ class Doku_Handler {
             $data = $plugin->handle($match, $state, $pos, $this);
         }
         $this->_addCall('plugin',array($pluginname,$data,$state),$pos);
-        return TRUE;
+        return true;
     }
 
     function base($match, $state, $pos) {
         switch ( $state ) {
             case DOKU_LEXER_UNMATCHED:
                 $this->_addCall('cdata',array($match), $pos);
-                return TRUE;
+                return true;
             break;
 
         }
@@ -111,33 +111,33 @@ class Doku_Handler {
         $this->_addCall('header',array($title,$level,$pos), $pos);
 
         $this->_addCall('section_open',array($level),$pos);
-        $this->status['section'] = TRUE;
-        return TRUE;
+        $this->status['section'] = true;
+        return true;
     }
 
     function notoc($match, $state, $pos) {
         $this->_addCall('notoc',array(),$pos);
-        return TRUE;
+        return true;
     }
 
     function nocache($match, $state, $pos) {
         $this->_addCall('nocache',array(),$pos);
-        return TRUE;
+        return true;
     }
 
     function linebreak($match, $state, $pos) {
         $this->_addCall('linebreak',array(),$pos);
-        return TRUE;
+        return true;
     }
 
     function eol($match, $state, $pos) {
         $this->_addCall('eol',array(),$pos);
-        return TRUE;
+        return true;
     }
 
     function hr($match, $state, $pos) {
         $this->_addCall('hr',array(),$pos);
-        return TRUE;
+        return true;
     }
 
     function _nestingTag($match, $state, $pos, $name) {
@@ -156,37 +156,37 @@ class Doku_Handler {
 
     function strong($match, $state, $pos) {
         $this->_nestingTag($match, $state, $pos, 'strong');
-        return TRUE;
+        return true;
     }
 
     function emphasis($match, $state, $pos) {
         $this->_nestingTag($match, $state, $pos, 'emphasis');
-        return TRUE;
+        return true;
     }
 
     function underline($match, $state, $pos) {
         $this->_nestingTag($match, $state, $pos, 'underline');
-        return TRUE;
+        return true;
     }
 
     function monospace($match, $state, $pos) {
         $this->_nestingTag($match, $state, $pos, 'monospace');
-        return TRUE;
+        return true;
     }
 
     function subscript($match, $state, $pos) {
         $this->_nestingTag($match, $state, $pos, 'subscript');
-        return TRUE;
+        return true;
     }
 
     function superscript($match, $state, $pos) {
         $this->_nestingTag($match, $state, $pos, 'superscript');
-        return TRUE;
+        return true;
     }
 
     function deleted($match, $state, $pos) {
         $this->_nestingTag($match, $state, $pos, 'deleted');
-        return TRUE;
+        return true;
     }
 
 
@@ -227,7 +227,7 @@ class Doku_Handler {
                 $this->_addCall('cdata', array($match), $pos);
             break;
         }
-        return TRUE;
+        return true;
     }
 
     function listblock($match, $state, $pos) {
@@ -250,14 +250,14 @@ class Doku_Handler {
                 $this->_addCall('cdata', array($match), $pos);
             break;
         }
-        return TRUE;
+        return true;
     }
 
     function unformatted($match, $state, $pos) {
         if ( $state == DOKU_LEXER_UNMATCHED ) {
             $this->_addCall('unformatted',array($match), $pos);
         }
-        return TRUE;
+        return true;
     }
 
     function php($match, $state, $pos) {
@@ -269,7 +269,7 @@ class Doku_Handler {
                 $this->_addCall('file',array($match), $pos);
             }
         }
-        return TRUE;
+        return true;
     }
 
     function html($match, $state, $pos) {
@@ -281,7 +281,7 @@ class Doku_Handler {
                 $this->_addCall('file',array($match), $pos);
             }
         }
-        return TRUE;
+        return true;
     }
 
     function preformatted($match, $state, $pos) {
@@ -305,14 +305,14 @@ class Doku_Handler {
             break;
         }
 
-        return TRUE;
+        return true;
     }
 
     function file($match, $state, $pos) {
         if ( $state == DOKU_LEXER_UNMATCHED ) {
             $this->_addCall('file',array($match), $pos);
         }
-        return TRUE;
+        return true;
     }
 
     function quote($match, $state, $pos) {
@@ -342,7 +342,7 @@ class Doku_Handler {
 
         }
 
-        return TRUE;
+        return true;
     }
 
     function code($match, $state, $pos) {
@@ -363,58 +363,58 @@ class Doku_Handler {
                     );
             break;
         }
-        return TRUE;
+        return true;
     }
 
     function acronym($match, $state, $pos) {
         $this->_addCall('acronym',array($match), $pos);
-        return TRUE;
+        return true;
     }
 
     function smiley($match, $state, $pos) {
         $this->_addCall('smiley',array($match), $pos);
-        return TRUE;
+        return true;
     }
 
     function wordblock($match, $state, $pos) {
         $this->_addCall('wordblock',array($match), $pos);
-        return TRUE;
+        return true;
     }
 
     function entity($match, $state, $pos) {
         $this->_addCall('entity',array($match), $pos);
-        return TRUE;
+        return true;
     }
 
     function multiplyentity($match, $state, $pos) {
         preg_match_all('/\d+/',$match,$matches);
         $this->_addCall('multiplyentity',array($matches[0][0],$matches[0][1]), $pos);
-        return TRUE;
+        return true;
     }
 
     function singlequoteopening($match, $state, $pos) {
         $this->_addCall('singlequoteopening',array(), $pos);
-        return TRUE;
+        return true;
     }
 
     function singlequoteclosing($match, $state, $pos) {
         $this->_addCall('singlequoteclosing',array(), $pos);
-        return TRUE;
+        return true;
     }
 
     function doublequoteopening($match, $state, $pos) {
         $this->_addCall('doublequoteopening',array(), $pos);
-        return TRUE;
+        return true;
     }
 
     function doublequoteclosing($match, $state, $pos) {
         $this->_addCall('doublequoteclosing',array(), $pos);
-        return TRUE;
+        return true;
     }
 
     function camelcaselink($match, $state, $pos) {
         $this->_addCall('camelcaselink',array($match), $pos);
-        return TRUE;
+        return true;
     }
 
     /*
@@ -480,17 +480,17 @@ class Doku_Handler {
                 );
         }
 
-        return TRUE;
+        return true;
     }
 
     function filelink($match, $state, $pos) {
         $this->_addCall('filelink',array($match, NULL), $pos);
-        return TRUE;
+        return true;
     }
 
     function windowssharelink($match, $state, $pos) {
         $this->_addCall('windowssharelink',array($match, NULL), $pos);
-        return TRUE;
+        return true;
     }
 
     function media($match, $state, $pos) {
@@ -502,7 +502,7 @@ class Doku_Handler {
                      $p['height'], $p['cache'], $p['linking']),
               $pos
              );
-        return TRUE;
+        return true;
     }
 
     function rss($match, $state, $pos) {
@@ -530,7 +530,7 @@ class Doku_Handler {
         }
 
         $this->_addCall('rss',array($link,$p),$pos);
-        return TRUE;
+        return true;
     }
 
     function externallink($match, $state, $pos) {
@@ -543,13 +543,13 @@ class Doku_Handler {
 
             $this->_addCall('externallink',array($match, NULL), $pos);
         //}
-        return TRUE;
+        return true;
     }
 
     function emaillink($match, $state, $pos) {
         $email = preg_replace(array('/^</','/>$/'),'',$match);
         $this->_addCall('emaillink',array($email, NULL), $pos);
-        return TRUE;
+        return true;
     }
 
     function table($match, $state, $pos) {
@@ -602,7 +602,7 @@ class Doku_Handler {
                 }
             break;
         }
-        return TRUE;
+        return true;
     }
 }
 
@@ -834,12 +834,12 @@ class Doku_Handler_List {
 
     //------------------------------------------------------------------------
     function listEnd($call) {
-        $closeContent = TRUE;
+        $closeContent = true;
 
         while ( $list = array_pop($this->listStack) ) {
             if ( $closeContent ) {
                 $this->listCalls[] = array('listcontent_close',array(),$call[2]);
-                $closeContent = FALSE;
+                $closeContent = false;
             }
             $this->listCalls[] = array('listitem_close',array(),$call[2]);
             $this->listCalls[] = array('list'.$list[0].'_close', array(), $call[2]);
@@ -1115,7 +1115,7 @@ class Doku_Handler_Table {
     var $maxCols = 0;
     var $maxRows = 1;
     var $currentCols = 0;
-    var $firstCell = FALSE;
+    var $firstCell = false;
     var $lastCellType = 'tablecell';
 
     function Doku_Handler_Table(& $CallWriter) {
@@ -1170,7 +1170,7 @@ class Doku_Handler_Table {
     function tableStart($call) {
         $this->tableCalls[] = array('table_open',array(),$call[2]);
         $this->tableCalls[] = array('tablerow_open',array(),$call[2]);
-        $this->firstCell = TRUE;
+        $this->firstCell = true;
     }
 
     function tableEnd($call) {
@@ -1181,7 +1181,7 @@ class Doku_Handler_Table {
     function tableRowOpen($call) {
         $this->tableCalls[] = $call;
         $this->currentCols = 0;
-        $this->firstCell = TRUE;
+        $this->firstCell = true;
         $this->lastCellType = 'tablecell';
         $this->maxRows++;
     }
@@ -1234,7 +1234,7 @@ class Doku_Handler_Table {
 
             $this->tableCalls[] = array($call[0].'_open',array(1,NULL),$call[2]);
             $this->lastCellType = $call[0];
-            $this->firstCell = FALSE;
+            $this->firstCell = false;
 
         }
 
@@ -1294,13 +1294,13 @@ class Doku_Handler_Table {
 
             } else if ( $call[0] == 'colspan' ) {
 
-                $this->tableCalls[$key-1][1][0] = FALSE;
+                $this->tableCalls[$key-1][1][0] = false;
 
                 for($i = $key-2; $i > $lastRow; $i--) {
 
                     if ( $this->tableCalls[$i][0] == 'tablecell_open' || $this->tableCalls[$i][0] == 'tableheader_open' ) {
 
-                        if ( FALSE !== $this->tableCalls[$i][1][0] ) {
+                        if ( false !== $this->tableCalls[$i][1][0] ) {
                             $this->tableCalls[$i][1][0]++;
                             break;
                         }
@@ -1344,7 +1344,7 @@ class Doku_Handler_Section {
     function process($calls) {
 
         $sectionCalls = array();
-        $inSection = FALSE;
+        $inSection = false;
 
         foreach ( $calls as $call ) {
 
@@ -1356,14 +1356,14 @@ class Doku_Handler_Section {
 
                 $sectionCalls[] = $call;
                 $sectionCalls[] = array('section_open',array($call[1][1]), $call[2]);
-                $inSection = TRUE;
+                $inSection = true;
 
             } else {
 
                 if ($call[0] == 'section_open' )  {
-                    $inSection = TRUE;
+                    $inSection = true;
                 } else if ($call[0] == 'section_open' ) {
-                    $inSection = FALSE;
+                    $inSection = false;
                 }
                 $sectionCalls[] = $call;
             }
@@ -1389,8 +1389,8 @@ class Doku_Handler_Block {
 
     var $blockStack = array();
 
-    var $inParagraph = FALSE;
-    var $atStart = TRUE;
+    var $inParagraph = false;
+    var $atStart = true;
     var $skipEolKey = -1;
 
     // Blocks these should not be inside paragraphs
@@ -1478,7 +1478,7 @@ class Doku_Handler_Block {
             }
         }
 
-        $this->inParagraph = FALSE;
+        $this->inParagraph = false;
     }
 
     /**
@@ -1510,7 +1510,7 @@ class Doku_Handler_Block {
                 if ( $cname != 'footnote_open' ) {
                     $this->addToStack();
                 } else {
-                    $this->addToStack(FALSE);
+                    $this->addToStack(false);
                 }
                 continue;
             }
@@ -1540,7 +1540,7 @@ class Doku_Handler_Block {
                             }
 
                             $this->calls[] = array('p_open',array(), $call[2]);
-                            $this->inParagraph = TRUE;
+                            $this->inParagraph = true;
 
 
                             // Mark the next instruction for skipping
@@ -1555,11 +1555,11 @@ class Doku_Handler_Block {
 
                 } else {
 
-                    $storeCall = TRUE;
+                    $storeCall = true;
                     if ( $this->inParagraph && (in_array($cname, $this->blockOpen) && (!$plugin || $plugin_open))) {
                         $this->closeParagraph($call[2]);
                         $this->calls[] = $call;
-                        $storeCall = FALSE;
+                        $storeCall = false;
                     }
 
                     if ( in_array($cname, $this->blockClose) && (!$plugin || $plugin_close)) {
@@ -1568,7 +1568,7 @@ class Doku_Handler_Block {
                         }
                         if ( $storeCall ) {
                             $this->calls[] = $call;
-                            $storeCall = FALSE;
+                            $storeCall = false;
                         }
 
                         // This really sucks and suggests this whole class sucks but...
@@ -1588,7 +1588,7 @@ class Doku_Handler_Block {
                                 ) {
 
                                 $this->calls[] = array('p_open',array(), $call[2]);
-                                $this->inParagraph = TRUE;
+                                $this->inParagraph = true;
                             }
                         }
                     }
@@ -1608,11 +1608,11 @@ class Doku_Handler_Block {
                     if ( $call[0] != 'eol' ) {
                         $this->calls[] = $call;
                     }
-                    $this->atStart = FALSE;
-                    $this->inParagraph = TRUE;
+                    $this->atStart = false;
+                    $this->inParagraph = true;
                 } else {
                     $this->calls[] = $call;
-                    $this->atStart = FALSE;
+                    $this->atStart = false;
                 }
 
             }
@@ -1637,10 +1637,10 @@ class Doku_Handler_Block {
         return $this->calls;
     }
 
-    function addToStack($newStart = TRUE) {
+    function addToStack($newStart = true) {
         $this->blockStack[] = array($this->atStart, $this->inParagraph);
         $this->atStart = $newStart;
-        $this->inParagraph = FALSE;
+        $this->inParagraph = false;
     }
 
     function removeFromStack() {
diff --git a/inc/parser/metadata.php b/inc/parser/metadata.php
index 8c8e0abfe..d818ac337 100644
--- a/inc/parser/metadata.php
+++ b/inc/parser/metadata.php
@@ -398,7 +398,7 @@ class Doku_Renderer_metadata extends Doku_Renderer {
   function _getLinkTitle($title, $default, $id=NULL) {
     global $conf;
 
-    $isImage = FALSE;
+    $isImage = false;
     if (is_null($title)){
       if ($conf['useheading'] && $id){
         $heading = p_get_first_heading($id);
diff --git a/inc/parser/parser.php b/inc/parser/parser.php
index b5fb6ed23..319dfdeed 100644
--- a/inc/parser/parser.php
+++ b/inc/parser/parser.php
@@ -58,12 +58,12 @@ class Doku_Parser {
 
     var $modes = array();
 
-    var $connected = FALSE;
+    var $connected = false;
 
     function addBaseMode(& $BaseMode) {
         $this->modes['base'] = & $BaseMode;
         if ( !$this->Lexer ) {
-            $this->Lexer = & new Doku_Lexer($this->Handler,'base', TRUE);
+            $this->Lexer = & new Doku_Lexer($this->Handler,'base', true);
         }
         $this->modes['base']->Lexer = & $this->Lexer;
     }
@@ -106,7 +106,7 @@ class Doku_Parser {
             $this->modes[$mode]->postConnect();
         }
 
-        $this->connected = TRUE;
+        $this->connected = true;
     }
 
     function parse($doc) {
@@ -118,7 +118,7 @@ class Doku_Parser {
             $this->Handler->_finalize();
             return $this->Handler->calls;
         } else {
-            return FALSE;
+            return false;
         }
     }
 
diff --git a/inc/parser/renderer.php b/inc/parser/renderer.php
index f9dcaab7b..90b0f8627 100644
--- a/inc/parser/renderer.php
+++ b/inc/parser/renderer.php
@@ -12,17 +12,17 @@ require_once DOKU_INC . 'inc/pluginutils.php';
 
 class Doku_Renderer {
     var $info = array(
-        'cache' => TRUE, // may the rendered result cached?
-        'toc'   => TRUE, // render the TOC?
+        'cache' => true, // may the rendered result cached?
+        'toc'   => true, // render the TOC?
     );
 
 
     function nocache() {
-        $this->info['cache'] = FALSE;
+        $this->info['cache'] = false;
     }
 
     function notoc() {
-        $this->info['toc'] = FALSE;
+        $this->info['toc'] = false;
     }
 
     //handle plugin rendering
diff --git a/inc/parser/xhtml.php b/inc/parser/xhtml.php
index 1fadf02c7..088180eef 100644
--- a/inc/parser/xhtml.php
+++ b/inc/parser/xhtml.php
@@ -721,7 +721,7 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
              $link['url'] = ml($src,array('id'=>$ID,'cache'=>$cache),($linking=='direct'));
          }elseif($mime == 'application/x-shockwave-flash'){
              // don't link flash movies
-             $noLink = TRUE;
+             $noLink = true;
          }else{
              // add file icons
              $class = preg_replace('/[^_\-a-z0-9]+/i','_',$ext);
@@ -758,10 +758,10 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
         list($ext,$mime) = mimetype($src);
         if(substr($mime,0,5) == 'image'){
              // link only jpeg images
-             // if ($ext != 'jpg' && $ext != 'jpeg') $noLink = TRUE;
+             // if ($ext != 'jpg' && $ext != 'jpeg') $noLink = true;
         }elseif($mime == 'application/x-shockwave-flash'){
              // don't link flash movies
-             $noLink = TRUE;
+             $noLink = true;
         }else{
              // add file icons
              $link['class'] .= ' mediafile mf_'.$ext;
@@ -1059,7 +1059,7 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
     function _getLinkTitle($title, $default, & $isImage, $id=NULL) {
         global $conf;
 
-        $isImage = FALSE;
+        $isImage = false;
         if ( is_null($title) ) {
             if ($conf['useheading'] && $id) {
                 $heading = p_get_first_heading($id);
@@ -1071,7 +1071,7 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
         } else if ( is_string($title) ) {
             return $this->_xmlEntities($title);
         } else if ( is_array($title) ) {
-            $isImage = TRUE;
+            $isImage = true;
             return $this->_imageTitle($title);
         }
     }
diff --git a/inc/parser/xhtmlsummary.php b/inc/parser/xhtmlsummary.php
index d6e3fc8b9..b82c564ed 100644
--- a/inc/parser/xhtmlsummary.php
+++ b/inc/parser/xhtmlsummary.php
@@ -23,10 +23,10 @@ class Doku_Renderer_xhtmlsummary extends Doku_Renderer_xhtml {
     // Namespace these variables to
     // avoid clashes with parent classes
     var $sum_paragraphs = 0;
-    var $sum_capture = TRUE;
-    var $sum_inSection = FALSE;
+    var $sum_capture = true;
+    var $sum_inSection = false;
     var $sum_summary = '';
-    var $sum_pageTitle = FALSE;
+    var $sum_pageTitle = false;
 
     function document_start() {
         $this->doc .= DOKU_LF.'<div>'.DOKU_LF;
@@ -50,7 +50,7 @@ class Doku_Renderer_xhtmlsummary extends Doku_Renderer_xhtml {
     function header($text, $level, $pos) {
         if ( !$this->sum_pageTitle ) {
             $this->info['sum_pagetitle'] = $text;
-            $this->sum_pageTitle = TRUE;
+            $this->sum_pageTitle = true;
         }
         $this->doc .= DOKU_LF.'<h'.$level.'>';
         $this->doc .= $this->_xmlEntities($text);
@@ -59,14 +59,14 @@ class Doku_Renderer_xhtmlsummary extends Doku_Renderer_xhtml {
 
     function section_open($level) {
         if ( $this->sum_capture ) {
-            $this->sum_inSection = TRUE;
+            $this->sum_inSection = true;
         }
     }
 
     function section_close() {
         if ( $this->sum_capture && $this->sum_inSection ) {
             $this->sum_summary .= $this->doc;
-            $this->sum_capture = FALSE;
+            $this->sum_capture = false;
         }
     }
 
@@ -81,7 +81,7 @@ class Doku_Renderer_xhtmlsummary extends Doku_Renderer_xhtml {
         parent :: p_close();
         if ( $this->sum_capture && $this->sum_paragraphs >= 2 ) {
             $this->sum_summary .= $this->doc;
-            $this->sum_capture = FALSE;
+            $this->sum_capture = false;
         }
     }
 
diff --git a/inc/utf8.php b/inc/utf8.php
index 8da981fd9..d2774fd04 100644
--- a/inc/utf8.php
+++ b/inc/utf8.php
@@ -133,7 +133,7 @@ function utf8_strlen($string){
  * @param string
  * @param integer number of UTF-8 characters offset (from left)
  * @param integer (optional) length in UTF-8 characters from offset
- * @return mixed string or FALSE if failure
+ * @return mixed string or false if failure
  */
 function utf8_substr($str, $offset, $length = null) {
     if(UTF8_MBSTRING){
@@ -249,7 +249,7 @@ function utf8_substr_replace($string, $replacement, $start , $length=0 ){
 function utf8_explode($sep, $str) {
   if ( $sep == '' ) {
     trigger_error('Empty delimiter',E_USER_WARNING);
-    return FALSE;
+    return false;
   }
 
   return preg_split('!'.preg_quote($sep,'!').'!u',$str);
@@ -497,7 +497,7 @@ function utf8_tohtml ($str) {
  * @author Harry Fuecks <hfuecks@gmail.com>
  * @param  string  UTF-8 encoded string
  * @param  boolean Check for invalid sequences?
- * @return mixed array of unicode code points or FALSE if UTF-8 invalid
+ * @return mixed array of unicode code points or false if UTF-8 invalid
  * @see    unicode_to_utf8
  * @link   http://hsivonen.iki.fi/php-utf8/
  * @link   http://sourceforge.net/projects/phputf8/
@@ -576,7 +576,7 @@ function utf8_to_unicode($str,$strict=false) {
                             'in UTF-8 at byte '.$i,
                         E_USER_WARNING
                     );
-                return FALSE;
+                return false;
 
             }
 
@@ -618,7 +618,7 @@ function utf8_to_unicode($str,$strict=false) {
                                     E_USER_WARNING
                                 );
 
-                            return FALSE;
+                            return false;
                         }
 
                     }
@@ -645,7 +645,7 @@ function utf8_to_unicode($str,$strict=false) {
                         E_USER_WARNING
                     );
 
-                return FALSE;
+                return false;
             }
         }
     }
@@ -668,7 +668,7 @@ function utf8_to_unicode($str,$strict=false) {
  *
  * @param  array of unicode code points representing a string
  * @param  boolean Check for invalid sequences?
- * @return mixed UTF-8 string or FALSE if array contains invalid code points
+ * @return mixed UTF-8 string or false if array contains invalid code points
  * @author <hsivonen@iki.fi>
  * @author Harry Fuecks <hfuecks@gmail.com>
  * @see    utf8_to_unicode
@@ -707,7 +707,7 @@ function unicode_to_utf8($arr,$strict=false) {
                         'at index: '.$k.', value: '.$arr[$k],
                     E_USER_WARNING
                     );
-                return FALSE;
+                return false;
             }
 
         # 3 byte sequence
@@ -734,7 +734,7 @@ function unicode_to_utf8($arr,$strict=false) {
                 );
 
             // out of range
-            return FALSE;
+            return false;
         }
     }
 
diff --git a/lib/plugins/plugin/inc/TarLib.class.php b/lib/plugins/plugin/inc/TarLib.class.php
index 270b6e7b6..831ee68e7 100644
--- a/lib/plugins/plugin/inc/TarLib.class.php
+++ b/lib/plugins/plugin/inc/TarLib.class.php
@@ -119,7 +119,7 @@ class TarLib
     return true;
   }
 
-  function sendClient($name = '', $archive = '', $headers = TRUE)
+  function sendClient($name = '', $archive = '', $headers = true)
   {
     if(!$name && !$this->_nomf) return -9;
     if(!$archive && !$this->_memdat) return -10;
@@ -207,7 +207,7 @@ class TarLib
   function TarErrorStr($i)
   {
     $ecodes = Array(
-         1 => TRUE,
+         1 => true,
          0 => "Undocumented error",
         -1 => "Can't use COMPRESS_GZIP compression : ZLIB extensions are not loaded !",
         -2 => "Can't use COMPRESS_BZIP compression : BZ2 extensions are not loaded !",
@@ -474,7 +474,7 @@ class TarLib
       if(!$fp) return false;
      }
 
-     if(!$this->_writeFileHeader($p_fn, $sname, ($data ? strlen($data) : FALSE))) return false;
+     if(!$this->_writeFileHeader($p_fn, $sname, ($data ? strlen($data) : false))) return false;
 
      if(!$data)
      {
-- 
GitLab