X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=gen_function_list.php;h=c04d2e3d1538ca82961905e729bd63fd977e1356;hb=e5223264a2ba4928ce785cb736ee971f86ec73de;hp=59da554f383b56d92bcdbf03fce903ad9aa66333;hpb=85609fd3b27c7a70931c738111dbc00116cbebbb;p=gosa.git diff --git a/gen_function_list.php b/gen_function_list.php index 59da554f3..c04d2e3d1 100755 --- a/gen_function_list.php +++ b/gen_function_list.php @@ -3,7 +3,7 @@ /* /* * This code is part of GOsa (https://gosa.gonicus.de) - * Copyright (C) 2003 Cajus Pollmeier + * Copyright (C) 2005 Jan Wenzel * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -20,23 +20,14 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* This file builds a list of used php_functions in all files matching $pattern - * (walks recursively through current directory but skips dirs matching $skip_dirs). - * - * 1. builds an array of filenames - * 2. get contents from files - * 2. fetches user defined functions using content - * 3. fetches functions calls using content - * 4. checks function calls for matching known functions - */ - -include('include/functions_test.inc'); +$current_dir=trim(`pwd`); +include($current_dir.'/include/functions_test.inc'); // Build Array of called functions -$array= test_defined_functions('./'); +$array= test_defined_functions(); // Write List to file -$file= 'include/functions_list.inc'; +$file= $current_dir.'/include/functions_list.inc'; // If file does not exist, create it if(!file_exists($file)) { @@ -48,7 +39,7 @@ if(is_writable($file)) { // Open filehandle $fh= fopen($file,'w'); if($fh != null) { - fwrite($fh,""); + fwrite($fh,"return(\n".var_export($array,true).");"); fclose($fh); } }