Commit 41892c9c authored by fettesvieh's avatar fettesvieh

- converted all functions to camelCase

- fixed a parse error in the update.php
parent a9476d82
......@@ -32,7 +32,7 @@ function captcha($captcha_length = 5)
* Zurück Hyperlink
* @return string
*/
function combo_box($text, $forward = 0, $back = 0)
function comboBox($text, $forward = 0, $back = 0)
{
global $tpl;
......@@ -63,7 +63,7 @@ function combo_box($text, $forward = 0, $back = 0)
* Datumsformat
* @return mixed
*/
function date_aligned($mode, $time_stamp, $format = 0)
function dateAligned($mode, $time_stamp, $format = 0)
{
global $auth;
static $info = array();
......@@ -84,7 +84,7 @@ function date_aligned($mode, $time_stamp, $format = 0)
}
$offset = $time_zone + ($dst == '1' ? 3600 : 0);
// Datum in jeweiliger Formatierung ausgeben
// Datum in gewünschter Formatierung ausgeben
if ($mode == 1) {
$format = !empty($format) ? $format : CONFIG_DATE;
return gmdate($format, $time_stamp + $offset);
......@@ -108,7 +108,7 @@ function date_aligned($mode, $time_stamp, $format = 0)
* @return string
* Die Dateigröße als Fließkommazahl, mit der dazugehörigen Einheit
*/
function calc_filesize($value)
function calcFilesize($value)
{
$units = array(
0 => 'Byte',
......@@ -165,11 +165,11 @@ function lang($module, $key)
* @return array
* Gibt ein Array mit dem Namen und der Größe der neuen Datei aus
*/
function move_file($tmp_filename, $filename, $dir)
function moveFile($tmp_filename, $filename, $dir)
{
$ext = strrchr($filename, '.');
$path = ACP3_ROOT . 'uploads/' . $dir . '/';
$ext = strrchr($filename, '.');
$new_name = 1;
while (file_exists($path . $new_name . $ext)) {
$new_name++;
......@@ -179,7 +179,7 @@ function move_file($tmp_filename, $filename, $dir)
echo sprintf(lang('common', 'upload_error'), $filename);
} else {
$new_file['name'] = $new_name . $ext;
$new_file['size'] = calc_filesize(filesize($path . $new_file['name']));
$new_file['size'] = calcFilesize(filesize($path . $new_file['name']));
return $new_file;
}
......@@ -243,22 +243,6 @@ function pagination($rows)
return $tpl->fetch('common/pagination.html');
}
}
/**
* Überprüft, ob eine Seite öffentlich zugänglich ist
*
* @param integer $start_time
* Startdatum
* @param integer $end_time
* Enddatum
* @return boolean
*/
function publish_check($start_time, $end_time)
{
if ($start_time == $end_time && $start_time <= date_aligned(2, time()) || $start_time != $end_time && $start_time <= date_aligned(2, time()) && $end_time >= date_aligned(2, time())) {
return true;
}
return false;
}
/**
* Zeigt Dropdown-Menüs für die Veröffentlichungsdauer von Inhalten an
*
......@@ -268,11 +252,11 @@ function publish_check($start_time, $end_time)
* Die Zeitstempel des Eintrages
* @return string
*/
function publication_period($mode, $value = '')
function publicationPeriod($mode, $value = '')
{
global $tpl;
$get_year = date_aligned(1, time(), 'Y');
$get_year = dateAligned(1, time(), 'Y');
$date = array(
'day' => 'j|1|31',
'month' => 'n|1|12',
......@@ -281,58 +265,58 @@ function publication_period($mode, $value = '')
'min' => 'i|0|59'
);
if (!empty($value)) {
$date_arr = explode('.', date_aligned(1, $value, 'j.n.Y.G.i'));
$date_arr = explode('.', dateAligned(1, $value, 'j.n.Y.G.i'));
}
$tpl->assign('mode', $mode);
// Tag
$day_arr = explode('|', $date['day']);
$time = !isset($date_arr[0]) ? date_aligned(1, time(), $day_arr[0]) : $date_arr[0];
$time = !isset($date_arr[0]) ? dateAligned(1, time(), $day_arr[0]) : $date_arr[0];
$day = NULL;
for ($day_arr[1]; $day_arr[1] <= $day_arr[2]; $day_arr[1]++) {
$day[$day_arr[1]]['value'] = $day_arr[1];
$day[$day_arr[1]]['selected'] = select_entry($mode . '_day', $day_arr[1], $time);
$day[$day_arr[1]]['selected'] = selectEntry($mode . '_day', $day_arr[1], $time);
}
$tpl->assign('day', $day);
// Monat
$month_arr = explode('|', $date['month']);
$time = !isset($date_arr[1]) ? date_aligned(1, time(), $month_arr[0]) : $date_arr[1];
$time = !isset($date_arr[1]) ? dateAligned(1, time(), $month_arr[0]) : $date_arr[1];
$month = NULL;
for ($month_arr[1]; $month_arr[1] <= $month_arr[2]; $month_arr[1]++) {
$month[$month_arr[1]]['value'] = $month_arr[1];
$month[$month_arr[1]]['selected'] = select_entry($mode . '_month', $month_arr[1], $time);
$month[$month_arr[1]]['selected'] = selectEntry($mode . '_month', $month_arr[1], $time);
}
$tpl->assign('month', $month);
// Jahr
$year_arr = explode('|', $date['year']);
$time = !isset($date_arr[2]) ? date_aligned(1, time(), $year_arr[0]) : $date_arr[2];
$time = !isset($date_arr[2]) ? dateAligned(1, time(), $year_arr[0]) : $date_arr[2];
$year = NULL;
for ($year_arr[1]; $year_arr[1] <= $year_arr[2]; $year_arr[1]++) {
$year[$year_arr[1]]['value'] = $year_arr[1];
$year[$year_arr[1]]['selected'] = select_entry($mode . '_year', $year_arr[1], $time);
$year[$year_arr[1]]['selected'] = selectEntry($mode . '_year', $year_arr[1], $time);
}
$tpl->assign('year', $year);
// Stunde
$hour_arr = explode('|', $date['hour']);
$time = !isset($date_arr[3]) ? date_aligned(1, time(), $hour_arr[0]) : $date_arr[3];
$time = !isset($date_arr[3]) ? dateAligned(1, time(), $hour_arr[0]) : $date_arr[3];
$hour = NULL;
for ($hour_arr[1]; $hour_arr[1] <= $hour_arr[2]; $hour_arr[1]++) {
$hour[$hour_arr[1]]['value'] = $hour_arr[1];
$hour[$hour_arr[1]]['selected'] = select_entry($mode . '_hour', $hour_arr[1], $time);
$hour[$hour_arr[1]]['selected'] = selectEntry($mode . '_hour', $hour_arr[1], $time);
}
$tpl->assign('hour', $hour);
// Minute
$min_arr = explode('|', $date['min']);
$time = !isset($date_arr[4]) ? date_aligned(1, time(), $min_arr[0]) : $date_arr[4];
$time = !isset($date_arr[4]) ? dateAligned(1, time(), $min_arr[0]) : $date_arr[4];
$min = NULL;
for ($min_arr[1]; $min_arr[1] <= $min_arr[2]; $min_arr[1]++) {
$min[$min_arr[1]]['value'] = $min_arr[1];
$min[$min_arr[1]]['selected'] = select_entry($mode . '_min', $min_arr[1], $time);
$min[$min_arr[1]]['selected'] = selectEntry($mode . '_min', $min_arr[1], $time);
}
$tpl->assign('min', $min);
......@@ -381,7 +365,7 @@ function salt($str_length)
* HTML-Attribut, um Eintrag zu selektieren
* @return string
*/
function select_entry($name, $value, $field_value = '', $attr = 'selected')
function selectEntry($name, $value, $field_value = '', $attr = 'selected')
{
$attr = ' ' . $attr . '="' . $attr . '"';
......@@ -412,14 +396,14 @@ function select_entry($name, $value, $field_value = '', $attr = 'selected')
* Der Wert der aktuell eingestellten Zeitzone
* @return array
*/
function time_zones($value)
function timeZones($value)
{
$time_zones = array(-12, -11, -10, -9.5, -9, -8, -7, -6, -5, -4, -3.5, -3, -2, -1, 0, 1, 2, 3, 3.5, 4, 4.5, 5, 5.5, 5.75, 6, 6.5, 7, 8, 8.75, 9, 9.5, 10, 10.5, 11, 11.5, 12, 12.75, 13, 14);
$time_zone = array();
$i = 0;
foreach ($time_zones as $row) {
$time_zone[$i]['value'] = $row * 3600;
$time_zone[$i]['selected'] = select_entry('time_zone', $row * 3600, $value);
$time_zone[$i]['selected'] = selectEntry('time_zone', $row * 3600, $value);
$time_zone[$i]['lang'] = lang('common', 'utc' . $row);
$i++;
}
......
......@@ -33,7 +33,7 @@ if (CONFIG_MAINTENANCE == '1' && defined('IN_ACP3')) {
// Navigationsleisten
if ($modules->check('pages', 'functions')) {
include_once ACP3_ROOT . 'modules/pages/functions.php';
$tpl->assign('navbar', process_navbar());
$tpl->assign('navbar', processNavbar());
}
// Seitentitel und Brotkrümelspur setzen
......
......@@ -29,7 +29,7 @@ if (isset($_POST['submit'])) {
$errors[] = lang('access', 'select_modules');
if (isset($errors)) {
$tpl->assign('error_msg', combo_box($errors));
$tpl->assign('error_msg', comboBox($errors));
} else {
// String für die einzelnen Zugriffslevel auf die Module erstellen
$form['modules']['errors'] = '2';
......@@ -48,7 +48,7 @@ if (isset($_POST['submit'])) {
$bool = $db->insert('access', $insert_values);
$content = combo_box($bool ? lang('access', 'create_success') : lang('access', 'create_error'), uri('acp/access'));
$content = comboBox($bool ? lang('access', 'create_success') : lang('access', 'create_error'), uri('acp/access'));
}
}
if (!isset($_POST['submit']) || isset($errors) && is_array($errors)) {
......
......@@ -16,13 +16,13 @@ elseif (isset($modules->gen['entries']) && preg_match('/^([\d|]+)$/', $modules->
$entries = $modules->gen['entries'];
if (!isset($entries)) {
$content = combo_box(array(lang('common', 'no_entries_selected')));
$content = comboBox(array(lang('common', 'no_entries_selected')));
} elseif (is_array($entries)) {
$marked_entries = '';
foreach ($entries as $entry) {
$marked_entries.= $entry . '|';
}
$content = combo_box(lang('access', 'confirm_delete'), uri('acp/access/delete/entries_' . $marked_entries), uri('acp/access'));
$content = comboBox(lang('access', 'confirm_delete'), uri('acp/access/delete/entries_' . $marked_entries), uri('acp/access'));
} elseif (preg_match('/^([\d|]+)$/', $entries) && isset($modules->gen['confirmed'])) {
$marked_entries = explode('|', $entries);
$bool = 0;
......@@ -42,6 +42,6 @@ if (!isset($entries)) {
} else {
$text = $bool ? lang('access', 'delete_success') : lang('access', 'delete_error');
}
$content = combo_box($text, uri('acp/access'));
$content = comboBox($text, uri('acp/access'));
}
?>
\ No newline at end of file
......@@ -30,7 +30,7 @@ if (!empty($modules->id) && $db->select('id', 'access', 'id = \'' . $modules->id
$errors[] = lang('access', 'select_modules');
if (isset($errors)) {
$tpl->assign('error_msg', combo_box($errors));
$tpl->assign('error_msg', comboBox($errors));
} else {
// String für die einzelnen Zugriffslevel auf die Module erstellen
$form['modules']['errors'] = '2';
......@@ -48,7 +48,7 @@ if (!empty($modules->id) && $db->select('id', 'access', 'id = \'' . $modules->id
$bool = $db->update('access', $update_values, 'id = \'' . $modules->id . '\'');
$content = combo_box($bool ? lang('access', 'edit_success') : lang('access', 'edit_error'), uri('acp/access'));
$content = comboBox($bool ? lang('access', 'edit_success') : lang('access', 'edit_error'), uri('acp/access'));
}
}
if (!isset($_POST['submit']) || isset($errors) && is_array($errors)) {
......
......@@ -30,11 +30,11 @@ if (isset($_POST['submit'])) {
$errors[] = lang('categories', 'category_already_exists');
if (isset($errors)) {
$tpl->assign('error_msg', combo_box($errors));
$tpl->assign('error_msg', comboBox($errors));
} else {
$file_sql = null;
if (!empty($file)) {
$result = move_file($file['tmp_name'], $file['name'], 'categories');
$result = moveFile($file['tmp_name'], $file['name'], 'categories');
$file_sql = array('picture' => $result['name']);
}
......@@ -52,7 +52,7 @@ if (isset($_POST['submit'])) {
$cache->create('categories_' . $form['module'], $db->select('id, name, picture, description', 'categories', 'module = \'' . $form['module'] . '\'', 'name ASC'));
$content = combo_box($bool ? lang('categories', 'create_success') : lang('categories', 'create_error'), uri('acp/categories'));
$content = comboBox($bool ? lang('categories', 'create_success') : lang('categories', 'create_error'), uri('acp/categories'));
}
}
if (!isset($_POST['submit']) || isset($errors) && is_array($errors)) {
......@@ -62,7 +62,7 @@ if (!isset($_POST['submit']) || isset($errors) && is_array($errors)) {
foreach ($mod_list as $name => $info) {
if ($info['active'] && $info['categories']) {
$mod_list[$name]['selected'] = select_entry('module', $info['dir']);
$mod_list[$name]['selected'] = selectEntry('module', $info['dir']);
} else {
unset($mod_list[$name]);
}
......
......@@ -16,13 +16,13 @@ elseif (isset($modules->gen['entries']) && preg_match('/^([\d|]+)$/', $modules->
$entries = $modules->gen['entries'];
if (!isset($entries)) {
$content = combo_box(array(lang('common', 'no_entries_selected')));
$content = comboBox(array(lang('common', 'no_entries_selected')));
} elseif (is_array($entries)) {
$marked_entries = '';
foreach ($entries as $entry) {
$marked_entries.= $entry . '|';
}
$content = combo_box(lang('categories', 'confirm_delete'), uri('acp/categories/delete/entries_' . $marked_entries), uri('acp/categories'));
$content = comboBox(lang('categories', 'confirm_delete'), uri('acp/categories/delete/entries_' . $marked_entries), uri('acp/categories'));
} elseif (preg_match('/^([\d|]+)$/', $entries) && isset($modules->gen['confirmed'])) {
$marked_entries = explode('|', $entries);
$bool = 0;
......@@ -55,6 +55,6 @@ if (!isset($entries)) {
} else {
$text = $bool ? lang('categories', 'delete_success') : lang('categories', 'delete_error');
}
$content = combo_box($text, uri('acp/categories'));
$content = comboBox($text, uri('acp/categories'));
}
?>
\ No newline at end of file
......@@ -29,11 +29,11 @@ if (!empty($modules->id) && $db->select('id', 'categories', 'id = \'' . $modules
$errors[] = lang('categories', 'category_already_exists');
if (isset($errors)) {
$tpl->assign('error_msg', combo_box($errors));
$tpl->assign('error_msg', comboBox($errors));
} else {
$new_file_sql = null;
if (isset($file) && is_array($file)) {
$result = move_file($file['tmp_name'], $file['name'], 'categories');
$result = moveFile($file['tmp_name'], $file['name'], 'categories');
$new_file_sql = array('picture' => $result['name']);
}
......@@ -51,7 +51,7 @@ if (!empty($modules->id) && $db->select('id', 'categories', 'id = \'' . $modules
$cache->create('categories_' . $db->escape($category[0]['module'], 3), $db->select('id, name, picture, description', 'categories', 'module = \'' . $db->escape($category[0]['module'], 3) . '\'', 'name ASC'));
$content = combo_box($bool ? lang('categories', 'edit_success') : lang('categories', 'edit_error'), uri('acp/categories'));
$content = comboBox($bool ? lang('categories', 'edit_success') : lang('categories', 'edit_error'), uri('acp/categories'));
}
}
if (!isset($_POST['submit']) || isset($errors) && is_array($errors)) {
......
......@@ -22,7 +22,7 @@ function categoriesList($module, $page, $category = '') {
if ($c_categories > 0) {
for ($i = 0; $i < $c_categories; $i++) {
$categories[$i]['selected'] = select_entry('cat', $categories[$i]['id'], $category);
$categories[$i]['selected'] = selectEntry('cat', $categories[$i]['id'], $category);
$categories[$i]['name'] = $categories[$i]['name'];
}
return $categories;
......
......@@ -44,11 +44,11 @@ if (empty($module) || !empty($module) && $db->select('id', 'comments', 'module =
if ($c_comments > 0) {
$tpl->assign('pagination', pagination($db->select('id', 'comments', 'module = \'' . $module . '\'', 0, 0, 0, 1)));
for ($i = 0; $i < $c_comments; $i++) {
$comments[$i]['date'] = date_aligned(1, $comments[$i]['date']);
$comments[$i]['date'] = dateAligned(1, $comments[$i]['date']);
$comments[$i]['name'] = $comments[$i]['name'];
$comments[$i]['message'] = str_replace(array("\r\n", "\r", "\n"), '<br />', $comments[$i]['message']);
if ($emoticons) {
$comments[$i]['message'] = emoticons_replace($comments[$i]['message']);
$comments[$i]['message'] = emoticonsReplace($comments[$i]['message']);
}
}
$tpl->assign('comments', $comments);
......
......@@ -16,13 +16,13 @@ elseif (isset($modules->gen['entries']) && preg_match('/^([\d|]+)$/', $modules->
$entries = $modules->gen['entries'];
if (!isset($entries)) {
$content = combo_box(array(lang('common', 'no_entries_selected')));
$content = comboBox(array(lang('common', 'no_entries_selected')));
} elseif (is_array($entries)) {
$marked_entries = '';
foreach ($entries as $entry) {
$marked_entries.= $entry . '|';
}
$content = combo_box(lang('comments', 'confirm_delete'), uri('acp/comments/delete_comments/entries_' . $marked_entries), uri('acp/comments'));
$content = comboBox(lang('comments', 'confirm_delete'), uri('acp/comments/delete_comments/entries_' . $marked_entries), uri('acp/comments'));
} elseif (preg_match('/^([\d|]+)$/', $entries) && isset($modules->gen['confirmed'])) {
$marked_entries = explode('|', $entries);
$bool = 0;
......@@ -30,6 +30,6 @@ if (!isset($entries)) {
if (!empty($entry) && $validate->isNumber($entry) && $db->select('id', 'comments', 'id = \'' . $entry . '\'', 0, 0, 0, 1) == '1')
$bool = $db->delete('comments', 'id = \'' . $entry . '\'');
}
$content = combo_box($bool ? lang('comments', 'delete_success') : lang('comments', 'delete_error'), uri('acp/comments'));
$content = comboBox($bool ? lang('comments', 'delete_success') : lang('comments', 'delete_error'), uri('acp/comments'));
}
?>
\ No newline at end of file
......@@ -16,13 +16,13 @@ elseif (isset($modules->gen['entries']) && preg_match('/^([\w|]+)$/', $modules->
$entries = $modules->gen['entries'];
if (!isset($entries)) {
$content = combo_box(array(lang('common', 'no_entries_selected')));
$content = comboBox(array(lang('common', 'no_entries_selected')));
} elseif (is_array($entries)) {
$marked_entries = '';
foreach ($entries as $entry) {
$marked_entries.= $entry . '|';
}
$content = combo_box(lang('comments', 'confirm_delete'), uri('acp/comments/delete_comments_per_module/entries_' . $marked_entries), uri('acp/comments'));
$content = comboBox(lang('comments', 'confirm_delete'), uri('acp/comments/delete_comments_per_module/entries_' . $marked_entries), uri('acp/comments'));
} elseif (preg_match('/^([\w|]+)$/', $entries) && isset($modules->gen['confirmed'])) {
$marked_entries = explode('|', $entries);
$bool = 0;
......@@ -30,6 +30,6 @@ if (!isset($entries)) {
if (!empty($entry) && preg_match('/^(\w+)$/', $entry) && $db->select('id', 'comments', 'module = \'' . $entry . '\'', 0, 0, 0, 1) > '0')
$bool = $db->delete('comments', 'module = \'' . $entry . '\'');
}
$content = combo_box($bool ? lang('comments', 'delete_success') : lang('comments', 'delete_error'), uri('acp/comments'));
$content = comboBox($bool ? lang('comments', 'delete_success') : lang('comments', 'delete_error'), uri('acp/comments'));
}
?>
\ No newline at end of file
......@@ -28,7 +28,7 @@ if (!empty($modules->id) && $db->select('id', 'comments', 'id = \'' . $modules->
$errors[] = lang('common', 'message_to_short');
if (isset($errors)) {
$tpl->assign('error_msg', combo_box($errors));
$tpl->assign('error_msg', comboBox($errors));
} else {
$update_values = array(
'name' => $db->escape($form['name']),
......@@ -37,7 +37,7 @@ if (!empty($modules->id) && $db->select('id', 'comments', 'id = \'' . $modules->
$bool = $db->update('comments', $update_values, 'id = \'' . $modules->id . '\'');
$content = combo_box($bool ? lang('comments', 'edit_success') : lang('comments', 'edit_error'), uri('acp/comments'));
$content = comboBox($bool ? lang('comments', 'edit_success') : lang('comments', 'edit_error'), uri('acp/comments'));
}
}
if (!isset($_POST['submit']) || isset($errors) && is_array($errors)) {
......
......@@ -15,7 +15,7 @@
* Das jeweilige Modul
* @return integer
*/
function comments_count($entry_id, $module = 0)
function commentsCount($entry_id, $module = 0)
{
global $db, $modules;
......@@ -51,7 +51,7 @@ function comments($module = 0, $entry_id = 0)
if (count($flood) == '1') {
$flood_time = $flood[0]['date'] + CONFIG_FLOOD;
}
$time = date_aligned(2, time());
$time = dateAligned(2, time());
if (isset($flood_time) && $flood_time > $time)
$errors[] = sprintf(lang('common', 'flood_no_entry_possible'), $flood_time - $time);
......@@ -65,7 +65,7 @@ function comments($module = 0, $entry_id = 0)
$errors[] = lang('captcha', 'invalid_captcha_entered');
if (isset($errors)) {
$tpl->assign('error_msg', combo_box($errors));
$tpl->assign('error_msg', comboBox($errors));
} else {
$insert_values = array(
'id' => '',
......@@ -80,7 +80,7 @@ function comments($module = 0, $entry_id = 0)
$bool = $db->insert('comments', $insert_values);
return combo_box($bool ? lang('comments', 'create_success') : lang('comments', 'create_error'), uri($module . '/details/id_' . $entry_id));
return comboBox($bool ? lang('comments', 'create_success') : lang('comments', 'create_error'), uri($module . '/details/id_' . $entry_id));
}
}
if (!isset($_POST['submit']) || isset($errors) && is_array($errors)) {
......@@ -97,19 +97,19 @@ function comments($module = 0, $entry_id = 0)
$emoticons = true;
//Emoticons im Formular anzeigen
$tpl->assign('emoticons', emoticons_list());
$tpl->assign('emoticons', emoticonsList());
}
if ($c_comments > 0) {
$tpl->assign('pagination', pagination($db->select('id', 'comments', 'module = \'' . $module . '\' AND entry_id = \'' . $entry_id . '\'', 0, 0, 0, 1)));
for ($i = 0; $i < $c_comments; $i++) {
$comments[$i]['date'] = date_aligned(1, $comments[$i]['date']);
$comments[$i]['date'] = dateAligned(1, $comments[$i]['date']);
if (empty($comments[$i]['user_id'])) {
unset($comments[$i]['user_id']);
}
$comments[$i]['message'] = str_replace(array("\r\n", "\r", "\n"), '<br />', $comments[$i]['message']);
if ($emoticons) {
$comments[$i]['message'] = emoticons_replace($comments[$i]['message']);
$comments[$i]['message'] = emoticonsReplace($comments[$i]['message']);
}
}
$tpl->assign('comments', $comments);
......
......@@ -17,7 +17,7 @@ if (isset($_POST['submit'])) {
$errors[] = lang('common', 'wrong_email_format');
if (isset($errors)) {
$tpl->assign('error_msg', combo_box($errors));
$tpl->assign('error_msg', comboBox($errors));
} else {
$form['address'] = $db->escape($form['address'], 2);
$form['telephone'] = $db->escape($form['telephone']);
......@@ -27,7 +27,7 @@ if (isset($_POST['submit'])) {
$bool = $config->module('contact', $form);
$content = combo_box($bool ? lang('contact', 'edit_success') : lang('contact', 'edit_error'), uri('acp/contact'));
$content = comboBox($bool ? lang('contact', 'edit_success') : lang('contact', 'edit_error'), uri('acp/contact'));
}
}
if (!isset($_POST['submit']) || isset($errors) && is_array($errors)) {
......
......@@ -23,7 +23,7 @@ if (isset($_POST['submit'])) {
$errors[] = lang('captcha', 'invalid_captcha_entered');
if (isset($errors)) {
$tpl->assign('error_msg', combo_box($errors));
$tpl->assign('error_msg', comboBox($errors));
} else {
$contact = $config->output('contact');
......@@ -32,7 +32,7 @@ if (isset($_POST['submit'])) {
$bool = @mail($contact['mail'], $subject, $body, 'FROM:' . $form['mail']);
$content = combo_box($bool ? lang('contact', 'send_mail_success') : lang('contact', 'send_mail_error'), uri('contact'));
$content = comboBox($bool ? lang('contact', 'send_mail_success') : lang('contact', 'send_mail_error'), uri('contact'));
}
}
if (!isset($_POST['submit']) || isset($errors) && is_array($errors)) {
......
......@@ -26,9 +26,9 @@ if (isset($_POST['submit'])) {
$errors[] = lang('emoticons', 'select_picture');
if (isset($errors)) {
$tpl->assign('error_msg', combo_box($errors));
$tpl->assign('error_msg', comboBox($errors));
} else {
$result = move_file($file['tmp_name'], $file['name'], 'emoticons');
$result = moveFile($file['tmp_name'], $file['name'], 'emoticons');
$insert_values = array(
'id' => '',
......@@ -41,7 +41,7 @@ if (isset($_POST['submit'])) {
$cache->create('emoticons', $db->select('code, description, img', 'emoticons'));
$content = combo_box($bool ? lang('emoticons', 'create_success') : lang('emoticons', 'create_error'), uri('acp/emoticons'));
$content = comboBox($bool ? lang('emoticons', 'create_success') : lang('emoticons', 'create_error'), uri('acp/emoticons'));
}
}
if (!isset($_POST['submit']) || isset($errors) && is_array($errors)) {
......
......@@ -16,13 +16,13 @@ elseif (isset($modules->gen['entries']) && preg_match('/^([\d|]+)$/', $modules->
$entries = $modules->gen['entries'];
if (!isset($entries)) {
$content = combo_box(array(lang('common', 'no_entries_selected')));
$content = comboBox(array(lang('common', 'no_entries_selected')));
} elseif (is_array($entries)) {
$marked_entries = '';
foreach ($entries as $entry) {
$marked_entries.= $entry . '|';
}
$content = combo_box(lang('emoticons', 'confirm_delete'), uri('acp/emoticons/delete/entries_' . $marked_entries), uri('acp/emoticons'));
$content = comboBox(lang('emoticons', 'confirm_delete'), uri('acp/emoticons/delete/entries_' . $marked_entries), uri('acp/emoticons'));
} elseif (preg_match('/^([\d|]+)$/', $entries) && isset($modules->gen['confirmed'])) {
$marked_entries = explode('|', $entries);
$bool = 0;
......@@ -37,6 +37,6 @@ if (!isset($entries)) {
}
$cache->create('emoticons', $db->select('code, description, img', 'emoticons'));
$content = combo_box($bool ? lang('emoticons', 'delete_success') : lang('emoticons', 'delete_error'), uri('acp/emoticons'));
$content = comboBox($bool ? lang('emoticons', 'delete_success') : lang('emoticons', 'delete_error'), uri('acp/emoticons'));
}
?>
\ No newline at end of file
......@@ -27,11 +27,11 @@ if (!empty($modules->id) && $db->select('id', 'emoticons', 'id = \'' . $modules-
$errors[] = lang('emoticons', 'select_picture');
if (isset($errors)) {
$tpl->assign('error_msg', combo_box($errors));
$tpl->assign('error_msg', comboBox($errors));
} else {
$new_file_sql = null;
if (isset($file)) {
$result = move_file($file['tmp_name'], $file['name'], 'emoticons');
$result = moveFile($file['tmp_name'], $file['name'], 'emoticons');
$new_file_sql = array('img' => $result['name'],);
}
......@@ -47,7 +47,7 @@ if (!empty($modules->id) && $db->select('id', 'emoticons', 'id = \'' . $modules-
$cache->create('emoticons', $db->select('code, description, img', 'emoticons'));
$content = combo_box($bool ? lang('emoticons', 'edit_success') : lang('emoticons', 'edit_error'), uri('acp/emoticons'));
$content = comboBox($bool ? lang('emoticons', 'edit_success') : lang('emoticons', 'edit_error'), uri('acp/emoticons'));
}
}
if (!isset($_POST['submit']) || isset($errors) && is_array($errors)) {
......
......@@ -13,7 +13,7 @@
* Die ID des Eingabefeldes, in welches die Emoticons eingefügt werden sollen
* @return string
*/
function emoticons_list($field_id = 0)
function emoticonsList($field_id = 0)
{
global $cache, $db, $tpl;
......@@ -38,7 +38,7 @@ function emoticons_list($field_id = 0)
* Zu durchsuchender Text nach Zeichen
* @return string
*/
function emoticons_replace($string)
function emoticonsReplace($string)
{
global $cache, $db;
static $emoticons = array();
......
......@@ -16,8 +16,8 @@ $c_files = count($files);
if ($c_files > 0) {
$tpl->assign('pagination', pagination($db->select('id', 'files', 0, 0, 0, 0, 1)));
for ($i = 0; $i < $c_files; $i++) {
$files[$i]['start'] = date_aligned(1, $files[$i]['start']);
$files[$i]['end'] = date_aligned(1, $files[$i]['end']);
$files[$i]['start'] = dateAligned(1, $files[$i]['start']);
$files[$i]['end'] = dateAligned(1, $files[$i]['end']);
$files[$i]['size'] = !empty($files[$i]['size']) ? $files[$i]['size'] : lang('files', 'unknown_filesize');
$files[$i]['link_title'] = $files[$i]['link_title'];
}
......
......@@ -34,10 +34,10 @@ if (isset($_POST['submit'])) {
$errors[] = lang('files', 'select_category');
if (isset($errors)) {
$tpl->assign('error_msg', combo_box($errors));
$tpl->assign('error_msg', comboBox($errors));
} else {
if (is_array($file)) {
$result = move_file($file['tmp_name'], $file['name'], 'files');
$result = moveFile($file['tmp_name'], $file['name'], 'files');
$new_file = $result['name'];
$filesize = $result['size'];
} elseif (is_string($file)) {
......@@ -45,8 +45,8 @@ if (isset($_POST['submit'])) {
$new_file = $file;
$filesize = $form['filesize'] . ' ' . $form['unit'];
}
$start_date = date_aligned(3, array($form['start_hour'], $form['start_min'], 0, $form['start_month'], $form['start_day'], $form['start_year']));
$end_date = date_aligned(3, array($form['end_hour'], $form['end_min'], 0, $form['end_month'], $form['end_day'], $form['end_year']));
$start_date = dateAligned(3, array($form['start_hour'], $form['start_min'], 0, $form['start_month'], $form['start_day'], $form['start_year']));
$end_date = dateAligned(3, array($form['end_hour'], $form['end_min'], 0, $form['end_month'], $form['end_day'], $form['end_year']));
$insert_values = array(
'id' => '',
......@@ -61,24 +61,24 @@ if (isset($_POST['submit'])) {
$bool = $db->insert('files', $insert_values);
$content = combo_box($bool ? lang('files', 'create_success') : lang('files', 'create_error'), uri('acp/files'));
$content = comboBox($bool ? lang('files', 'create_success') : lang('files', 'create_error'), uri('acp/files'));
}
}
if (!isset($_POST</