mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
Merge branch 'MDL-27559-master-v2' of https://github.com/mackensen/moodle
This commit is contained in:
commit
7df271d9b3
6 changed files with 26 additions and 8 deletions
|
@ -8,7 +8,9 @@ defined('MOODLE_INTERNAL') or die('Direct access to this script is forbidden.');
|
|||
require_once($CFG->dirroot.'/backup/bb/xsl_emulate_xslt.inc');
|
||||
|
||||
function get_subdirs($directory){
|
||||
$opendirectory = opendir( $directory );
|
||||
if (!$opendirectory = opendir( $directory )) {
|
||||
return array();
|
||||
}
|
||||
while(false !== ($filename = readdir($opendirectory))) {
|
||||
if (is_dir($directory.$filename) and $filename != ".." and $filename != "."){
|
||||
$subdirs[] = $filename;
|
||||
|
|
|
@ -79,7 +79,9 @@ abstract class backup_general_helper extends backup_helper {
|
|||
return array();
|
||||
}
|
||||
|
||||
$dir = opendir($path);
|
||||
if (!$dir = opendir($path)) {
|
||||
return array();
|
||||
}
|
||||
while (false !== ($file = readdir($dir))) {
|
||||
if ($file == '.' || $file == '..') { // Skip dots
|
||||
continue;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue