Papers, CursedScreech, and Portal Auth Updates (#5)

This commit is contained in:
Nick
2018-01-08 19:11:40 -05:00
committed by Sebastian Kinne
parent e7e15afdcb
commit 1f4f1248a7
27 changed files with 584 additions and 331 deletions

View File

@@ -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 //
//============================//