syntax fix, changelog
This commit is contained in:
parent
9a61e8fd48
commit
bde5802a3a
7 changed files with 17 additions and 16 deletions
|
@ -1,6 +1,7 @@
|
|||
# PrivateBin version history
|
||||
|
||||
* **1.4.1 (not yet released)**
|
||||
* ADDED: script for data storage backend migrations (#1012)
|
||||
* ADDED: Translations for Turkish, Slovak and Greek
|
||||
* ADDED: S3 Storage backend (#994)
|
||||
* CHANGED: Avoid `SUPER` privilege for setting the `sql_mode` for MariaDB/MySQL (#919)
|
||||
|
|
|
@ -412,26 +412,26 @@ class Filesystem extends AbstractData
|
|||
$pastes = array();
|
||||
$subdirs = scandir($this->_path);
|
||||
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) {
|
||||
$subpath = $this->_path . DIRECTORY_SEPARATOR . $subdir;
|
||||
|
||||
$subsubdirs = scandir($subpath);
|
||||
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) {
|
||||
$subsubpath = $subpath . DIRECTORY_SEPARATOR . $subsubdir;
|
||||
|
||||
$files = scandir($subsubpath);
|
||||
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) {
|
||||
if (substr($file, 0, 4) === $subdir . $subsubdir) {
|
||||
|
|
|
@ -361,7 +361,7 @@ class GoogleCloudStorage extends AbstractData
|
|||
try {
|
||||
foreach ($this->_bucket->objects(array('prefix' => $prefix)) as $object) {
|
||||
$candidate = substr($object->name(), strlen($prefix));
|
||||
if (strpos($candidate, "/") === false) {
|
||||
if (strpos($candidate, '/') === false) {
|
||||
$pastes[] = $candidate;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -460,8 +460,8 @@ class S3Storage extends AbstractData
|
|||
|
||||
try {
|
||||
foreach ($this->_listAllObjects($prefix) as $object) {
|
||||
$candidate = substr($object["Key"], strlen($prefix));
|
||||
if (strpos($candidate, "/") === false) {
|
||||
$candidate = substr($object['Key'], strlen($prefix));
|
||||
if (strpos($candidate, '/') === false) {
|
||||
$pastes[] = $candidate;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue