diff --git a/cron/status.cron.php b/cron/status.cron.php old mode 100755 new mode 100644 diff --git a/index.php b/index.php old mode 100755 new mode 100644 diff --git a/install.php b/install.php old mode 100755 new mode 100644 diff --git a/src/bootstrap.php b/src/bootstrap.php old mode 100755 new mode 100644 diff --git a/src/includes/functions.inc.php b/src/includes/functions.inc.php old mode 100755 new mode 100644 diff --git a/src/lang/bg_BG.lang.php b/src/lang/bg_BG.lang.php old mode 100755 new mode 100644 diff --git a/src/lang/de_DE.lang.php b/src/lang/de_DE.lang.php old mode 100755 new mode 100644 diff --git a/src/lang/en_US.lang.php b/src/lang/en_US.lang.php old mode 100755 new mode 100644 diff --git a/src/lang/fr_FR.lang.php b/src/lang/fr_FR.lang.php old mode 100755 new mode 100644 diff --git a/src/lang/ko_KR.lang.php b/src/lang/ko_KR.lang.php old mode 100755 new mode 100644 diff --git a/src/lang/nl_NL.lang.php b/src/lang/nl_NL.lang.php old mode 100755 new mode 100644 diff --git a/src/lang/pt_BR.lang.php b/src/lang/pt_BR.lang.php old mode 100755 new mode 100644 diff --git a/src/psm/Module/AbstractController.class.php b/src/psm/Module/AbstractController.class.php old mode 100755 new mode 100644 index abf295c4..822f6647 --- a/src/psm/Module/AbstractController.class.php +++ b/src/psm/Module/AbstractController.class.php @@ -362,24 +362,33 @@ abstract class AbstractController implements ControllerInterface { /** * Add one or multiple message to the stack to be displayed to the user * @param string|array $msg - * @param string $status success/warning/error + * @param string $shortcode info/success/warning/error * @return \psm\Module\AbstractModule */ - public function addMessage($msg, $status = 'info') { + public function addMessage($msg, $shortcode = 'info') { if(!is_array($msg)) { $msg = array($msg); } - if($status == 'error') { - $shortcode = 'important'; - } else { - $shortcode = $status; + switch($shortcode) { + case 'error': + $icon = 'exclamation-sign'; + break; + case 'success': + $icon = 'ok-sign'; + break; + case 'warning': + $icon = 'question-sign'; + break; + default: + $icon = 'info-sign'; + break; } foreach($msg as $m) { $this->messages[] = array( 'message' => $m, - 'status' => ($status == null) ? '' : strtoupper($status), 'shortcode' => $shortcode, + 'icon' => $icon, ); } return $this; diff --git a/src/psm/Module/Config/ConfigModule.class.php b/src/psm/Module/Config/ConfigModule.class.php old mode 100755 new mode 100644 diff --git a/src/psm/Module/Config/Controller/ConfigController.class.php b/src/psm/Module/Config/Controller/ConfigController.class.php index 6d531e1e..dd21092b 100644 --- a/src/psm/Module/Config/Controller/ConfigController.class.php +++ b/src/psm/Module/Config/Controller/ConfigController.class.php @@ -164,7 +164,7 @@ class ConfigController extends AbstractController { } } - $this->addMessage(psm_get_lang('config', 'updated')); + $this->addMessage(psm_get_lang('config', 'updated'), 'success'); if($clean['language'] != psm_get_conf('language')) { header('Location: ' . $_SERVER['REQUEST_URI']); diff --git a/src/psm/Module/Install/Controller/InstallController.class.php b/src/psm/Module/Install/Controller/InstallController.class.php old mode 100755 new mode 100644 diff --git a/src/psm/Module/Install/InstallModule.class.php b/src/psm/Module/Install/InstallModule.class.php old mode 100755 new mode 100644 diff --git a/src/psm/Module/Server/Controller/AbstractServerController.class.php b/src/psm/Module/Server/Controller/AbstractServerController.class.php old mode 100755 new mode 100644 diff --git a/src/psm/Module/Server/Controller/LogController.class.php b/src/psm/Module/Server/Controller/LogController.class.php old mode 100755 new mode 100644 diff --git a/src/psm/Module/Server/Controller/ServerController.class.php b/src/psm/Module/Server/Controller/ServerController.class.php old mode 100755 new mode 100644 index 2a3a6091..4e740adc --- a/src/psm/Module/Server/Controller/ServerController.class.php +++ b/src/psm/Module/Server/Controller/ServerController.class.php @@ -136,7 +136,7 @@ class ServerController extends AbstractServerController { array('server_id' => $server_id) ); if (empty($edit_server)) { - $this->addMessage('Invalid server id'); + $this->addMessage('Invalid server id', 'error'); return $this->initializeAction('index'); } @@ -191,12 +191,12 @@ class ServerController extends AbstractServerController { $clean, array('server_id' => $server_id) ); - $this->addMessage(psm_get_lang('servers', 'updated')); + $this->addMessage(psm_get_lang('servers', 'updated'), 'success'); } else { // add $clean['status'] = 'on'; $this->db->save(PSM_DB_PREFIX.'servers', $clean); - $this->addMessage(psm_get_lang('servers', 'inserted')); + $this->addMessage(psm_get_lang('servers', 'inserted'), 'success'); } } $this->initializeAction('index'); @@ -210,13 +210,14 @@ class ServerController extends AbstractServerController { $id = intval($_GET['id']); // do delete $res = $this->db->delete(PSM_DB_PREFIX . 'servers', array('server_id' => $id)); - if($res->rowCount() == 1) { + + if($res == 1) { $this->db->delete(PSM_DB_PREFIX.'log', array('server_id' => $id)); $this->db->delete(PSM_DB_PREFIX.'users_servers', array('server_id' => $id)); $this->db->delete(PSM_DB_PREFIX.'servers_uptime', array('server_id' => $id)); $this->db->delete(PSM_DB_PREFIX.'servers_history', array('server_id' => $id)); } - $this->addMessage(psm_get_lang('system', 'deleted')); + $this->addMessage(psm_get_lang('system', 'deleted'), 'success'); } $this->initializeAction('index'); } diff --git a/src/psm/Module/Server/Controller/StatusController.class.php b/src/psm/Module/Server/Controller/StatusController.class.php old mode 100755 new mode 100644 diff --git a/src/psm/Module/User/Controller/UserController.class.php b/src/psm/Module/User/Controller/UserController.class.php old mode 100755 new mode 100644 diff --git a/src/psm/Router.class.php b/src/psm/Router.class.php old mode 100755 new mode 100644 diff --git a/src/psm/Service/Database.class.php b/src/psm/Service/Database.class.php old mode 100755 new mode 100644 diff --git a/src/psm/Service/Template.class.php b/src/psm/Service/Template.class.php old mode 100755 new mode 100644 diff --git a/src/psm/Txtmsg/Clickatell.class.php b/src/psm/Txtmsg/Clickatell.class.php old mode 100755 new mode 100644 diff --git a/src/psm/Txtmsg/Core.class.php b/src/psm/Txtmsg/Core.class.php old mode 100755 new mode 100644 diff --git a/src/psm/Txtmsg/Inetworx.class.php b/src/psm/Txtmsg/Inetworx.class.php old mode 100755 new mode 100644 diff --git a/src/psm/Txtmsg/Mollie.class.php b/src/psm/Txtmsg/Mollie.class.php old mode 100755 new mode 100644 diff --git a/src/psm/Txtmsg/Mosms.class.php b/src/psm/Txtmsg/Mosms.class.php old mode 100755 new mode 100644 diff --git a/src/psm/Txtmsg/Spryng.class.php b/src/psm/Txtmsg/Spryng.class.php old mode 100755 new mode 100644 diff --git a/src/psm/Txtmsg/Textmarketer.php b/src/psm/Txtmsg/Textmarketer.php old mode 100755 new mode 100644 diff --git a/src/psm/Txtmsg/TxtmsgInterface.class.php b/src/psm/Txtmsg/TxtmsgInterface.class.php old mode 100755 new mode 100644 diff --git a/src/psm/Util/Install/Installer.class.php b/src/psm/Util/Install/Installer.class.php old mode 100755 new mode 100644 diff --git a/src/psm/Util/Mailer.class.php b/src/psm/Util/Mailer.class.php old mode 100755 new mode 100644 diff --git a/src/psm/Util/Updater/Autorun.class.php b/src/psm/Util/Updater/Autorun.class.php old mode 100755 new mode 100644 diff --git a/src/psm/Util/Updater/StatusNotifier.class.php b/src/psm/Util/Updater/StatusNotifier.class.php old mode 100755 new mode 100644 diff --git a/src/psm/Util/Updater/StatusUpdater.class.php b/src/psm/Util/Updater/StatusUpdater.class.php old mode 100755 new mode 100644 diff --git a/src/templates/login.tpl.html b/src/templates/login.tpl.html old mode 100644 new mode 100755 index 0e5820d3..2639fb8c --- a/src/templates/login.tpl.html +++ b/src/templates/login.tpl.html @@ -1,15 +1,15 @@