camelCased Functions::str_encode to strEncode

parent 8ca15897
......@@ -782,7 +782,7 @@ abstract class Functions {
* @param boolean $script_tag_only
* @return string
*/
public static function str_encode($var, $script_tag_only = false)
public static function strEncode($var, $script_tag_only = false)
{
$var = preg_replace('=<script[^>]*>.*</script>=isU', '', $var);
return $script_tag_only === true ? $var : htmlentities($var, ENT_QUOTES, 'UTF-8');
......
......@@ -283,8 +283,8 @@ abstract class SEO
public static function insertUriAlias($path, $alias, $keywords = '', $description = '', $robots = 0)
{
$path.= !preg_match('/\/$/', $path) ? '/' : '';
$keywords = Functions::str_encode($keywords);
$description = Functions::str_encode($description);
$keywords = Functions::strEncode($keywords);
$description = Functions::strEncode($description);
// Vorhandenen Alias aktualisieren
if (Registry::get('Db')->fetchColumn('SELECT COUNT(*) FROM ' . DB_PRE . 'seo WHERE uri = ?', array($path)) == 1) {
......
......@@ -166,8 +166,8 @@ class Install extends \ACP3\Installer\Core\InstallerModuleController {
$system_settings = array(
'cache_images' => true,
'cache_minify' => 3600,
'date_format_long' => \ACP3\Core\Functions::str_encode($_POST['date_format_long']),
'date_format_short' => \ACP3\Core\Functions::str_encode($_POST['date_format_short']),
'date_format_long' => \ACP3\Core\Functions::strEncode($_POST['date_format_long']),
'date_format_short' => \ACP3\Core\Functions::strEncode($_POST['date_format_short']),
'date_time_zone' => $_POST['date_time_zone'],
'design' => 'acp3',
'entries' => 20,
......
......@@ -51,8 +51,8 @@ class ArticlesAdmin extends Core\ModuleController {
'id' => '',
'start' => Core\Registry::get('Date')->toSQL($_POST['start']),
'end' => Core\Registry::get('Date')->toSQL($_POST['end']),
'title' => Core\Functions::str_encode($_POST['title']),
'text' => Core\Functions::str_encode($_POST['text'], true),
'title' => Core\Functions::strEncode($_POST['title']),
'text' => Core\Functions::strEncode($_POST['text'], true),
'user_id' => Core\Registry::get('Auth')->getUserId(),
);
......@@ -70,7 +70,7 @@ class ArticlesAdmin extends Core\ModuleController {
'block_id' => $_POST['block_id'],
'parent_id' => (int) $_POST['parent'],
'display' => $_POST['display'],
'title' => Core\Functions::str_encode($_POST['title']),
'title' => Core\Functions::strEncode($_POST['title']),
'uri' => 'articles/details/id_' . $last_id . '/',
'target' => 1,
);
......@@ -174,8 +174,8 @@ class ArticlesAdmin extends Core\ModuleController {
$update_values = array(
'start' => Core\Registry::get('Date')->toSQL($_POST['start']),
'end' => Core\Registry::get('Date')->toSQL($_POST['end']),
'title' => Core\Functions::str_encode($_POST['title']),
'text' => Core\Functions::str_encode($_POST['text'], true),
'title' => Core\Functions::strEncode($_POST['title']),
'text' => Core\Functions::strEncode($_POST['text'], true),
'user_id' => Core\Registry::get('Auth')->getUserId(),
);
......
......@@ -49,8 +49,8 @@ class CategoriesAdmin extends Core\ModuleController {
$mod_id = Core\Registry::get('Db')->fetchColumn('SELECT id FROM ' . DB_PRE . 'modules WHERE name = ?', array($_POST['module']));
$insert_values = array(
'id' => '',
'title' => Core\Functions::str_encode($_POST['title']),
'description' => Core\Functions::str_encode($_POST['description']),
'title' => Core\Functions::strEncode($_POST['title']),
'description' => Core\Functions::strEncode($_POST['description']),
'module_id' => $mod_id,
);
if (is_array($file_sql) === true) {
......@@ -162,8 +162,8 @@ class CategoriesAdmin extends Core\ModuleController {
}
$update_values = array(
'title' => Core\Functions::str_encode($_POST['title']),
'description' => Core\Functions::str_encode($_POST['description']),
'title' => Core\Functions::strEncode($_POST['title']),
'description' => Core\Functions::strEncode($_POST['description']),
);
if (is_array($new_file_sql) === true) {
$old_file = Core\Registry::get('Db')->fetchColumn('SELECT picture FROM ' . DB_PRE . 'categories WEHRE id = ?', array(Core\Registry::get('URI')->id));
......
......@@ -74,7 +74,7 @@ abstract class CategoriesFunctions {
$mod_id = Core\Registry::get('Db')->fetchColumn('SELECT id FROM ' . DB_PRE . 'modules WHERE name = ?', array($module));
$insert_values = array(
'id' => '',
'title' => Core\Functions::str_encode($title),
'title' => Core\Functions::strEncode($title),
'picture' => '',
'description' => '',
'module_id' => $mod_id,
......
......@@ -78,9 +78,9 @@ class CommentsAdmin extends Core\ModuleController {
Core\Registry::get('View')->setContent(Core\Functions::errorBox(Core\Registry::get('Lang')->t('system', 'form_already_submitted')));
} else {
$update_values = array();
$update_values['message'] = Core\Functions::str_encode($_POST['message']);
$update_values['message'] = Core\Functions::strEncode($_POST['message']);
if ((empty($comment['user_id']) || Core\Validate::isNumber($comment['user_id']) === false) && !empty($_POST['name'])) {
$update_values['name'] = Core\Functions::str_encode($_POST['name']);
$update_values['name'] = Core\Functions::strEncode($_POST['name']);
}
$bool = Core\Registry::get('Db')->update(DB_PRE . 'comments', $update_values, array('id' => Core\Registry::get('URI')->id));
......@@ -192,7 +192,7 @@ class CommentsAdmin extends Core\ModuleController {
Core\Registry::get('View')->setContent(Core\Functions::errorBox(Core\Registry::get('Lang')->t('system', 'form_already_submitted')));
} else {
$data = array(
'dateformat' => Core\Functions::str_encode($_POST['dateformat']),
'dateformat' => Core\Functions::strEncode($_POST['dateformat']),
'emoticons' => $_POST['emoticons'],
);
$bool = Core\Config::setSettings('comments', $data);
......
......@@ -52,9 +52,9 @@ class CommentsFrontend extends Core\ModuleController {
'id' => '',
'date' => Core\Registry::get('Date')->getCurrentDateTime(),
'ip' => $ip,
'name' => Core\Functions::str_encode($_POST['name']),
'name' => Core\Functions::strEncode($_POST['name']),
'user_id' => Core\Registry::get('Auth')->isUser() === true && Core\Validate::isNumber(Core\Registry::get('Auth')->getUserId() === true) ? Core\Registry::get('Auth')->getUserId() : '',
'message' => Core\Functions::str_encode($_POST['message']),
'message' => Core\Functions::strEncode($_POST['message']),
'module_id' => $mod_id,
'entry_id' => $this->entry_id,
);
......
......@@ -23,11 +23,11 @@ class ContactAdmin extends Core\ModuleController {
Core\Registry::get('View')->setContent(Core\Functions::errorBox(Core\Registry::get('Lang')->t('system', 'form_already_submitted')));
} else {
$data = array(
'address' => Core\Functions::str_encode($_POST['address'], true),
'address' => Core\Functions::strEncode($_POST['address'], true),
'mail' => $_POST['mail'],
'telephone' => Core\Functions::str_encode($_POST['telephone']),
'fax' => Core\Functions::str_encode($_POST['fax']),
'disclaimer' => Core\Functions::str_encode($_POST['disclaimer'], true),
'telephone' => Core\Functions::strEncode($_POST['telephone']),
'fax' => Core\Functions::strEncode($_POST['fax']),
'disclaimer' => Core\Functions::strEncode($_POST['disclaimer'], true),
);
$bool = Core\Config::setSettings('contact', $data);
......
......@@ -31,7 +31,7 @@ class ContactFrontend extends Core\ModuleController {
Core\Registry::get('View')->setContent(Core\Functions::errorBox(Core\Registry::get('Lang')->t('system', 'form_already_submitted')));
} else {
$settings = Core\Config::getSettings('contact');
$_POST['message'] = Core\Functions::str_encode($_POST['message'], true);
$_POST['message'] = Core\Functions::strEncode($_POST['message'], true);
$subject = sprintf(Core\Registry::get('Lang')->t('contact', 'contact_subject'), CONFIG_SEO_TITLE);
$body = str_replace(array('{name}', '{mail}', '{message}', '\n'), array($_POST['name'], $_POST['mail'], $_POST['message'], "\n"), Core\Registry::get('Lang')->t('contact', 'contact_body'));
......
......@@ -38,8 +38,8 @@ class EmoticonsAdmin extends Core\ModuleController {
$insert_values = array(
'id' => '',
'code' => Core\Functions::str_encode($_POST['code']),
'description' => Core\Functions::str_encode($_POST['description']),
'code' => Core\Functions::strEncode($_POST['code']),
'description' => Core\Functions::strEncode($_POST['description']),
'img' => $result['name'],
);
......@@ -121,8 +121,8 @@ class EmoticonsAdmin extends Core\ModuleController {
}
$update_values = array(
'code' => Core\Functions::str_encode($_POST['code']),
'description' => Core\Functions::str_encode($_POST['description']),
'code' => Core\Functions::strEncode($_POST['code']),
'description' => Core\Functions::strEncode($_POST['description']),
);
if (is_array($new_file_sql) === true) {
$old_file = Core\Registry::get('Db')->fetchColumn('SELECT img FROM emoticons WHERE id = ?', array(Core\Registry::get('URI')->id));
......
......@@ -22,7 +22,7 @@ class FeedsAdmin extends Core\ModuleController {
Core\Registry::get('View')->setContent(Core\Functions::errorBox(Core\Registry::get('Lang')->t('system', 'form_already_submitted')));
} else {
$data = array(
'feed_image' => Core\Functions::str_encode($_POST['feed_image']),
'feed_image' => Core\Functions::strEncode($_POST['feed_image']),
'feed_type' => $_POST['feed_type']
);
......
......@@ -64,8 +64,8 @@ class FilesAdmin extends Core\ModuleController {
'category_id' => strlen($_POST['cat_create']) >= 3 ? CategoriesFunctions::categoriesCreate($_POST['cat_create'], 'files') : $_POST['cat'],
'file' => $new_file,
'size' => $filesize,
'title' => Core\Functions::str_encode($_POST['title']),
'text' => Core\Functions::str_encode($_POST['text'], true),
'title' => Core\Functions::strEncode($_POST['title']),
'text' => Core\Functions::strEncode($_POST['text'], true),
'comments' => $settings['comments'] == 1 && isset($_POST['comments']) ? 1 : 0,
'user_id' => Core\Registry::get('Auth')->getUserId(),
);
......@@ -214,8 +214,8 @@ class FilesAdmin extends Core\ModuleController {
'start' => Core\Registry::get('Date')->toSQL($_POST['start']),
'end' => Core\Registry::get('Date')->toSQL($_POST['end']),
'category_id' => strlen($_POST['cat_create']) >= 3 ? CategoriesFunctions::categoriesCreate($_POST['cat_create'], 'files') : $_POST['cat'],
'title' => Core\Functions::str_encode($_POST['title']),
'text' => Core\Functions::str_encode($_POST['text'], true),
'title' => Core\Functions::strEncode($_POST['title']),
'text' => Core\Functions::strEncode($_POST['text'], true),
'comments' => $settings['comments'] == 1 && isset($_POST['comments']) ? 1 : 0,
'user_id' => Core\Registry::get('Auth')->getUserId(),
);
......@@ -313,7 +313,7 @@ class FilesAdmin extends Core\ModuleController {
Core\Registry::get('View')->setContent(Core\Functions::errorBox(Core\Registry::get('Lang')->t('system', 'form_already_submitted')));
} else {
$data = array(
'dateformat' => Core\Functions::str_encode($_POST['dateformat']),
'dateformat' => Core\Functions::strEncode($_POST['dateformat']),
'sidebar' => (int) $_POST['sidebar'],
'comments' => $_POST['comments']
);
......
......@@ -30,7 +30,7 @@ class GalleryAdmin extends Core\ModuleController {
'id' => '',
'start' => Core\Registry::get('Date')->toSQL($_POST['start']),
'end' => Core\Registry::get('Date')->toSQL($_POST['end']),
'title' => Core\Functions::str_encode($_POST['title']),
'title' => Core\Functions::strEncode($_POST['title']),
'user_id' => Core\Registry::get('Auth')->getUserId(),
);
......@@ -91,7 +91,7 @@ class GalleryAdmin extends Core\ModuleController {
'pic' => !is_null($picNum) ? $picNum + 1 : 1,
'gallery_id' => Core\Registry::get('URI')->id,
'file' => $result['name'],
'description' => Core\Functions::str_encode($_POST['description'], true),
'description' => Core\Functions::strEncode($_POST['description'], true),
'comments' => $settings['comments'] == 1 ? (isset($_POST['comments']) && $_POST['comments'] == 1 ? 1 : 0) : $settings['comments'],
);
......@@ -227,7 +227,7 @@ class GalleryAdmin extends Core\ModuleController {
$update_values = array(
'start' => Core\Registry::get('Date')->toSQL($_POST['start']),
'end' => Core\Registry::get('Date')->toSQL($_POST['end']),
'title' => Core\Functions::str_encode($_POST['title']),
'title' => Core\Functions::strEncode($_POST['title']),
'user_id' => Core\Registry::get('Auth')->getUserId(),
);
......@@ -315,7 +315,7 @@ class GalleryAdmin extends Core\ModuleController {
}
$update_values = array(
'description' => Core\Functions::str_encode($_POST['description'], true),
'description' => Core\Functions::strEncode($_POST['description'], true),
'comments' => $settings['comments'] == 1 ? (isset($_POST['comments']) && $_POST['comments'] == 1 ? 1 : 0) : $settings['comments'],
);
if (is_array($new_file_sql) === true) {
......@@ -425,7 +425,7 @@ class GalleryAdmin extends Core\ModuleController {
'maxheight' => (int) $_POST['maxheight'],
'filesize' => (int) $_POST['filesize'],
'overlay' => $_POST['overlay'],
'dateformat' => Core\Functions::str_encode($_POST['dateformat']),
'dateformat' => Core\Functions::strEncode($_POST['dateformat']),
'sidebar' => (int) $_POST['sidebar'],
);
if ($comments_active === true)
......
......@@ -53,8 +53,8 @@ class GuestbookAdmin extends Core\ModuleController {
Core\Registry::get('View')->setContent(Core\Functions::errorBox(Core\Registry::get('Lang')->t('system', 'form_already_submitted')));
} else {
$update_values = array(
'name' => Core\Functions::str_encode($_POST['name']),
'message' => Core\Functions::str_encode($_POST['message']),
'name' => Core\Functions::strEncode($_POST['name']),
'message' => Core\Functions::strEncode($_POST['message']),
'active' => $settings['notify'] == 2 ? $_POST['active'] : 1,
);
......@@ -154,7 +154,7 @@ class GuestbookAdmin extends Core\ModuleController {
Core\Registry::get('View')->setContent(Core\Functions::errorBox(Core\Registry::get('Lang')->t('system', 'form_already_submitted')));
} else {
$data = array(
'dateformat' => Core\Functions::str_encode($_POST['dateformat']),
'dateformat' => Core\Functions::strEncode($_POST['dateformat']),
'notify' => $_POST['notify'],
'notify_email' => $_POST['notify_email'],
'overlay' => $_POST['overlay'],
......
......@@ -63,10 +63,10 @@ class GuestbookFrontend extends Core\ModuleController {
'id' => '',
'date' => Core\Registry::get('Date')->getCurrentDateTime(),
'ip' => $ip,
'name' => Core\Functions::str_encode($_POST['name']),
'name' => Core\Functions::strEncode($_POST['name']),
'user_id' => Core\Registry::get('Auth')->isUser() ? Core\Registry::get('Auth')->getUserId() : '',
'message' => Core\Functions::str_encode($_POST['message']),
'website' => Core\Functions::str_encode($_POST['website']),
'message' => Core\Functions::strEncode($_POST['message']),
'website' => Core\Functions::strEncode($_POST['website']),
'mail' => $_POST['mail'],
'active' => $settings['notify'] == 2 ? 0 : 1,
);
......
......@@ -29,7 +29,7 @@ class MenusAdmin extends Core\ModuleController {
$insert_values = array(
'id' => '',
'index_name' => $_POST['index_name'],
'title' => Core\Functions::str_encode($_POST['title']),
'title' => Core\Functions::strEncode($_POST['title']),
);
$bool = Core\Registry::get('Db')->insert(DB_PRE . 'menus', $insert_values);
......@@ -86,7 +86,7 @@ class MenusAdmin extends Core\ModuleController {
'block_id' => (int) $_POST['block_id'],
'parent_id' => (int) $_POST['parent'],
'display' => $_POST['display'],
'title' => Core\Functions::str_encode($_POST['title']),
'title' => Core\Functions::strEncode($_POST['title']),
'uri' => $_POST['mode'] == 1 ? $_POST['module'] : ($_POST['mode'] == 4 ? 'articles/details/id_' . $_POST['articles'] . '/' : $_POST['uri']),
'target' => $_POST['display'] == 0 ? 1 : $_POST['target'],
);
......@@ -257,7 +257,7 @@ class MenusAdmin extends Core\ModuleController {
} else {
$update_values = array(
'index_name' => $_POST['index_name'],
'title' => Core\Functions::str_encode($_POST['title']),
'title' => Core\Functions::strEncode($_POST['title']),
);
$bool = Core\Registry::get('Db')->update(DB_PRE . 'menus', $update_values, array('id' => Core\Registry::get('URI')->id));
......@@ -331,7 +331,7 @@ class MenusAdmin extends Core\ModuleController {
'block_id' => $_POST['block_id'],
'parent_id' => $_POST['parent'],
'display' => $_POST['display'],
'title' => Core\Functions::str_encode($_POST['title']),
'title' => Core\Functions::strEncode($_POST['title']),
'uri' => $_POST['mode'] == 1 ? $_POST['module'] : $uri_type,
'target' => $_POST['display'] == 0 ? 1 : $_POST['target'],
);
......
......@@ -42,14 +42,14 @@ class NewsAdmin extends Core\ModuleController {
'id' => '',
'start' => Core\Registry::get('Date')->toSQL($_POST['start']),
'end' => Core\Registry::get('Date')->toSQL($_POST['end']),
'title' => Core\Functions::str_encode($_POST['title']),
'text' => Core\Functions::str_encode($_POST['text'], true),
'title' => Core\Functions::strEncode($_POST['title']),
'text' => Core\Functions::strEncode($_POST['text'], true),
'readmore' => $settings['readmore'] == 1 && isset($_POST['readmore']) ? 1 : 0,
'comments' => $settings['comments'] == 1 && isset($_POST['comments']) ? 1 : 0,
'category_id' => strlen($_POST['cat_create']) >= 3 ? CategoriesFunctions::categoriesCreate($_POST['cat_create'], 'news') : $_POST['cat'],
'uri' => Core\Functions::str_encode($_POST['uri'], true),
'uri' => Core\Functions::strEncode($_POST['uri'], true),
'target' => (int) $_POST['target'],
'link_title' => Core\Functions::str_encode($_POST['link_title']),
'link_title' => Core\Functions::strEncode($_POST['link_title']),
'user_id' => Core\Registry::get('Auth')->getUserId(),
);
......@@ -160,14 +160,14 @@ class NewsAdmin extends Core\ModuleController {
$update_values = array(
'start' => Core\Registry::get('Date')->toSQL($_POST['start']),
'end' => Core\Registry::get('Date')->toSQL($_POST['end']),
'title' => Core\Functions::str_encode($_POST['title']),
'text' => Core\Functions::str_encode($_POST['text'], true),
'title' => Core\Functions::strEncode($_POST['title']),
'text' => Core\Functions::strEncode($_POST['text'], true),
'readmore' => $settings['readmore'] == 1 && isset($_POST['readmore']) ? 1 : 0,
'comments' => $settings['comments'] == 1 && isset($_POST['comments']) ? 1 : 0,
'category_id' => strlen($_POST['cat_create']) >= 3 ? CategoriesFunctions::categoriesCreate($_POST['cat_create'], 'news') : $_POST['cat'],
'uri' => Core\Functions::str_encode($_POST['uri'], true),
'uri' => Core\Functions::strEncode($_POST['uri'], true),
'target' => (int) $_POST['target'],
'link_title' => Core\Functions::str_encode($_POST['link_title']),
'link_title' => Core\Functions::strEncode($_POST['link_title']),
'user_id' => Core\Registry::get('Auth')->getUserId(),
);
......@@ -273,7 +273,7 @@ class NewsAdmin extends Core\ModuleController {
Core\Registry::get('View')->setContent(Core\Functions::errorBox(Core\Registry::get('Lang')->t('system', 'form_already_submitted')));
} else {
$data = array(
'dateformat' => Core\Functions::str_encode($_POST['dateformat']),
'dateformat' => Core\Functions::strEncode($_POST['dateformat']),
'sidebar' => (int) $_POST['sidebar'],
'readmore' => $_POST['readmore'],
'readmore_chars' => (int) $_POST['readmore_chars'],
......
......@@ -38,16 +38,16 @@ class NewsletterAdmin extends Core\ModuleController {
$insert_values = array(
'id' => '',
'date' => Core\Registry::get('Date')->getCurrentDateTime(),
'title' => Core\Functions::str_encode($_POST['title']),
'text' => Core\Functions::str_encode($_POST['text'], true),
'title' => Core\Functions::strEncode($_POST['title']),
'text' => Core\Functions::strEncode($_POST['text'], true),
'status' => $_POST['test'] == 1 ? '0' : (int) $_POST['action'],
'user_id' => Core\Registry::get('Auth')->getUserId(),
);
$bool = Core\Registry::get('Db')->insert(DB_PRE . 'newsletters', $insert_values);
if ($_POST['action'] == 1 && $bool !== false) {
$subject = Core\Functions::str_encode($_POST['title'], true);
$body = Core\Functions::str_encode($_POST['text'], true) . "\n-- \n" . html_entity_decode($settings['mailsig'], ENT_QUOTES, 'UTF-8');
$subject = Core\Functions::strEncode($_POST['title'], true);
$body = Core\Functions::strEncode($_POST['text'], true) . "\n-- \n" . html_entity_decode($settings['mailsig'], ENT_QUOTES, 'UTF-8');
// Testnewsletter
if ($_POST['test'] == 1) {
......@@ -152,16 +152,16 @@ class NewsletterAdmin extends Core\ModuleController {
// Newsletter archivieren
$update_values = array(
'date' => Core\Registry::get('Date')->getCurrentDateTime(),
'title' => Core\Functions::str_encode($_POST['title']),
'text' => Core\Functions::str_encode($_POST['text'], true),
'title' => Core\Functions::strEncode($_POST['title']),
'text' => Core\Functions::strEncode($_POST['text'], true),
'status' => $_POST['test'] == 1 ? '0' : (int) $_POST['action'],
'user_id' => Core\Registry::get('Auth')->getUserId(),
);
$bool = Core\Registry::get('Db')->update(DB_PRE . 'newsletters', $update_values, array('id' => Core\Registry::get('URI')->id));
if ($_POST['action'] == 1 && $bool !== false) {
$subject = Core\Functions::str_encode($_POST['title'], true);
$body = Core\Functions::str_encode($_POST['text'], true) . "\n" . html_entity_decode($settings['mailsig'], ENT_QUOTES, 'UTF-8');
$subject = Core\Functions::strEncode($_POST['title'], true);
$body = Core\Functions::strEncode($_POST['text'], true) . "\n" . html_entity_decode($settings['mailsig'], ENT_QUOTES, 'UTF-8');
// Testnewsletter
if ($_POST['test'] == 1) {
......@@ -283,7 +283,7 @@ class NewsletterAdmin extends Core\ModuleController {
} else {
$data = array(
'mail' => $_POST['mail'],
'mailsig' => Core\Functions::str_encode($_POST['mailsig'])
'mailsig' => Core\Functions::strEncode($_POST['mailsig'])
);
$bool = Core\Config::setSettings('newsletter', $data);
......
......@@ -31,7 +31,7 @@ class PermissionsAdmin extends Core\ModuleController {
$insert_values = array(
'id' => '',
'name' => Core\Functions::str_encode($_POST['name']),
'name' => Core\Functions::strEncode($_POST['name']),
'parent_id' => $_POST['parent'],
);
......@@ -247,7 +247,7 @@ class PermissionsAdmin extends Core\ModuleController {
Core\Registry::get('View')->setContent(Core\Functions::errorBox(Core\Registry::get('Lang')->t('system', 'form_already_submitted')));
} else {
$update_values = array(
'name' => Core\Functions::str_encode($_POST['name']),
'name' => Core\Functions::strEncode($_POST['name']),
'parent_id' => Core\Registry::get('URI')->id == 1 ? 0 : $_POST['parent'],
);
$nestedSet = new Core\NestedSet('acl_roles');
......
......@@ -34,7 +34,7 @@ class PollsAdmin extends Core\ModuleController {
'id' => '',
'start' => Core\Registry::get('Date')->toSQL($_POST['start']),
'end' => Core\Registry::get('Date')->toSQL($_POST['end']),
'title' => Core\Functions::str_encode($_POST['title']),
'title' => Core\Functions::strEncode($_POST['title']),
'multiple' => isset($_POST['multiple']) ? '1' : '0',
'user_id' => Core\Registry::get('Auth')->getUserId(),
);
......@@ -48,7 +48,7 @@ class PollsAdmin extends Core\ModuleController {
if (!empty($row)) {
$insert_answer = array(
'id' => '',
'text' => Core\Functions::str_encode($row),
'text' => Core\Functions::strEncode($row),
'poll_id' => $poll_id,
);
$bool2 = Core\Registry::get('Db')->insert(DB_PRE . 'poll_answers', $insert_answer);
......@@ -148,7 +148,7 @@ class PollsAdmin extends Core\ModuleController {
$update_values = array(
'start' => Core\Registry::get('Date')->toSQL($_POST['start']),
'end' => Core\Registry::get('Date')->toSQL($_POST['end']),
'title' => Core\Functions::str_encode($_POST['title']),
'title' => Core\Functions::strEncode($_POST['title']),
'multiple' => isset($_POST['multiple']) ? '1' : '0',
'user_id' => Core\Registry::get('Auth')->getUserId(),
);
......@@ -165,7 +165,7 @@ class PollsAdmin extends Core\ModuleController {
if (empty($row['id'])) {
// Neue Antwort nur hinzufügen, wenn die Löschen-Checkbox nicht gesetzt wurde
if (!empty($row['value']) && !isset($row['delete']))
Core\Registry::get('Db')->insert(DB_PRE . 'poll_answers', array('text' => Core\Functions::str_encode($row['value']), 'poll_id' => Core\Registry::get('URI')->id));
Core\Registry::get('Db')->insert(DB_PRE . 'poll_answers', array('text' => Core\Functions::strEncode($row['value']), 'poll_id' => Core\Registry::get('URI')->id));
// Antwort mitsamt Stimmen löschen
} elseif (isset($row['delete']) && Core\Validate::isNumber($row['id'])) {
Core\Registry::get('Db')->delete(DB_PRE . 'poll_answers', array('id' => $row['id']));
......@@ -173,7 +173,7 @@ class PollsAdmin extends Core\ModuleController {
Core\Registry::get('Db')->delete(DB_PRE . 'poll_votes', array('answer_id' => $row['id']));
// Antwort aktualisieren
} elseif (!empty($row['value']) && Core\Validate::isNumber($row['id'])) {
$bool = Core\Registry::get('Db')->update(DB_PRE . 'poll_answers', array('text' => Core\Functions::str_encode($row['value'])), array('id' => $row['id']));
$bool = Core\Registry::get('Db')->update(DB_PRE . 'poll_answers', array('text' => Core\Functions::strEncode($row['value'])), array('id' => $row['id']));
}
}
......
......@@ -30,7 +30,7 @@ class SearchFrontend extends Core\ModuleController {
->append(Core\Registry::get('Lang')->t('search', 'search'), Core\Registry::get('URI')->route('search'))
->append(Core\Registry::get('Lang')->t('search', 'search_results'));
$_POST['search_term'] = Core\Functions::str_encode($_POST['search_term']);
$_POST['search_term'] = Core\Functions::strEncode($_POST['search_term']);
$_POST['sort'] = strtoupper($_POST['sort']);
$search_results = array();
foreach ($_POST['mods'] as $module) {
......
......@@ -65,8 +65,8 @@ class SystemAdmin extends Core\ModuleController {
$config = array(
'cache_images' => (int) $_POST['cache_images'],
'cache_minify' => (int) $_POST['cache_minify'],
'date_format_long' => Core\Functions::str_encode($_POST['date_format_long']),
'date_format_short' => Core\Functions::str_encode($_POST['date_format_short']),
'date_format_long' => Core\Functions::strEncode($_POST['date_format_long']),
'date_format_short' => Core\Functions::strEncode($_POST['date_format_short']),
'date_time_zone' => $_POST['date_time_zone'],
'entries' => (int) $_POST['entries'],
'extra_css' => $_POST['extra_css'],
......@@ -84,11 +84,11 @@ class SystemAdmin extends Core\ModuleController {
'maintenance_message' => $_POST['maintenance_message'],
'maintenance_mode' => (int) $_POST['maintenance_mode'],
'seo_aliases' => (int) $_POST['seo_aliases'],
'seo_meta_description' => Core\Functions::str_encode($_POST['seo_meta_description']),
'seo_meta_keywords' => Core\Functions::str_encode($_POST['seo_meta_keywords']),
'seo_meta_description' => Core\Functions::strEncode($_POST['seo_meta_description']),
'seo_meta_keywords' => Core\Functions::strEncode($_POST['seo_meta_keywords']),
'seo_mod_rewrite' => (int) $_POST['seo_mod_rewrite'],
'seo_robots' => (int) $_POST['seo_robots'],
'seo_title' => Core\Functions::str_encode($_POST['seo_title']),
'seo_title' => Core\Functions::strEncode($_POST['seo_title']),
'wysiwyg' => $_POST['wysiwyg']
);
......
......@@ -61,26 +61,26 @@ class UsersAdmin extends Core\ModuleController {
$insert_values = array(
'id' => '',
'super_user' => (int) $_POST['super_user'],
'nickname' => Core\Functions::str_encode($_POST['nickname']),
'nickname' => Core\Functions::strEncode($_POST['nickname']),
'pwd' => generateSaltedPassword($salt, $_POST['pwd']) . ':' . $salt,
'realname' => Core\Functions::str_encode($_POST['realname']),
'realname' => Core\Functions::strEncode($_POST['realname']),
'gender' => (int) $_POST['gender'],
'birthday' => $_POST['birthday'],
'birthday_display' => (int) $_POST['birthday_display'],
'mail' => $_POST['mail'],
'mail_display' => isset($_POST['mail_display']) ? 1 : 0,
'website' => Core\Functions::str_encode($_POST['website']),
'website' => Core\Functions::strEncode($_POST['website']),
'icq' => $_POST['icq'],
'skype' => Core\Functions::str_encode($_POST['skype']),
'street' => Core\Functions::str_encode($_POST['street']),
'house_number' => Core\Functions::str_encode($_POST['house_number']),
'zip' => Core\Functions::str_encode($_POST['zip']),
'city' => Core\Functions::str_encode($_POST['city']),
'skype' => Core\Functions::strEncode($_POST['skype']),
'street' => Core\Functions::strEncode($_POST['street']),
'house_number' => Core\Functions::strEncode($_POST['house_number']),
'zip' => Core\Functions::strEncode($_POST['zip']),
'city' => Core\Functions::strEncode($_POST['city']),
'address_display' => isset($_POST['address_display']) ? 1 : 0,
'country' => Core\Functions::str_encode($_POST['country']),
'country' => Core\Functions::strEncode($_POST['country']),
'country_display' => isset($_POST['country_display']) ? 1 : 0,
'date_format_long' => Core\Functions::str_encode($_POST['date_format_long']),
'date_format_short' => Core\Functions::str_encode($_POST['date_format_short']),
'date_format_long' => Core\Functions::strEncode($_POST['date_format_long']),
'date_format_short' => Core\Functions::strEncode($_POST['date_format_short']),
'time_zone' => $_POST['date_time_zone'],
'language' => $_POST['language'],
'entries' => (int) $_POST['entries'],
......@@ -310,25 +310,25 @@ class UsersAdmin extends Core\ModuleController {
} else {
$update_values = array(
'super_user' => (int) $_POST['super_user'],
'nickname' => Core\Functions::str_encode($_POST['nickname']),
'realname' => Core\Functions::str_encode($_POST['realname']),
'nickname' => Core\Functions::strEncode($_POST['nickname']),
'realname' => Core\Functions::strEncode($_POST['realname']),
'gender' => (int) $_POST['gender'],
'birthday' => $_POST['birthday'],
'birthday_display' => (int) $_POST['birthday_display'],
'mail' => $_POST['mail'],
'mail_display' => (int) $_POST['mail_display'],
'website' => Core\Functions::str_encode($_POST['website']),
'website' => Core\Functions::strEncode($_POST['website']),
'icq' => $_POST['icq'],
'skype' => Core\Functions::str_encode($_POST['skype']),
'street' => Core\Functions::str_encode($_POST['street']),
'house_number' => Core\Functions::str_encode($_POST['house_number']),
'zip' => Core\Functions::str_encode($_POST['zip']),
'city' => Core\Functions::str_encode($_POST['city']),
'skype' => Core\Functions::strEncode($_POST['skype']),
'street' => Core\Functions::strEncode($_POST['street']),
'house_number' => Core\Functions::strEncode($_POST['house_number']),
'zip' => Core\Functions::strEncode($_POST['zip']),
'city' => Core\Functions::strEncode($_POST['city']),
'address_display' => (int) $_POST['address_display'],
'country' => Core\Functions::str_encode($_POST['country']),
'country' => Core\Functions::strEncode($_POST['country']),
'country_display' => (int) $_POST['country_display'],
'date_format_long' => Core\Functions::str_encode($_POST['date_format_long']),
'date_format_short' => Core\Functions::str_encode($_POST['date_format_short']),
'date_format_long' => Core\Functions::strEncode($_POST['date_format_long']),
'date_format_short' => Core\Functions::strEncode($_POST['date_format_short']),
'time_zone' => $_POST['date_time_zone'],
'language' => $_POST['language'],
'entries' => (int) $_POST['entries'],
......
......@@ -45,19 +45,19 @@ class UsersFrontend extends Core\ModuleController {
Core\Registry::get('View')->setContent(Core\Functions::errorBox(Core\Registry::get('Lang')->t('system', 'form_already_submitted')));
} else {
$update_values = array(
'nickname' => Core\Functions::str_encode($_POST['nickname']),
'realname' => Core\Functions::str_encode($_POST['realname']),
'nickname' => Core\Functions::strEncode($_POST['nickname']),
'realname' => Core\Functions::strEncode($_POST['realname']),
'gender' => (int) $_POST['gender'],
'birthday' => $_POST['birthday'],
'mail' => $_POST['mail'],
'website' => Core\Functions::str_encode($_POST['website']),
'website' => Core\Functions::strEncode($_POST['website']),
'icq' => $_POST['icq'],
'skype' => Core\Functions::str_encode($_POST['skype']),
'street' => Core\Functions::str_encode($_POST['street']),
'house_number' => Core\Functions::str_encode($_POST['house_number']),
'zip' => Core\Functions::str_encode($_POST['zip']),
'city' => Core\Functions::str_encode($_POST['city']),
'country' => Core\Functions::str_encode($_POST['country']),
'skype' => Core\Functions::strEncode($_POST['skype']),
'street' => Core\Functions::strEncode($_POST['street']),
'house_number' => Core\Functions::strEncode($_POST['house_number']),
'zip' => Core\Functions::strEncode($_POST['zip']),
'city' => Core\Functions::strEncode($_POST['city']),
'country' => Core\Functions::strEncode($_POST['country']),
);
// Neues Passwort
......@@ -169,8 +169,8 @@ class UsersFrontend extends Core\ModuleController {
'birthday_display' => (int) $_POST['birthday_display'],
'address_display' => (int) $_POST['address_display'],
'country_display' => (int) $_POST['country_display'],
'date_format_long' => Core\Functions::str_encode($_POST['date_format_long']),
'date_format_short' => Core\Functions::str_encode($_POST['date_format_short']),
'date_format_long' => Core\Functions::strEncode($_POST['date_format_long']),
'date_format_short' => Core\Functions::strEncode($_POST['date_format_short']),
'time_zone' => $_POST['date_time_zone'],
);
if ($settings['language_override'] == 1)
......@@ -318,7 +318,7 @@ class UsersFrontend extends Core\ModuleController {
->append(Core\Registry::get('Lang')->t('users', 'home'));
if (isset($_POST['submit']) === true) {
$bool = Core\Registry::get('Db')->update(DB_PRE . 'users', array('draft' => Core\Functions::str_encode($_POST['draft'], true)), array('id' => Core\Registry::get('Auth')->getUserId()));
$bool = Core\Registry::get('Db')->update(DB_PRE . 'users', array('draft' => Core\Functions::strEncode($_POST['draft'], true)), array('id' => Core\Registry::get('Auth')->getUserId()));
Core\Functions::setRedirectMessage($bool, Core\Registry::get('Lang')->t('system', $bool !== false ? 'edit_success' : 'edit_error'), 'users/home');
}
......@@ -356,7 +356,7 @@ class UsersFrontend extends Core\ModuleController {
if (Core\Registry::get(