diff options
author | mattab <matthieu.aubry@gmail.com> | 2013-03-28 03:42:39 +0400 |
---|---|---|
committer | mattab <matthieu.aubry@gmail.com> | 2013-03-28 03:42:40 +0400 |
commit | ae4b03163792f0b6e933933e5d37df87dc3fd566 (patch) | |
tree | d1d7510a9728f587d3d63ebd03e4ecf3d904838b /misc/others/uninstall-delete-piwik-directory.php | |
parent | 158c2150f5f2e13ece459b8d131244c11b763997 (diff) |
Mass conversion of all files to the newly agreed coding standard: PSR 1/2
Converting Piwik core source files, PHP, JS, TPL, CSS
More info: http://piwik.org/participate/coding-standards/
Diffstat (limited to 'misc/others/uninstall-delete-piwik-directory.php')
-rw-r--r-- | misc/others/uninstall-delete-piwik-directory.php | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/misc/others/uninstall-delete-piwik-directory.php b/misc/others/uninstall-delete-piwik-directory.php index b51ae63577..e05f70259c 100644 --- a/misc/others/uninstall-delete-piwik-directory.php +++ b/misc/others/uninstall-delete-piwik-directory.php @@ -9,18 +9,18 @@ // please let us know at hello@piwik.org - we are interested by your experience function unlinkRecursive($dir) { - if(!$dh = @opendir($dir)) return "Warning: folder $dir couldn't be read by PHP"; - while (false !== ($obj = readdir($dh))) { - if($obj == '.' || $obj == '..') { - continue; - } - if (!@unlink($dir . '/' . $obj)) { - unlinkRecursive($dir.'/'.$obj, true); - } - } - closedir($dh); - @rmdir($dir); - return "Folder $dir deleted!"; + if (!$dh = @opendir($dir)) return "Warning: folder $dir couldn't be read by PHP"; + while (false !== ($obj = readdir($dh))) { + if ($obj == '.' || $obj == '..') { + continue; + } + if (!@unlink($dir . '/' . $obj)) { + unlinkRecursive($dir . '/' . $obj, true); + } + } + closedir($dh); + @rmdir($dir); + return "Folder $dir deleted!"; } echo unlinkRecursive('piwik/'); |