mirror of
https://github.com/friendica/friendica
synced 2025-04-27 17:10:10 +00:00
Address code standards issues
This commit is contained in:
parent
12dd7b552f
commit
9317a1c054
6 changed files with 53 additions and 44 deletions
|
@ -15,18 +15,22 @@ namespace Friendica\Model\Storage;
|
|||
class SystemResource implements IStorage
|
||||
{
|
||||
// Valid folders to look for resources
|
||||
const VALID_FOLDERS = [ "images" ];
|
||||
const VALID_FOLDERS = ["images"];
|
||||
|
||||
public static function get($filename)
|
||||
{
|
||||
$folder = dirname($filename);
|
||||
if (!in_array($folder, self::VALID_FOLDERS)) return "";
|
||||
if (!file_exists($filename)) return "";
|
||||
if (!in_array($folder, self::VALID_FOLDERS)) {
|
||||
return "";
|
||||
}
|
||||
if (!file_exists($filename)) {
|
||||
return "";
|
||||
}
|
||||
return file_get_contents($filename);
|
||||
}
|
||||
|
||||
|
||||
public static function put($data, $filename=null)
|
||||
public static function put($data, $filename="")
|
||||
{
|
||||
throw new \BadMethodCallException();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue