mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-05 02:44:27 +02:00
made rmdir a bit more optimistic. especially it now removes
directories correctly that where created accidently by "safe_mode=On && $use_sub_dirs=true"
This commit is contained in:
@@ -40,18 +40,14 @@ function smarty_core_rmdir($params, &$smarty)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
closedir($_handle);
|
closedir($_handle);
|
||||||
|
}
|
||||||
|
|
||||||
if ($params['level']) {
|
if ($params['level']) {
|
||||||
@rmdir($params['dirname']);
|
return @rmdir($params['dirname']);
|
||||||
}
|
}
|
||||||
|
return (bool)$_handle;
|
||||||
|
|
||||||
return true;
|
|
||||||
|
|
||||||
} else {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* vim: set expandtab: */
|
/* vim: set expandtab: */
|
||||||
|
Reference in New Issue
Block a user