Changeset 5544

Show
Ignore:
Timestamp:
12/19/07 17:18:10 (5 years ago)
Author:
p_lindheimer
Message:

#2575 check if out, etc. functions exist in case run from CLI

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/branches/2.4/framework/install.php

    r4526 r5544  
    8787} 
    8888 
    89 function out($text) { 
    90   echo $text."<br>"; 
     89if (! function_exists("out")) { 
     90  function out($text) { 
     91    echo $text."<br>"; 
     92  } 
    9193} 
    9294 
    93 function outn($text) { 
    94   echo $text; 
     95if (! function_exists("outn")) { 
     96  function outn($text) { 
     97    echo $text; 
     98  } 
    9599} 
    96100 
    97 function error($text) { 
    98   echo "[ERROR] ".$text."<br>"; 
     101if (! function_exists("error")) { 
     102  function error($text) { 
     103    echo "[ERROR] ".$text."<br>"; 
     104  } 
    99105} 
    100106 
    101 function fatal($text) { 
    102   echo "[FATAL] ".$text."<br>"; 
    103   exit(1); 
     107if (! function_exists("fatal")) { 
     108  function fatal($text) { 
     109    echo "[FATAL] ".$text."<br>"; 
     110    exit(1); 
     111  } 
    104112} 
    105113 
    106 function debug($text) { 
    107   global $debug; 
    108    
    109   if ($debug) echo "[DEBUG-preDB] ".$text."<br>"; 
     114if (! function_exists("debug")) { 
     115  function debug($text) { 
     116    global $debug; 
     117     
     118    if ($debug) echo "[DEBUG-preDB] ".$text."<br>"; 
     119  } 
    110120} 
    111121?>