- moved all View related stuff from ACP3_CMS class to ACP3_View class

- some other minor fixes and enhancements
parent 31a4c888
......@@ -5,7 +5,4 @@
height: 45px;
background: url('img/logo.png') no-repeat;
text-indent: -9999px;
}
.nav-list {
margin: 0;
}
\ No newline at end of file
......@@ -44,40 +44,6 @@ class ACP3_CMS {
* @var \ACP3_View
*/
public static $view;
/**
* @var string
*/
private static $content = '';
/**
* Weist dem Template den auszugebenden Inhalt zu
*
* @param string $data
*/
public static function setContent($data)
{
self::$content = $data;
}
/**
* Fügt weitere Daten an den Seiteninhalt an
*
* @param string $data
*/
public static function appendContent($data)
{
self::$content.= $data;
}
/**
* Gibt den auszugebenden Seiteninhalt zurück
*
* @return string
*/
public static function getContent()
{
return self::$content;
}
/**
* Führt alle nötigen Schritte aus, um die Seite anzuzeigen
......@@ -249,12 +215,14 @@ class ACP3_CMS {
switch (ACP3_Modules::check()) {
// Seite ausgeben
case 1:
// Content-Template automatisch setzen
self::$view->setContentTemplate(self::$uri->mod . '/' . self::$uri->file . '.tpl');
require MODULES_DIR . self::$uri->mod . '/' . self::$uri->file . '.php';
if (self::$view->getNoOutput() === false) {
if (self::$content === '') {
self::setContent(self::$view->fetchTemplate(self::$view->getContentTemplate()));
if (self::$view->getContent() === '') {
self::$view->setContent(self::$view->fetchTemplate(self::$view->getContentTemplate()));
}
// Evtl. gesetzten Content-Type des Servers überschreiben
......@@ -266,7 +234,7 @@ class ACP3_CMS {
self::$view->assign('TITLE', self::$breadcrumb->output(2));
self::$view->assign('BREADCRUMB', self::$breadcrumb->output());
self::$view->assign('META', ACP3_SEO::getMetaTags());
self::$view->assign('CONTENT', self::$content);
self::$view->assign('CONTENT', self::$view->getContent());
$minify = self::$view->buildMinifyLink();
$file = self::$view->getLayout();
......@@ -276,7 +244,7 @@ class ACP3_CMS {
self::$view->displayTemplate($file);
} else {
echo self::$content;
echo self::$view->getContent();
}
}
break;
......
......@@ -42,6 +42,13 @@ class ACP3_View
*/
private $content_template = '';
/**
* Der auszugebende Seiteninhalt
*
* @var string
*/
private $content = '';
/**
* Legt fest, welche JavaScript Bibliotheken beim Seitenaufruf geladen werden sollen
*
......@@ -130,6 +137,36 @@ class ACP3_View
return $this->content_template;
}
/**
* Weist dem Template den auszugebenden Inhalt zu
*
* @param string $data
*/
public function setContent($data)
{
$this->content = $data;
}
/**
* Fügt weitere Daten an den Seiteninhalt an
*
* @param string $data
*/
public function appendContent($data)
{
$this->content.= $data;
}
/**
* Gibt den auszugebenden Seiteninhalt zurück
*
* @return string
*/
public function getContent()
{
return $this->content;
}
/**
*
* @return object
......
......@@ -315,7 +315,7 @@ function setRedirectMessage($success, $text, $path, $overlay = false)
'text' => $text
);
if ($overlay === true) {
ACP3_CMS::setContent(ACP3_CMS::$view->fetchTemplate('system/close_overlay.tpl'));
ACP3_CMS::$view->setContent(ACP3_CMS::$view->fetchTemplate('system/close_overlay.tpl'));
} else {
ACP3_CMS::$uri->redirect($path);
}
......
......@@ -114,159 +114,4 @@ if (!function_exists("json_encode")) {
return kcfinder_json_string_encode($data);
}
}
class ACP3_Session {
/**
* Name der Session
*/
const SESSION_NAME = 'ACP3_SID';
/**
* Name des XSRF-Token
*/
const XSRF_TOKEN_NAME = 'security_token';
/**
* Zeit, bis Session ungültig wird
*
* @var integer
*/
public $expire_time = 1800;
/**
* Wahrscheinlichkeit, dass Session Garbage Collector anspringt
*
* @var integer
*/
public $gc_probability = 10;
public function __construct() {
// php.ini Session Einstellungen konfigurieren
ini_set('session.name', self::SESSION_NAME);
ini_set('session.use_trans_sid', 0);
ini_set('session.use_cookies', 1);
ini_set('session.use_only_cookies', 1);
ini_set('session.cookie_httponly', 1);
// Session GC
ini_set('session.gc_maxlifetime', $this->expire_time);
ini_set('session.gc_probability', $this->gc_probability);
ini_set('session.gc_divisor', 100);
// Eigene Session Handling Methoden setzen
ini_set('session.save_handler', 'user');
session_set_save_handler(
array($this, 'session_open'),
array($this, 'session_close'),
array($this, 'session_read'),
array($this, 'session_write'),
array($this, 'session_destroy'),
array($this, 'session_gc')
);
// Session starten und anschließend sichern
self::startSession();
self::secureSession();
register_shutdown_function('session_write_close');
}
/**
* Session starten
*/
private static function startSession() {
// Session Cookie Parameter setzen
session_set_cookie_params(0, ROOT_DIR);
// Session starten
session_start();
}
/**
* Sichert die aktuelle Session
*
* @param boolean $force
*/
public static function secureSession($force = false) {
// Session Fixation verhindern
if (isset($_SESSION['acp3_init']) === false || $force === true) {
session_regenerate_id(true);
$_SESSION = array();
$_SESSION['acp3_init'] = true;
}
}
/**
* Öffnet eine Session
*
* @return true
*/
public function session_open() {
return true;
}
/**
* Schließt eine Session
*
* @return true
*/
public function session_close() {
return true;
}
/**
* Liest eine Session aus der Datenbank
*
* @param integer $session_id
* @return string
*/
public function session_read($session_id) {
$session = ACP3_CMS::$db2->fetchAssoc('SELECT session_data FROM ' . DB_PRE . 'sessions WHERE session_id = ?', array($session_id));
// Wenn keine Session gefunden wurde, dann einen leeren String zurückgeben
return !empty($session) ? $session['session_data'] : '';
}
/**
* Session in Datenbank schreiben
*
* @param integer $session_id
* @param array $data Enthält die Session-Daten
*
* @return bool
*/
public function session_write($session_id, $data) {
ACP3_CMS::$db2->executeUpdate('INSERT INTO ' . DB_PRE . 'sessions (session_id, session_starttime, session_data) VALUES (?, ?, ?) ON DUPLICATE KEY UPDATE session_data = ?', array($session_id, time(), $data, $data));
return true;
}
/**
* Aktuelle Session löschen
*
* @param integer $session_id
*/
public function session_destroy($session_id) {
// Alle gesetzten Session Variablen zurücksetzen
$_SESSION = array();
// Session-Cookie löschen
if (isset($_COOKIE[self::SESSION_NAME]))
setcookie(self::SESSION_NAME, '', time() - 3600, ROOT_DIR);
// Session aus Datenbank löschen
ACP3_CMS::$db2->delete(DB_PRE . 'sessions', array('session_id' => $session_id));
}
/**
* Session Garbage Collector
*
* @param integer $session_lifetime Angaben in Sekunden
*
* @return boolean
*/
public function session_gc($session_lifetime = 1800) {
if ($session_lifetime == 0)
return;
ACP3_CMS::$db2->executeUpdate('DELETE FROM ' . DB_PRE . 'sessions WHERE session_starttime + ? < ?', array($session_lifetime, time()));
return true;
}
}
?>
\ No newline at end of file
......@@ -11,42 +11,42 @@ function CheckAuthentication($acp3_path) {
if (!isset($authenticated)) {
$current_cwd = getcwd();
$current_cwd = getcwd();
define('IN_ACP3', true);
if (!defined('ACP3_ROOT'))
define('ACP3_ROOT', $acp3_path);
define('IN_ACP3', true);
if (!defined('ACP3_ROOT'))
define('ACP3_ROOT', $acp3_path);
require_once ACP3_ROOT . 'includes/bootstrap.php';
require_once ACP3_ROOT . 'includes/bootstrap.php';
ACP3_CMS::defineDirConstants();
ACP3_CMS::includeAutoLoader();
ACP3_CMS::initializeDoctrineDBAL();
ACP3_CMS::initializeClasses();
// Simulate being in the drupal root folder so we can share the session
chdir(ACP3_ROOT);
ACP3_CMS::defineDirConstants();
ACP3_CMS::includeAutoLoader();
ACP3_CMS::initializeDoctrineDBAL();
ACP3_CMS::initializeClasses();
// if user has access permission...
if (ACP3_CMS::$auth->isUser()) {
if (!isset($_SESSION['KCFINDER'])) {
$_SESSION['KCFINDER'] = array();
$_SESSION['KCFINDER']['disabled'] = false;
}
// Simulate being in the drupal root folder so we can share the session
chdir(ACP3_ROOT);
// User has permission, so make sure KCFinder is not disabled!
if (!isset($_SESSION['KCFINDER']['disabled'])) {
$_SESSION['KCFINDER']['disabled'] = false;
}
chdir($current_cwd);
// if user has access permission...
if (ACP3_CMS::$auth->isUser()) {
if (!isset($_SESSION['KCFINDER'])) {
$_SESSION['KCFINDER'] = array();
$_SESSION['KCFINDER']['disabled'] = false;
}
return true;
// User has permission, so make sure KCFinder is not disabled!
if (!isset($_SESSION['KCFINDER']['disabled'])) {
$_SESSION['KCFINDER']['disabled'] = false;
}
chdir($current_cwd);
return false;
return true;
}
chdir($current_cwd);
return false;
}
}
CheckAuthentication(get_acp3_path());
......
......@@ -46,7 +46,7 @@ if (isset($_POST['submit']) === true) {
if (isset($errors) === true) {
ACP3_CMS::$view->assign('error_msg', errorBox($errors));
} elseif (ACP3_Validate::formToken() === false) {
ACP3_CMS::setContent(errorBox(ACP3_CMS::$lang->t('system', 'form_already_submitted')));
ACP3_CMS::$view->setContent(errorBox(ACP3_CMS::$lang->t('system', 'form_already_submitted')));
} else {
$insert_values = array(
'id' => '',
......
......@@ -16,10 +16,10 @@ elseif (ACP3_Validate::deleteEntries(ACP3_CMS::$uri->entries) === true)
$entries = ACP3_CMS::$uri->entries;
if (!isset($entries)) {
ACP3_CMS::setContent(errorBox(ACP3_CMS::$lang->t('system', 'no_entries_selected')));
ACP3_CMS::$view->setContent(errorBox(ACP3_CMS::$lang->t('system', 'no_entries_selected')));
} elseif (is_array($entries) === true) {
$marked_entries = implode('|', $entries);
ACP3_CMS::setContent(confirmBox(ACP3_CMS::$lang->t('system', 'confirm_delete'), ACP3_CMS::$uri->route('acp/articles/delete/entries_' . $marked_entries . '/action_confirmed/'), ACP3_CMS::$uri->route('acp/articles')));
ACP3_CMS::$view->setContent(confirmBox(ACP3_CMS::$lang->t('system', 'confirm_delete'), ACP3_CMS::$uri->route('acp/articles/delete/entries_' . $marked_entries . '/action_confirmed/'), ACP3_CMS::$uri->route('acp/articles')));
} elseif (ACP3_CMS::$uri->action === 'confirmed') {
$marked_entries = explode('|', $entries);
$bool = false;
......
......@@ -28,7 +28,7 @@ if (ACP3_Validate::isNumber(ACP3_CMS::$uri->id) === true &&
if (isset($errors) === true) {
ACP3_CMS::$view->assign('error_msg', errorBox($errors));
} elseif (ACP3_Validate::formToken() === false) {
ACP3_CMS::setContent(errorBox(ACP3_CMS::$lang->t('system', 'form_already_submitted')));
ACP3_CMS::$view->setContent(errorBox(ACP3_CMS::$lang->t('system', 'form_already_submitted')));
} else {
$update_values = array(
'start' => ACP3_CMS::$date->toSQL($_POST['start']),
......
......@@ -23,11 +23,11 @@ if ($c_articles > 0) {
'sort_dir' => 'asc',
'hide_col_sort' => $can_delete === true ? 0 : ''
);
ACP3_CMS::setContent(datatable($config));
ACP3_CMS::$view->setContent(datatable($config));
for ($i = 0; $i < $c_articles; ++$i) {
$articles[$i]['period'] = ACP3_CMS::$date->formatTimeRange($articles[$i]['start'], $articles[$i]['end']);
}
ACP3_CMS::$view->assign('articles', $articles);
ACP3_CMS::$view->assign('can_delete', $can_delete);
}
ACP3_CMS::appendContent(ACP3_CMS::$view->fetchTemplate('articles/acp_list.tpl'));
ACP3_CMS::$view->appendContent(ACP3_CMS::$view->fetchTemplate('articles/acp_list.tpl'));
......@@ -38,7 +38,7 @@ if (isset($_POST['submit']) === true) {
if (isset($errors) === true) {
ACP3_CMS::$view->assign('error_msg', errorBox($errors));
} elseif (ACP3_Validate::formToken() === false) {
ACP3_CMS::setContent(errorBox(ACP3_CMS::$lang->t('system', 'form_already_submitted')));
ACP3_CMS::$view->setContent(errorBox(ACP3_CMS::$lang->t('system', 'form_already_submitted')));
} else {
$file_sql = null;
if (!empty($file)) {
......
......@@ -16,10 +16,10 @@ elseif (ACP3_Validate::deleteEntries(ACP3_CMS::$uri->entries) === true)
$entries = ACP3_CMS::$uri->entries;
if (!isset($entries)) {
ACP3_CMS::setContent(errorBox(ACP3_CMS::$lang->t('system', 'no_entries_selected')));
ACP3_CMS::$view->setContent(errorBox(ACP3_CMS::$lang->t('system', 'no_entries_selected')));
} elseif (is_array($entries) === true) {
$marked_entries = implode('|', $entries);
ACP3_CMS::setContent(confirmBox(ACP3_CMS::$lang->t('system', 'confirm_delete'), ACP3_CMS::$uri->route('acp/categories/delete/entries_' . $marked_entries . '/action_confirmed/'), ACP3_CMS::$uri->route('acp/categories')));
ACP3_CMS::$view->setContent(confirmBox(ACP3_CMS::$lang->t('system', 'confirm_delete'), ACP3_CMS::$uri->route('acp/categories/delete/entries_' . $marked_entries . '/action_confirmed/'), ACP3_CMS::$uri->route('acp/categories')));
} elseif (ACP3_CMS::$uri->action === 'confirmed') {
require_once MODULES_DIR . 'categories/functions.php';
......
......@@ -39,7 +39,7 @@ if (ACP3_Validate::isNumber(ACP3_CMS::$uri->id) === true &&
if (isset($errors) === true) {
ACP3_CMS::$view->assign('error_msg', errorBox($errors));
} elseif (ACP3_Validate::formToken() === false) {
ACP3_CMS::setContent(errorBox(ACP3_CMS::$lang->t('system', 'form_already_submitted')));
ACP3_CMS::$view->setContent(errorBox(ACP3_CMS::$lang->t('system', 'form_already_submitted')));
} else {
$new_file_sql = null;
if (isset($file) && is_array($file)) {
......
......@@ -23,11 +23,11 @@ if ($c_categories > 0) {
'sort_dir' => 'desc',
'hide_col_sort' => $can_delete === true ? 0 : ''
);
ACP3_CMS::setContent(datatable($config));
ACP3_CMS::$view->setContent(datatable($config));
for ($i = 0; $i < $c_categories; ++$i) {
$categories[$i]['module'] = ACP3_CMS::$lang->t($categories[$i]['module'], $categories[$i]['module']);
}
ACP3_CMS::$view->assign('categories', $categories);
ACP3_CMS::$view->assign('can_delete', $can_delete);
}
ACP3_CMS::appendContent(ACP3_CMS::$view->fetchTemplate('categories/acp_list.tpl'));
ACP3_CMS::$view->appendContent(ACP3_CMS::$view->fetchTemplate('categories/acp_list.tpl'));
......@@ -21,7 +21,7 @@ if (isset($_POST['submit']) === true) {
if (isset($errors) === true) {
ACP3_CMS::$view->assign('error_msg', errorBox($errors));
} elseif (ACP3_Validate::formToken() === false) {
ACP3_CMS::setContent(errorBox(ACP3_CMS::$lang->t('system', 'form_already_submitted')));
ACP3_CMS::$view->setContent(errorBox(ACP3_CMS::$lang->t('system', 'form_already_submitted')));
} else {
$data = array(
'width' => (int) $_POST['width'],
......
......@@ -16,10 +16,10 @@ elseif (ACP3_Validate::deleteEntries(ACP3_CMS::$uri->entries) === true)
$entries = ACP3_CMS::$uri->entries;
if (!isset($entries)) {
ACP3_CMS::setContent(errorBox(ACP3_CMS::$lang->t('system', 'no_entries_selected')));
ACP3_CMS::$view->setContent(errorBox(ACP3_CMS::$lang->t('system', 'no_entries_selected')));
} elseif (is_array($entries) === true) {
$marked_entries = implode('|', $entries);
ACP3_CMS::setContent(confirmBox(ACP3_CMS::$lang->t('system', 'confirm_delete'), ACP3_CMS::$uri->route('acp/comments/delete/entries_' . $marked_entries . '/action_confirmed/'), ACP3_CMS::$uri->route('acp/comments')));
ACP3_CMS::$view->setContent(confirmBox(ACP3_CMS::$lang->t('system', 'confirm_delete'), ACP3_CMS::$uri->route('acp/comments/delete/entries_' . $marked_entries . '/action_confirmed/'), ACP3_CMS::$uri->route('acp/comments')));
} elseif (ACP3_CMS::$uri->action === 'confirmed') {
$marked_entries = explode('|', $entries);
$bool = false;
......
......@@ -16,10 +16,10 @@ elseif (ACP3_Validate::deleteEntries(ACP3_CMS::$uri->entries) === true)
$entries = ACP3_CMS::$uri->entries;
if (!isset($entries)) {
ACP3_CMS::setContent(errorBox(ACP3_CMS::$lang->t('system', 'no_entries_selected')));
ACP3_CMS::$view->setContent(errorBox(ACP3_CMS::$lang->t('system', 'no_entries_selected')));
} elseif (is_array($entries) === true) {
$marked_entries = implode('|', $entries);
ACP3_CMS::setContent(confirmBox(ACP3_CMS::$lang->t('system', 'confirm_delete'), ACP3_CMS::$uri->route('acp/comments/delete_comments/entries_' . $marked_entries . '/action_confirmed/'), ACP3_CMS::$uri->route('acp/comments')));
ACP3_CMS::$view->setContent(confirmBox(ACP3_CMS::$lang->t('system', 'confirm_delete'), ACP3_CMS::$uri->route('acp/comments/delete_comments/entries_' . $marked_entries . '/action_confirmed/'), ACP3_CMS::$uri->route('acp/comments')));
} elseif (ACP3_CMS::$uri->action === 'confirmed') {
$marked_entries = explode('|', $entries);
$bool = false;
......
......@@ -27,7 +27,7 @@ if (ACP3_Validate::isNumber(ACP3_CMS::$uri->id) === true &&
if (isset($errors) === true) {
ACP3_CMS::$view->assign('error_msg', errorBox($errors));
} elseif (ACP3_Validate::formToken() === false) {
ACP3_CMS::setContent(errorBox(ACP3_CMS::$lang->t('system', 'form_already_submitted')));
ACP3_CMS::$view->setContent(errorBox(ACP3_CMS::$lang->t('system', 'form_already_submitted')));
} else {
$update_values = array();
$update_values['message'] = str_encode($_POST['message']);
......
......@@ -23,7 +23,7 @@ if ($c_comments > 0) {
'sort_dir' => 'desc',
'hide_col_sort' => $can_delete === true ? 0 : ''
);
ACP3_CMS::setContent(datatable($config));
ACP3_CMS::$view->setContent(datatable($config));
for ($i = 0; $i < $c_comments; ++$i) {
$comments[$i]['name'] = ACP3_CMS::$lang->t($comments[$i]['module'], $comments[$i]['module']);
}
......@@ -31,4 +31,4 @@ if ($c_comments > 0) {
ACP3_CMS::$view->assign('can_delete', $can_delete);
}
ACP3_CMS::appendContent(ACP3_CMS::$view->fetchTemplate('comments/acp_list.tpl'));
\ No newline at end of file
ACP3_CMS::$view->appendContent(ACP3_CMS::$view->fetchTemplate('comments/acp_list.tpl'));
\ No newline at end of file
......@@ -30,7 +30,7 @@ if (ACP3_Validate::isNumber(ACP3_CMS::$uri->id) &&
'sort_dir' => 'asc',
'hide_col_sort' => $can_delete === true ? 0 : ''
);
ACP3_CMS::setContent(datatable($config));
ACP3_CMS::$view->setContent(datatable($config));
$settings = ACP3_Config::getSettings('comments');
// Emoticons einbinden
......@@ -57,4 +57,4 @@ if (ACP3_Validate::isNumber(ACP3_CMS::$uri->id) &&
}
}
ACP3_CMS::appendContent(ACP3_CMS::$view->fetchTemplate('comments/acp_list_comments.tpl'));
\ No newline at end of file
ACP3_CMS::$view->appendContent(ACP3_CMS::$view->fetchTemplate('comments/acp_list_comments.tpl'));
\ No newline at end of file
......@@ -21,7 +21,7 @@ if (isset($_POST['submit']) === true) {
if (isset($errors) === true) {
ACP3_CMS::$view->assign('error_msg', errorBox($errors));
} elseif (ACP3_Validate::formToken() === false) {
ACP3_CMS::setContent(errorBox(ACP3_CMS::$lang->t('system', 'form_already_submitted')));
ACP3_CMS::$view->setContent(errorBox(ACP3_CMS::$lang->t('system', 'form_already_submitted')));
} else {
$data = array(
'dateformat' => str_encode($_POST['dateformat']),
......
......@@ -17,7 +17,7 @@ if (isset($_POST['submit']) === true) {
if (isset($errors) === true) {
ACP3_CMS::$view->assign('error_msg', errorBox($errors));
} elseif (ACP3_Validate::formToken() === false) {
ACP3_CMS::setContent(errorBox(ACP3_CMS::$lang->t('system', 'form_already_submitted')));
ACP3_CMS::$view->setContent(errorBox(ACP3_CMS::$lang->t('system', 'form_already_submitted')));
} else {
$data = array(
'address' => str_encode($_POST['address'], true),
......
......@@ -25,7 +25,7 @@ if (isset($_POST['submit']) === true) {
if (isset($errors) === true) {
ACP3_CMS::$view->assign('error_msg', errorBox($errors));
} elseif (ACP3_Validate::formToken() === false) {
ACP3_CMS::setContent(errorBox(ACP3_CMS::$lang->t('system', 'form_already_submitted')));
ACP3_CMS::$view->setContent(errorBox(ACP3_CMS::$lang->t('system', 'form_already_submitted')));
} else {
$settings = ACP3_Config::getSettings('contact');
$_POST['message'] = str_encode($_POST['message'], true);
......@@ -43,7 +43,7 @@ if (isset($_POST['submit']) === true) {
ACP3_CMS::$session->unsetFormToken();
ACP3_CMS::setContent(confirmBox($bool === true ? ACP3_CMS::$lang->t('contact', 'send_mail_success') : ACP3_CMS::$lang->t('contact', 'send_mail_error'), ACP3_CMS::$uri->route('contact')));
ACP3_CMS::$view->setContent(confirmBox($bool === true ? ACP3_CMS::$lang->t('contact', 'send_mail_success') : ACP3_CMS::$lang->t('contact', 'send_mail_error'), ACP3_CMS::$uri->route('contact')));
}
}
if (isset($_POST['submit']) === false || isset($errors) === true && is_array($errors) === true) {
......
......@@ -32,7 +32,7 @@ if (isset($_POST['submit']) === true) {
if (isset($errors) === true) {
ACP3_CMS::$view->assign('error_msg', errorBox($errors));
} elseif (ACP3_Validate::formToken() === false) {
ACP3_CMS::setContent(errorBox(ACP3_CMS::$lang->t('system', 'form_already_submitted')));
ACP3_CMS::$view->setContent(errorBox(ACP3_CMS::$lang->t('system', 'form_already_submitted')));
} else {
$result = moveFile($file['tmp_name'], $file['name'], 'emoticons');
......
......@@ -16,10 +16,10 @@ elseif (ACP3_Validate::deleteEntries(ACP3_CMS::$uri->entries) === true)
$entries = ACP3_CMS::$uri->entries;
if (!isset($entries)) {
ACP3_CMS::setContent(errorBox(ACP3_CMS::$lang->t('system', 'no_entries_selected')));
ACP3_CMS::$view->setContent(errorBox(ACP3_CMS::$lang->t('system', 'no_entries_selected')));
} elseif (is_array($entries) === true) {
$marked_entries = implode('|', $entries);
ACP3_CMS::setContent(confirmBox(ACP3_CMS::$lang->t('system', 'confirm_delete'), ACP3_CMS::$uri->route('acp/emoticons/delete/entries_' . $marked_entries . '/action_confirmed/'), ACP3_CMS::$uri->route('acp/emoticons')));
ACP3_CMS::$view->setContent(confirmBox(ACP3_CMS::$lang->t('system', 'confirm_delete'), ACP3_CMS::$uri->route('acp/emoticons/delete/entries_' . $marked_entries . '/action_confirmed/'), ACP3_CMS::$uri->route('acp/emoticons')));
} elseif (ACP3_CMS::$uri->action === 'confirmed') {
require_once MODULES_DIR . 'emoticons/functions.php';
......
......@@ -34,7 +34,7 @@ if (ACP3_Validate::isNumber(ACP3_CMS::$uri->id) === true &&
if (isset($errors) === true) {
ACP3_CMS::$view->assign('error_msg', errorBox($errors));
} elseif (ACP3_Validate::formToken() === false) {
ACP3_CMS::setContent(errorBox(ACP3_CMS::$lang->t('system', 'form_already_submitted')));
ACP3_CMS::$view->setContent(errorBox(ACP3_CMS::$lang->t('system', 'form_already_submitted')));
} else {
$new_file_sql = null;
if (isset($file)) {
......
......@@ -23,8 +23,8 @@ if ($c_emoticons > 0) {
'sort_dir' => 'desc',
'hide_col_sort' => $can_delete === true ? 0 : ''
);
ACP3_CMS::setContent(datatable($config));
ACP3_CMS::$view->setContent(datatable($config));
ACP3_CMS::$view->assign('emoticons', $emoticons);
ACP3_CMS::$view->assign('can_delete', $can_delete);
}
ACP3_CMS::appendContent(ACP3_CMS::$view->fetchTemplate('emoticons/acp_list.tpl'));
ACP3_CMS::$view->appendContent(ACP3_CMS::$view->fetchTemplate('emoticons/acp_list.tpl'));
......@@ -21,7 +21,7 @@ if (isset($_POST['submit']) === true) {
if (isset($errors) === true) {
ACP3_CMS::$view->assign('error_msg', errorBox($errors));
} elseif (ACP3_Validate::formToken() === false) {
ACP3_CMS::setContent(errorBox(ACP3_CMS::$lang->t('system', 'form_already_submitted')));
ACP3_CMS::$view->setContent(errorBox(ACP3_CMS::$lang->t('system', 'form_already_submitted')));
} else {
$data = array(
'width' => (int) $_POST['width'],
......
......@@ -17,7 +17,7 @@ if (isset($_POST['submit']) === true) {
if (isset($errors) === true) {
ACP3_CMS::$view->assign('error_msg', errorBox($errors));
} elseif (ACP3_Validate::formToken() === false) {
ACP3_CMS::setContent(errorBox(ACP3_CMS::$lang->t('system', 'form_already_submitted')));
ACP3_CMS::$view->setContent(errorBox(ACP3_CMS::$lang->t('system', 'form_already_submitted')));
} else {
$data = array(
'feed_image' => str_encode($_POST['feed_image']),
......
......@@ -32,5 +32,5 @@ if (ACP3_Modules::check(ACP3_CMS::$uri->feed, 'extensions/feeds') === true) {
ACP3_CMS::$view->setLayout('');
ACP3_CMS::$view->setContentType('text/xml');
ACP3_CMS::setContent(ACP3_CMS::$view->getRenderer()->display($settings['feed_type']));
ACP3_CMS::$view->setContent(ACP3_CMS::$view->getRenderer()->display($settings['feed_type']));
}
\ No newline at end of file
......@@ -44,7 +44,7 @@ if (isset($_POST['submit']) === true) {
if (isset($errors) === true) {
ACP3_CMS::$view->assign('error_msg', errorBox($errors));