Skip to content

Commit

Permalink
webservice MDL-12886 fix doc
Browse files Browse the repository at this point in the history
  • Loading branch information
jerome committed Sep 14, 2009
1 parent b06a2d4 commit 2e1f393
Showing 1 changed file with 1 addition and 32 deletions.
33 changes: 1 addition & 32 deletions webservice/wsdoc.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);

}
}
}

0 comments on commit 2e1f393

Please sign in to comment.