mirror of
https://github.com/hak5/nano-tetra-modules.git
synced 2025-10-29 16:58:09 +00:00
Removed .gitignore files and changed code to create directories
This commit is contained in:
@@ -94,6 +94,9 @@ class PortalAuth extends Module
|
||||
{
|
||||
public function route() {
|
||||
switch($this->request->action) {
|
||||
case 'init':
|
||||
$this->init();
|
||||
break;
|
||||
case 'depends':
|
||||
$this->depends($this->request->params);
|
||||
break;
|
||||
@@ -224,6 +227,19 @@ class PortalAuth extends Module
|
||||
}
|
||||
}
|
||||
|
||||
/* ============================ */
|
||||
/* INIT FUNCTIONS */
|
||||
/* ============================ */
|
||||
|
||||
private function init() {
|
||||
if (!file_exists(__LOGS__)) {
|
||||
if (!mkdir(__LOGS__, 0755, true)) {
|
||||
$this->respond(false, "Failed to create logs directory");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//============================//
|
||||
// DEPENDENCY FUNCTIONS //
|
||||
//============================//
|
||||
|
||||
Reference in New Issue
Block a user