diff options
Diffstat (limited to 'admin')
-rw-r--r-- | admin/auth.php | 2 | ||||
-rw-r--r-- | admin/category/delete.php | 4 | ||||
-rw-r--r-- | admin/category/index.php | 8 | ||||
-rw-r--r-- | admin/category/insert.php | 12 | ||||
-rw-r--r-- | admin/category/update.php | 12 | ||||
-rw-r--r-- | admin/database.php | 8 | ||||
-rw-r--r-- | admin/index.php | 10 | ||||
-rw-r--r-- | admin/page/delete.php | 4 | ||||
-rw-r--r-- | admin/page/index.php | 6 | ||||
-rw-r--r-- | admin/page/insert.php | 10 | ||||
-rw-r--r-- | admin/page/search.php | 4 | ||||
-rw-r--r-- | admin/page/update.php | 10 | ||||
-rw-r--r-- | admin/post/delete.php | 4 | ||||
-rw-r--r-- | admin/post/index.php | 6 | ||||
-rw-r--r-- | admin/post/insert.php | 12 | ||||
-rw-r--r-- | admin/post/search.php | 4 | ||||
-rw-r--r-- | admin/post/update.php | 12 | ||||
-rw-r--r-- | admin/user/delete.php | 4 | ||||
-rw-r--r-- | admin/user/index.php | 6 | ||||
-rw-r--r-- | admin/user/insert.php | 16 | ||||
-rw-r--r-- | admin/user/update.php | 16 |
21 files changed, 85 insertions, 85 deletions
diff --git a/admin/auth.php b/admin/auth.php index 68b07a4..3b272f0 100644 --- a/admin/auth.php +++ b/admin/auth.php @@ -2,7 +2,7 @@ #=============================================================================== # DEFINE: Administration #=============================================================================== -const ADMINISTRATION = TRUE; +const ADMINISTRATION = true; #=============================================================================== # INCLUDE: Initialization diff --git a/admin/category/delete.php b/admin/category/delete.php index c443c4a..167067e 100644 --- a/admin/category/delete.php +++ b/admin/category/delete.php @@ -2,8 +2,8 @@ #=============================================================================== # DEFINE: Administration #=============================================================================== -const ADMINISTRATION = TRUE; -const AUTHENTICATION = TRUE; +const ADMINISTRATION = true; +const AUTHENTICATION = true; #=============================================================================== # INCLUDE: Initialization diff --git a/admin/category/index.php b/admin/category/index.php index 35a78c3..fd7eef6 100644 --- a/admin/category/index.php +++ b/admin/category/index.php @@ -2,8 +2,8 @@ #=============================================================================== # DEFINE: Administration #=============================================================================== -const ADMINISTRATION = TRUE; -const AUTHENTICATION = TRUE; +const ADMINISTRATION = true; +const AUTHENTICATION = true; #=============================================================================== # INCLUDE: Initialization @@ -33,7 +33,7 @@ if($count === 0) { HTTP::redirect(Application::getAdminURL('category/insert.php')); } -if($currentSite < 1 OR ($currentSite > $lastSite AND $lastSite > 0)) { +if($currentSite < 1 or ($currentSite > $lastSite and $lastSite > 0)) { Application::error404(); } @@ -44,7 +44,7 @@ $categories = $CategoryRepository->getPaginatedTree( $site_size, ($currentSite-1) * $site_size); foreach($categories as $Category) { - $templates[] = generateCategoryItemTemplate($Category, TRUE); + $templates[] = generateCategoryItemTemplate($Category, true); } #=============================================================================== diff --git a/admin/category/insert.php b/admin/category/insert.php index c63ad06..d68aa72 100644 --- a/admin/category/insert.php +++ b/admin/category/insert.php @@ -2,8 +2,8 @@ #=============================================================================== # DEFINE: Administration #=============================================================================== -const ADMINISTRATION = TRUE; -const AUTHENTICATION = TRUE; +const ADMINISTRATION = true; +const AUTHENTICATION = true; #=============================================================================== # INCLUDE: Initialization @@ -24,11 +24,11 @@ $Category = new ORM\Entities\Category; # Check for insert request #=============================================================================== if(HTTP::issetPOST('insert')) { - $Category->set('parent', HTTP::POST('parent') ?: NULL); + $Category->set('parent', HTTP::POST('parent') ?: null); $Category->set('slug', HTTP::POST('slug') ?: generateSlug(HTTP::POST('name'))); - $Category->set('name', HTTP::POST('name') ?: NULL); - $Category->set('body', HTTP::POST('body') ?: NULL); - $Category->set('argv', HTTP::POST('argv') ?: NULL); + $Category->set('name', HTTP::POST('name') ?: null); + $Category->set('body', HTTP::POST('body') ?: null); + $Category->set('argv', HTTP::POST('argv') ?: null); $Category->set('time_insert', HTTP::POST('time_insert') ?: date('Y-m-d H:i:s')); $Category->set('time_update', HTTP::POST('time_update') ?: date('Y-m-d H:i:s')); diff --git a/admin/category/update.php b/admin/category/update.php index c3d9812..80423c8 100644 --- a/admin/category/update.php +++ b/admin/category/update.php @@ -2,8 +2,8 @@ #=============================================================================== # DEFINE: Administration #=============================================================================== -const ADMINISTRATION = TRUE; -const AUTHENTICATION = TRUE; +const ADMINISTRATION = true; +const AUTHENTICATION = true; #=============================================================================== # INCLUDE: Initialization @@ -27,15 +27,15 @@ if(!$Category = $CategoryRepository->find(HTTP::GET('id'))) { #=============================================================================== if(HTTP::issetPOST('update')) { $Category->set('slug', HTTP::POST('slug') ?: generateSlug(HTTP::POST('name'))); - $Category->set('name', HTTP::POST('name') ?: NULL); - $Category->set('body', HTTP::POST('body') ?: NULL); - $Category->set('argv', HTTP::POST('argv') ?: NULL); + $Category->set('name', HTTP::POST('name') ?: null); + $Category->set('body', HTTP::POST('body') ?: null); + $Category->set('argv', HTTP::POST('argv') ?: null); $Category->set('time_insert', HTTP::POST('time_insert') ?: date('Y-m-d H:i:s')); $Category->set('time_update', HTTP::POST('time_update') ?: date('Y-m-d H:i:s')); # Modify parent field only if it is not a self-reference if(HTTP::POST('parent') != $Category->getID()) { - $Category->set('parent', HTTP::POST('parent') ?: NULL); + $Category->set('parent', HTTP::POST('parent') ?: null); } if(HTTP::issetPOST(['token' => Application::getSecurityToken()])) { diff --git a/admin/database.php b/admin/database.php index 1d3404f..fa37d1c 100644 --- a/admin/database.php +++ b/admin/database.php @@ -2,8 +2,8 @@ #=============================================================================== # DEFINE: Administration #=============================================================================== -const ADMINISTRATION = TRUE; -const AUTHENTICATION = TRUE; +const ADMINISTRATION = true; +const AUTHENTICATION = true; #=============================================================================== # INCLUDE: Initialization @@ -19,7 +19,7 @@ if(HTTP::issetPOST('command')) { $Statement = $Database->query(HTTP::POST('command')); do { - $result[] = print_r($Statement->fetchAll(), TRUE); + $result[] = print_r($Statement->fetchAll(), true); } while($Statement->nextRowset()); } catch(PDOException $Exception) { $messages[] = $Exception->getMessage(); @@ -36,7 +36,7 @@ $DatabaseTemplate = Template\Factory::build('database'); $DatabaseTemplate->set('FORM', [ 'INFO' => $messages ?? [], 'TOKEN' => Application::getSecurityToken(), - 'RESULT' => implode(NULL, $result ?? []), + 'RESULT' => implode(null, $result ?? []), 'COMMAND' => HTTP::POST('command'), ]); diff --git a/admin/index.php b/admin/index.php index 09c126d..ca8bd5a 100644 --- a/admin/index.php +++ b/admin/index.php @@ -2,8 +2,8 @@ #=============================================================================== # DEFINE: Administration #=============================================================================== -const ADMINISTRATION = TRUE; -const AUTHENTICATION = TRUE; +const ADMINISTRATION = true; +const AUTHENTICATION = true; #=============================================================================== # INCLUDE: Initialization @@ -39,9 +39,9 @@ if($User = $UserRepository->getLast()) { #=============================================================================== $HomeTemplate = Template\Factory::build('home'); $HomeTemplate->set('LAST', [ - 'PAGE' => $PageItemTemplate ?? FALSE, - 'POST' => $PostItemTemplate ?? FALSE, - 'USER' => $UserItemTemplate ?? FALSE + 'PAGE' => $PageItemTemplate ?? false, + 'POST' => $PostItemTemplate ?? false, + 'USER' => $UserItemTemplate ?? false ]); $HomeTemplate->set('COUNT', [ diff --git a/admin/page/delete.php b/admin/page/delete.php index 8542187..a0924c8 100644 --- a/admin/page/delete.php +++ b/admin/page/delete.php @@ -2,8 +2,8 @@ #=============================================================================== # DEFINE: Administration #=============================================================================== -const ADMINISTRATION = TRUE; -const AUTHENTICATION = TRUE; +const ADMINISTRATION = true; +const AUTHENTICATION = true; #=============================================================================== # INCLUDE: Initialization diff --git a/admin/page/index.php b/admin/page/index.php index 7586d3c..b533cf3 100644 --- a/admin/page/index.php +++ b/admin/page/index.php @@ -2,8 +2,8 @@ #=============================================================================== # DEFINE: Administration #=============================================================================== -const ADMINISTRATION = TRUE; -const AUTHENTICATION = TRUE; +const ADMINISTRATION = true; +const AUTHENTICATION = true; #=============================================================================== # INCLUDE: Initialization @@ -35,7 +35,7 @@ if(!$count) { HTTP::redirect(Application::getAdminURL('page/insert.php')); } -if($currentSite < 1 OR ($currentSite > $lastSite AND $lastSite > 0)) { +if($currentSite < 1 or ($currentSite > $lastSite and $lastSite > 0)) { Application::error404(); } diff --git a/admin/page/insert.php b/admin/page/insert.php index 915fee5..7577433 100644 --- a/admin/page/insert.php +++ b/admin/page/insert.php @@ -2,8 +2,8 @@ #=============================================================================== # DEFINE: Administration #=============================================================================== -const ADMINISTRATION = TRUE; -const AUTHENTICATION = TRUE; +const ADMINISTRATION = true; +const AUTHENTICATION = true; #=============================================================================== # INCLUDE: Initialization @@ -27,9 +27,9 @@ $Page = new ORM\Entities\Page; if(HTTP::issetPOST('insert')) { $Page->set('user', HTTP::POST('user')); $Page->set('slug', HTTP::POST('slug') ?: generateSlug(HTTP::POST('name'))); - $Page->set('name', HTTP::POST('name') ?: NULL); - $Page->set('body', HTTP::POST('body') ?: NULL); - $Page->set('argv', HTTP::POST('argv') ?: NULL); + $Page->set('name', HTTP::POST('name') ?: null); + $Page->set('body', HTTP::POST('body') ?: null); + $Page->set('argv', HTTP::POST('argv') ?: null); $Page->set('time_insert', HTTP::POST('time_insert') ?: date('Y-m-d H:i:s')); $Page->set('time_update', HTTP::POST('time_update') ?: date('Y-m-d H:i:s')); diff --git a/admin/page/search.php b/admin/page/search.php index c9a39cf..7310e2a 100644 --- a/admin/page/search.php +++ b/admin/page/search.php @@ -2,8 +2,8 @@ #=============================================================================== # DEFINE: Administration #=============================================================================== -const ADMINISTRATION = TRUE; -const AUTHENTICATION = TRUE; +const ADMINISTRATION = true; +const AUTHENTICATION = true; #=============================================================================== # INCLUDE: Initialization diff --git a/admin/page/update.php b/admin/page/update.php index 8f6cb0e..e123205 100644 --- a/admin/page/update.php +++ b/admin/page/update.php @@ -2,8 +2,8 @@ #=============================================================================== # DEFINE: Administration #=============================================================================== -const ADMINISTRATION = TRUE; -const AUTHENTICATION = TRUE; +const ADMINISTRATION = true; +const AUTHENTICATION = true; #=============================================================================== # INCLUDE: Initialization @@ -29,9 +29,9 @@ if(!$Page = $PageRepository->find(HTTP::GET('id'))) { if(HTTP::issetPOST('update')) { $Page->set('user', HTTP::POST('user')); $Page->set('slug', HTTP::POST('slug') ?: generateSlug(HTTP::POST('name'))); - $Page->set('name', HTTP::POST('name') ?: NULL); - $Page->set('body', HTTP::POST('body') ?: NULL); - $Page->set('argv', HTTP::POST('argv') ?: NULL); + $Page->set('name', HTTP::POST('name') ?: null); + $Page->set('body', HTTP::POST('body') ?: null); + $Page->set('argv', HTTP::POST('argv') ?: null); $Page->set('time_insert', HTTP::POST('time_insert') ?: date('Y-m-d H:i:s')); $Page->set('time_update', HTTP::POST('time_update') ?: date('Y-m-d H:i:s')); diff --git a/admin/post/delete.php b/admin/post/delete.php index 501cae4..6358af3 100644 --- a/admin/post/delete.php +++ b/admin/post/delete.php @@ -2,8 +2,8 @@ #=============================================================================== # DEFINE: Administration #=============================================================================== -const ADMINISTRATION = TRUE; -const AUTHENTICATION = TRUE; +const ADMINISTRATION = true; +const AUTHENTICATION = true; #=============================================================================== # INCLUDE: Initialization diff --git a/admin/post/index.php b/admin/post/index.php index 2da0f81..b25bde5 100644 --- a/admin/post/index.php +++ b/admin/post/index.php @@ -2,8 +2,8 @@ #=============================================================================== # DEFINE: Administration #=============================================================================== -const ADMINISTRATION = TRUE; -const AUTHENTICATION = TRUE; +const ADMINISTRATION = true; +const AUTHENTICATION = true; #=============================================================================== # INCLUDE: Initialization @@ -35,7 +35,7 @@ if(!$count) { HTTP::redirect(Application::getAdminURL('post/insert.php')); } -if($currentSite < 1 OR ($currentSite > $lastSite AND $lastSite > 0)) { +if($currentSite < 1 or ($currentSite > $lastSite and $lastSite > 0)) { Application::error404(); } diff --git a/admin/post/insert.php b/admin/post/insert.php index 1b04ecc..af70b1e 100644 --- a/admin/post/insert.php +++ b/admin/post/insert.php @@ -2,8 +2,8 @@ #=============================================================================== # DEFINE: Administration #=============================================================================== -const ADMINISTRATION = TRUE; -const AUTHENTICATION = TRUE; +const ADMINISTRATION = true; +const AUTHENTICATION = true; #=============================================================================== # INCLUDE: Initialization @@ -26,12 +26,12 @@ $Post = new ORM\Entities\Post; # Check for insert request #=============================================================================== if(HTTP::issetPOST('insert')) { - $Post->set('category', HTTP::POST('category') ?: NULL); + $Post->set('category', HTTP::POST('category') ?: null); $Post->set('user', HTTP::POST('user')); $Post->set('slug', HTTP::POST('slug') ?: generateSlug(HTTP::POST('name'))); - $Post->set('name', HTTP::POST('name') ?: NULL); - $Post->set('body', HTTP::POST('body') ?: NULL); - $Post->set('argv', HTTP::POST('argv') ?: NULL); + $Post->set('name', HTTP::POST('name') ?: null); + $Post->set('body', HTTP::POST('body') ?: null); + $Post->set('argv', HTTP::POST('argv') ?: null); $Post->set('time_insert', HTTP::POST('time_insert') ?: date('Y-m-d H:i:s')); $Post->set('time_update', HTTP::POST('time_update') ?: date('Y-m-d H:i:s')); diff --git a/admin/post/search.php b/admin/post/search.php index 5ec7ddc..2d29966 100644 --- a/admin/post/search.php +++ b/admin/post/search.php @@ -2,8 +2,8 @@ #=============================================================================== # DEFINE: Administration #=============================================================================== -const ADMINISTRATION = TRUE; -const AUTHENTICATION = TRUE; +const ADMINISTRATION = true; +const AUTHENTICATION = true; #=============================================================================== # INCLUDE: Initialization diff --git a/admin/post/update.php b/admin/post/update.php index 5241d38..e9736c9 100644 --- a/admin/post/update.php +++ b/admin/post/update.php @@ -2,8 +2,8 @@ #=============================================================================== # DEFINE: Administration #=============================================================================== -const ADMINISTRATION = TRUE; -const AUTHENTICATION = TRUE; +const ADMINISTRATION = true; +const AUTHENTICATION = true; #=============================================================================== # INCLUDE: Initialization @@ -28,12 +28,12 @@ if(!$Post = $PostRepository->find(HTTP::GET('id'))) { # Check for update request #=============================================================================== if(HTTP::issetPOST('update')) { - $Post->set('category', HTTP::POST('category') ?: NULL); + $Post->set('category', HTTP::POST('category') ?: null); $Post->set('user', HTTP::POST('user')); $Post->set('slug', HTTP::POST('slug') ?: generateSlug(HTTP::POST('name'))); - $Post->set('name', HTTP::POST('name') ?: NULL); - $Post->set('body', HTTP::POST('body') ?: NULL); - $Post->set('argv', HTTP::POST('argv') ?: NULL); + $Post->set('name', HTTP::POST('name') ?: null); + $Post->set('body', HTTP::POST('body') ?: null); + $Post->set('argv', HTTP::POST('argv') ?: null); $Post->set('time_insert', HTTP::POST('time_insert') ?: date('Y-m-d H:i:s')); $Post->set('time_update', HTTP::POST('time_update') ?: date('Y-m-d H:i:s')); diff --git a/admin/user/delete.php b/admin/user/delete.php index 1a7628c..64085a7 100644 --- a/admin/user/delete.php +++ b/admin/user/delete.php @@ -2,8 +2,8 @@ #=============================================================================== # DEFINE: Administration #=============================================================================== -const ADMINISTRATION = TRUE; -const AUTHENTICATION = TRUE; +const ADMINISTRATION = true; +const AUTHENTICATION = true; #=============================================================================== # INCLUDE: Initialization diff --git a/admin/user/index.php b/admin/user/index.php index d2bee8d..fe7f1ab 100644 --- a/admin/user/index.php +++ b/admin/user/index.php @@ -2,8 +2,8 @@ #=============================================================================== # DEFINE: Administration #=============================================================================== -const ADMINISTRATION = TRUE; -const AUTHENTICATION = TRUE; +const ADMINISTRATION = true; +const AUTHENTICATION = true; #=============================================================================== # INCLUDE: Initialization @@ -34,7 +34,7 @@ if(!$count) { HTTP::redirect(Application::getAdminURL('user/insert.php')); } -if($currentSite < 1 OR ($currentSite > $lastSite AND $lastSite > 0)) { +if($currentSite < 1 or ($currentSite > $lastSite and $lastSite > 0)) { Application::error404(); } diff --git a/admin/user/insert.php b/admin/user/insert.php index c337e21..a943e13 100644 --- a/admin/user/insert.php +++ b/admin/user/insert.php @@ -2,8 +2,8 @@ #=============================================================================== # DEFINE: Administration #=============================================================================== -const ADMINISTRATION = TRUE; -const AUTHENTICATION = TRUE; +const ADMINISTRATION = true; +const AUTHENTICATION = true; #=============================================================================== # INCLUDE: Initialization @@ -25,12 +25,12 @@ $User = new ORM\Entities\User; #=============================================================================== if(HTTP::issetPOST('insert')) { $User->set('slug', HTTP::POST('slug') ?: generateSlug(HTTP::POST('username'))); - $User->set('username', HTTP::POST('username') ?: NULL); - $User->set('password', HTTP::POST('password') ? password_hash(HTTP::POST('password'), PASSWORD_BCRYPT, ['cost' => 10]) : FALSE); - $User->set('fullname', HTTP::POST('fullname') ?: NULL); - $User->set('mailaddr', HTTP::POST('mailaddr') ?: NULL); - $User->set('body', HTTP::POST('body') ?: NULL); - $User->set('argv', HTTP::POST('argv') ?: NULL); + $User->set('username', HTTP::POST('username') ?: null); + $User->set('password', HTTP::POST('password') ? password_hash(HTTP::POST('password'), PASSWORD_BCRYPT, ['cost' => 10]) : false); + $User->set('fullname', HTTP::POST('fullname') ?: null); + $User->set('mailaddr', HTTP::POST('mailaddr') ?: null); + $User->set('body', HTTP::POST('body') ?: null); + $User->set('argv', HTTP::POST('argv') ?: null); $User->set('time_insert', HTTP::POST('time_insert') ?: date('Y-m-d H:i:s')); $User->set('time_update', HTTP::POST('time_update') ?: date('Y-m-d H:i:s')); diff --git a/admin/user/update.php b/admin/user/update.php index edd2bc1..cc24a23 100644 --- a/admin/user/update.php +++ b/admin/user/update.php @@ -2,8 +2,8 @@ #=============================================================================== # DEFINE: Administration #=============================================================================== -const ADMINISTRATION = TRUE; -const AUTHENTICATION = TRUE; +const ADMINISTRATION = true; +const AUTHENTICATION = true; #=============================================================================== # INCLUDE: Initialization @@ -27,12 +27,12 @@ if(!$User = $UserRepository->find(HTTP::GET('id'))) { #=============================================================================== if(HTTP::issetPOST('update')) { $User->set('slug', HTTP::POST('slug') ?: generateSlug(HTTP::POST('username'))); - $User->set('username', HTTP::POST('username') ?: NULL); - $User->set('password', HTTP::POST('password') ? password_hash(HTTP::POST('password'), PASSWORD_BCRYPT, ['cost' => 10]) : FALSE); - $User->set('fullname', HTTP::POST('fullname') ?: NULL); - $User->set('mailaddr', HTTP::POST('mailaddr') ?: NULL); - $User->set('body', HTTP::POST('body') ?: NULL); - $User->set('argv', HTTP::POST('argv') ?: NULL); + $User->set('username', HTTP::POST('username') ?: null); + $User->set('password', HTTP::POST('password') ? password_hash(HTTP::POST('password'), PASSWORD_BCRYPT, ['cost' => 10]) : false); + $User->set('fullname', HTTP::POST('fullname') ?: null); + $User->set('mailaddr', HTTP::POST('mailaddr') ?: null); + $User->set('body', HTTP::POST('body') ?: null); + $User->set('argv', HTTP::POST('argv') ?: null); $User->set('time_insert', HTTP::POST('time_insert') ?: date('Y-m-d H:i:s')); $User->set('time_update', HTTP::POST('time_update') ?: date('Y-m-d H:i:s')); |