From: jerome Date: Mon, 14 Sep 2009 03:43:38 +0000 (+0000) Subject: webservice MDL-12886 fix doc X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=2e1f3939ef664e9a5f42df6725b79b77e74e024a;p=moodle.git webservice MDL-12886 fix doc --- diff --git a/webservice/wsdoc.php b/webservice/wsdoc.php index 5e2c97c933..49b7c892d8 100644 --- a/webservice/wsdoc.php +++ b/webservice/wsdoc.php @@ -74,7 +74,7 @@ function generate_functionlist () { //retrieve all external file $externalfiles = array(); $externalfunctions = array(); - setListApiFiles($externalfiles, $CFG->dirroot); + webservice_lib::setListApiFiles($externalfiles, $CFG->dirroot); foreach ($externalfiles as $file) { require($file); @@ -242,34 +242,3 @@ function converterMoodleParamIntoWsParam($moodleparam) { break; } } - -/** - * Retrieve all external.php from Moodle - * @param array $files - * @param string $directorypath - * @return boolean result true if n - */ -function setListApiFiles( &$files, $directorypath ) { - if(is_dir($directorypath)) { //check that we are browsing a folder not a file - - if( $dh = opendir($directorypath)) { - while( false !== ($file = readdir($dh))) { - - if( $file == '.' || $file == '..') { // Skip '.' and '..' - continue; - } - $path = $directorypath . '/' . $file; - ///browse the subfolder - if( is_dir($path) ) { - setListApiFiles($files, $path); - } - ///retrieve api.php file - else if ($file == "external.php") { - $files[] = $path; - } - } - closedir($dh); - - } - } -}