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
7dc20afc3c
commit
453c088c05
|
@ -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>
|
2012-06-27 Koichio Kikuchi <koichiro@rworks.jp>
|
||||||
|
|
||||||
* pandora_console.redhat.spec: Changed php dependencies so that the
|
* pandora_console.redhat.spec: Changed php dependencies so that the
|
||||||
|
|
|
@ -1537,18 +1537,22 @@ function get_periods () {
|
||||||
* Recursive copy directory
|
* Recursive copy directory
|
||||||
*/
|
*/
|
||||||
function copy_dir($src, $dst) {
|
function copy_dir($src, $dst) {
|
||||||
$dir = opendir($src);
|
$dir = opendir($src);
|
||||||
|
|
||||||
|
if (!$dir)
|
||||||
|
return false;
|
||||||
|
|
||||||
@mkdir($dst);
|
@mkdir($dst);
|
||||||
while(false !== ( $file = readdir($dir)) ) {
|
while(false !== ( $file = readdir($dir)) ) {
|
||||||
if (( $file != '.' ) && ( $file != '..' )) {
|
if (( $file != '.' ) && ( $file != '..' )) {
|
||||||
if ( is_dir($src . '/' . $file) ) {
|
if ( is_dir($src . '/' . $file) ) {
|
||||||
copy_dir($src . '/' . $file,$dst . '/' . $file);
|
copy_dir($src . '/' . $file,$dst . '/' . $file);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
copy($src . '/' . $file,$dst . '/' . $file);
|
copy($src . '/' . $file,$dst . '/' . $file);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
closedir($dir);
|
closedir($dir);
|
||||||
}
|
}
|
||||||
?>
|
?>
|
Loading…
Reference in New Issue