2012-06-28 Miguel de Dios <miguel.dedios@artica.es>
* include/functions.php: fixed into the function "copy_dir" when pass a empty string or bad directory for source. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6722 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
968c73c184
commit
b3a6e0b669
|
@ -1,3 +1,8 @@
|
|||
2012-06-28 Miguel de Dios <miguel.dedios@artica.es>
|
||||
|
||||
* include/functions.php: fixed into the function "copy_dir" when
|
||||
pass a empty string or bad directory for source.
|
||||
|
||||
2012-06-27 Koichio Kikuchi <koichiro@rworks.jp>
|
||||
|
||||
* pandora_console.redhat.spec: Changed php dependencies so that the
|
||||
|
|
|
@ -1537,18 +1537,22 @@ function get_periods () {
|
|||
* Recursive copy directory
|
||||
*/
|
||||
function copy_dir($src, $dst) {
|
||||
$dir = opendir($src);
|
||||
$dir = opendir($src);
|
||||
|
||||
if (!$dir)
|
||||
return false;
|
||||
|
||||
@mkdir($dst);
|
||||
while(false !== ( $file = readdir($dir)) ) {
|
||||
if (( $file != '.' ) && ( $file != '..' )) {
|
||||
if ( is_dir($src . '/' . $file) ) {
|
||||
while(false !== ( $file = readdir($dir)) ) {
|
||||
if (( $file != '.' ) && ( $file != '..' )) {
|
||||
if ( is_dir($src . '/' . $file) ) {
|
||||
copy_dir($src . '/' . $file,$dst . '/' . $file);
|
||||
}
|
||||
else {
|
||||
else {
|
||||
copy($src . '/' . $file,$dst . '/' . $file);
|
||||
}
|
||||
}
|
||||
}
|
||||
closedir($dir);
|
||||
}
|
||||
?>
|
||||
}
|
||||
?>
|
Loading…
Reference in New Issue