Setup/FileGen (#390)
* directories should probably have write permissions * add forgotten directory for guide image storage
This commit is contained in:
parent
b125e55a4a
commit
d0e5bec845
2 changed files with 9 additions and 7 deletions
|
|
@ -457,6 +457,7 @@ class Timer
|
|||
abstract class Util
|
||||
{
|
||||
const FILE_ACCESS = 0755;
|
||||
const DIR_ACCESS = 0777;
|
||||
|
||||
const GEM_SCORE_BASE_WOTLK = 16; // rare quality wotlk gem score
|
||||
const GEM_SCORE_BASE_BC = 8; // rare quality bc gem score
|
||||
|
|
@ -1392,13 +1393,13 @@ abstract class Util
|
|||
|
||||
if (is_dir($dir))
|
||||
{
|
||||
if (!is_writable($dir) && !@chmod($dir, Util::FILE_ACCESS))
|
||||
if (!is_writable($dir) && !@chmod($dir, Util::DIR_ACCESS))
|
||||
trigger_error('cannot write into directory', E_USER_ERROR);
|
||||
|
||||
return is_writable($dir);
|
||||
}
|
||||
|
||||
if (@mkdir($dir, Util::FILE_ACCESS, true))
|
||||
if (@mkdir($dir, Util::DIR_ACCESS, true))
|
||||
return true;
|
||||
|
||||
trigger_error('could not create directory', E_USER_ERROR);
|
||||
|
|
|
|||
|
|
@ -49,12 +49,13 @@ class FileGen
|
|||
public static $defaultExecTime = 30;
|
||||
|
||||
private static $reqDirs = array(
|
||||
'static/uploads/screenshots/normal',
|
||||
'static/uploads/screenshots/pending',
|
||||
'static/uploads/screenshots/resized',
|
||||
'static/uploads/screenshots/temp',
|
||||
'static/uploads/screenshots/thumb',
|
||||
'static/uploads/screenshots/normal/',
|
||||
'static/uploads/screenshots/pending/',
|
||||
'static/uploads/screenshots/resized/',
|
||||
'static/uploads/screenshots/temp/',
|
||||
'static/uploads/screenshots/thumb/',
|
||||
'static/uploads/temp/',
|
||||
'static/uploads/guide/images/',
|
||||
'static/download/searchplugins/',
|
||||
'static/wowsounds/'
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue