diff --git a/Changelog b/Changelog index 94b211129..4624b81ba 100755 --- a/Changelog +++ b/Changelog @@ -1,4 +1,5 @@ 2017-03-23 DariusIII + * Chg: Remove sweetalert update forum theme templates for required fields * Chg: Update composer.lock and .json with new sweetalert and update guzzlehttp 2017-03-22 DariusIII * Chg: Use fancybox for image modals diff --git a/composer.json b/composer.json index 7798764da..9fb394de7 100755 --- a/composer.json +++ b/composer.json @@ -133,7 +133,6 @@ "bower-asset/responsive-tables-js": "~1.0.6", "bower-asset/select2": "~4.0.2", "bower-asset/slimScroll": "~1.3.7", - "bower-asset/sweetalert": "~1.1.1", "bower-asset/tinymce-builded": "~4.4.3", "unionofrad/lithium": "^1.2-dev" }, diff --git a/composer.lock b/composer.lock index 060212a66..18fba0265 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "content-hash": "0728ace17382b1c8cf7e7f44e98432df", + "content-hash": "2dfb9632acbbd60b2d7e98c01570e0b1", "packages": [ { "name": "b3rs3rk/steamfront", @@ -1141,40 +1141,6 @@ "ui" ] }, - { - "name": "bower-asset/sweetalert", - "version": "v1.1.3", - "source": { - "type": "git", - "url": "https://github.com/t4t5/sweetalert.git", - "reference": "3b9d8eb90268e0b1f8f58b2eba240631df0ad18f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/t4t5/sweetalert/zipball/3b9d8eb90268e0b1f8f58b2eba240631df0ad18f", - "reference": "3b9d8eb90268e0b1f8f58b2eba240631df0ad18f", - "shasum": "" - }, - "require-dev": { - "bower-asset/jquery": "~2.1.4", - "bower-asset/qunit": "~1.18.0" - }, - "type": "bower-asset-library", - "extra": { - "bower-asset-main": [ - "dist/sweetalert.min.js", - "dist/sweetalert.css" - ] - }, - "license": [ - "MIT" - ], - "description": "A beautiful replacement for JavaScript's alert.", - "keywords": [ - "alert", - "modal" - ] - }, { "name": "bower-asset/tinymce-builded", "version": "4.4.3", diff --git a/www/pages/BasePage.php b/www/pages/BasePage.php index 385ae59a8..cdd8aac18 100644 --- a/www/pages/BasePage.php +++ b/www/pages/BasePage.php @@ -106,7 +106,7 @@ class BasePage NN_WWW . 'plugins/', SMARTY_DIR . 'plugins/', ]); - $this->smarty->error_reporting = ((NN_DEBUG ? E_ALL : E_ALL - E_NOTICE)); + $this->smarty->error_reporting = (NN_DEBUG ? E_ALL : E_ALL - E_NOTICE); if (isset($_SERVER['SERVER_NAME'])) { $this->serverurl = ( @@ -117,7 +117,7 @@ class BasePage $this->smarty->assign('serverroot', $this->serverurl); } - $this->page = (isset($_GET['page'])) ? $_GET['page'] : 'content'; + $this->page = $_GET['page'] ?? 'content'; $this->users = new Users(['Settings' => $this->settings]); if ($this->users->isLoggedIn()) { diff --git a/www/pages/forum.php b/www/pages/forum.php index 519cfd30e..202e5a3fb 100644 --- a/www/pages/forum.php +++ b/www/pages/forum.php @@ -10,28 +10,26 @@ if (!$page->users->isLoggedIn()) { } if ($page->isPostBack()) { - if (!isset($_POST['addSubject']) || empty($_POST['addSubject'])) { - $page->show403(); - } - if (!isset($_POST['addMessage']) || empty($_POST['addMessage'])) { - $page->show403(); - } - $forum->add(0, $page->users->currentUserId(), $_POST['addSubject'], $_POST['addMessage']); header('Location:'.WWW_TOP.'/forum'); die(); } -if (!empty($_GET['lock']) || !empty($_GET['unlock'])) { +$lock = $unlock = null; + +if (!empty($_GET['lock'])) { $lock = $_GET['lock']; +} + +if (!empty($_GET['unlock'])) { $unlock = $_GET['unlock']; } -if (isset($lock)) { +if ($lock !== null) { $forum->lockUnlockTopic($lock, 1); header('Location:' . WWW_TOP . '/forum'); die(); -} elseif (isset($unlock)) { +} elseif ($unlock !== null) { $forum->lockUnlockTopic($unlock, 0); header('Location:' . WWW_TOP . '/forum'); die(); diff --git a/www/themes/Charisma/templates/forum.tpl b/www/themes/Charisma/templates/forum.tpl index 427db2be5..f720b5e7a 100755 --- a/www/themes/Charisma/templates/forum.tpl +++ b/www/themes/Charisma/templates/forum.tpl @@ -87,14 +87,14 @@