|
@@ -409,29 +409,29 @@ class Filesystem extends AbstractData
|
|
|
*/
|
|
*/
|
|
|
public function getAllPastes()
|
|
public function getAllPastes()
|
|
|
{
|
|
{
|
|
|
- $pastes = array();
|
|
|
|
|
|
|
+ $pastes = array();
|
|
|
$subdirs = scandir($this->_path);
|
|
$subdirs = scandir($this->_path);
|
|
|
if ($subdirs === false) {
|
|
if ($subdirs === false) {
|
|
|
- dieerr("Unable to list directory " . $this->_path);
|
|
|
|
|
|
|
+ dieerr('Unable to list directory ' . $this->_path);
|
|
|
}
|
|
}
|
|
|
- $subdirs = preg_grep("/^[^.].$/", $subdirs);
|
|
|
|
|
|
|
+ $subdirs = preg_grep('/^[^.].$/', $subdirs);
|
|
|
|
|
|
|
|
foreach ($subdirs as $subdir) {
|
|
foreach ($subdirs as $subdir) {
|
|
|
$subpath = $this->_path . DIRECTORY_SEPARATOR . $subdir;
|
|
$subpath = $this->_path . DIRECTORY_SEPARATOR . $subdir;
|
|
|
|
|
|
|
|
$subsubdirs = scandir($subpath);
|
|
$subsubdirs = scandir($subpath);
|
|
|
if ($subsubdirs === false) {
|
|
if ($subsubdirs === false) {
|
|
|
- dieerr("Unable to list directory " . $subpath);
|
|
|
|
|
|
|
+ dieerr('Unable to list directory ' . $subpath);
|
|
|
}
|
|
}
|
|
|
- $subsubdirs = preg_grep("/^[^.].$/", $subsubdirs);
|
|
|
|
|
|
|
+ $subsubdirs = preg_grep('/^[^.].$/', $subsubdirs);
|
|
|
foreach ($subsubdirs as $subsubdir) {
|
|
foreach ($subsubdirs as $subsubdir) {
|
|
|
$subsubpath = $subpath . DIRECTORY_SEPARATOR . $subsubdir;
|
|
$subsubpath = $subpath . DIRECTORY_SEPARATOR . $subsubdir;
|
|
|
|
|
|
|
|
$files = scandir($subsubpath);
|
|
$files = scandir($subsubpath);
|
|
|
if ($files === false) {
|
|
if ($files === false) {
|
|
|
- dieerr("Unable to list directory " . $subsubpath);
|
|
|
|
|
|
|
+ dieerr('Unable to list directory ' . $subsubpath);
|
|
|
}
|
|
}
|
|
|
- $files = preg_grep("/\.php$/", $files);
|
|
|
|
|
|
|
+ $files = preg_grep('/\.php$/', $files);
|
|
|
|
|
|
|
|
foreach ($files as $file) {
|
|
foreach ($files as $file) {
|
|
|
if (substr($file, 0, 4) === $subdir . $subsubdir) {
|
|
if (substr($file, 0, 4) === $subdir . $subsubdir) {
|