mirror of
https://github.com/HaschekSolutions/pictshare.git
synced 2025-11-15 04:28:01 +00:00
preparations for dynamic data directories
This commit is contained in:
@@ -9,7 +9,7 @@ class TextController implements ContentController
|
||||
|
||||
public function handleHash($hash,$url)
|
||||
{
|
||||
$path = ROOT.DS.'data'.DS.$hash.DS.$hash;
|
||||
$path = getDataDir().DS.$hash.DS.$hash;
|
||||
|
||||
if(in_array('raw',$url))
|
||||
{
|
||||
@@ -50,11 +50,11 @@ class TextController implements ContentController
|
||||
|
||||
storeFile($tmpfile,$hash,true);
|
||||
|
||||
return array('status'=>'ok','hash'=>$hash,'url'=>URL.$hash);
|
||||
return array('status'=>'ok','hash'=>$hash,'url'=>getURL().$hash);
|
||||
}
|
||||
|
||||
function getTypeOfText($hash)
|
||||
{
|
||||
return file_get_contents(ROOT.DS.'data'.DS.$hash.DS.'type');
|
||||
return file_get_contents(getDataDir().DS.$hash.DS.'type');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user