Changeset 1178

Show
Ignore:
Timestamp:
07/04/2008 10:12:57 PM (5 years ago)
Author:
BrianKoontz
Message:

Added arg to arglist to return an error status. Refs #792.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/libs/Wakka.class.php

    r1173 r1178  
    561561         * @param       boolean $makepage       optional: create a "page" div for error; default FALSE 
    562562         * @param       string  $vars   optional: vars to be passed to the file to handle. default: '' 
     563         * @param   boolean  $err    optional: error flag indicating whether or not an error message was returned 
    563564         * @return      string  the included file's output or the $not_found_text if the file could not be found 
    564565         */ 
    565         function IncludeBuffered($filename, $path, $not_found_text, $makepage=FALSE, $vars='') 
     566        function IncludeBuffered($filename, $path, $not_found_text, $makepage=FALSE, $vars='', &$err='') 
    566567        { 
    567568#echo 'IncludeBuffered - filename specified: '.$filename."<br/>\n"; 
     
    583584                                extract($vars, EXTR_SKIP);      // [SEC] EXTR_SKIP avoids collision with existing filenames 
    584585                        } 
     586                        $err = false; 
    585587                        ob_start(); 
    586588                        include $fullfilepath;                  // this is where it all happens! 
     
    593595                        $output = ($makepage) ? '<div class="page"><em class="error">'.$not_found_text.'</em></div>' : '<em class="error">'.$not_found_text.'</em>'; 
    594596                } 
     597                $err = true; 
    595598                return $output; 
    596599        }