refactor: remove controls for the IRC bot and proxy scanner
This commit is contained in:
parent
a80d211a41
commit
46df0f2d61
5 changed files with 8 additions and 207 deletions
scripts/lib
|
@ -38,6 +38,12 @@ class config {
|
|||
private static function writeCache($cObj) {
|
||||
$config = &config::$main;
|
||||
|
||||
umask(0007);
|
||||
if (!is_dir(config::$main['cachedir']) && !@mkdir(config::$main['cachedir'], 0770)) {
|
||||
l::warn("CONFIG: failed to create cache directory");
|
||||
return;
|
||||
}
|
||||
|
||||
$text = serialize($cObj);
|
||||
$mask = umask(0002);
|
||||
$w = @file_put_contents("{$config['cachedir']}/config.ser", $text, LOCK_EX);
|
||||
|
|
|
@ -56,7 +56,8 @@ function addRawResource($type, $text) {
|
|||
/** This function generates the cached output for a set of resources.
|
||||
*/
|
||||
function generateResourceCache($type, $md5) {
|
||||
if (!is_dir(config::$main['cachedir']) && !@mkdir(config::$main['cachedir'])) {
|
||||
umask(0007);
|
||||
if (!is_dir(config::$main['cachedir']) && !@mkdir(config::$main['cachedir'], 0770)) {
|
||||
l::warn("Could not create cache dir " . config::$main['cachedir']);
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue