Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…itIdea/trunk@49 c90d7304-6b46-9944-86d7-b11c84624b7c
  • Loading branch information
hertsch committed Mar 6, 2012
1 parent 3fe6631 commit 58352d9
Show file tree
Hide file tree
Showing 8 changed files with 546 additions and 519 deletions.
833 changes: 417 additions & 416 deletions class.backend.php

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions class.frontend.php
Expand Up @@ -156,7 +156,7 @@ public function __construct() {
$this->page_link = $url;
$this->template_path = WB_PATH . '/modules/' . basename(dirname(__FILE__)) . '/templates/' . $this->params[self::PARAM_PRESET] . '/' . KIT_IDEA_LANGUAGE . '/';
$this->img_url = WB_URL . '/modules/' . basename(dirname(__FILE__)) . '/images/';
date_default_timezone_set(cfg_time_zone);
date_default_timezone_set(CFG_TIME_ZONE);
$this->media_path = WB_PATH . MEDIA_DIRECTORY . '/' . $dbIdeaCfg->getValue(dbIdeaCfg::cfgMediaDir) . '/';
$this->media_url = str_replace(WB_PATH, WB_URL, $this->media_path);
$this->lang = $I18n;
Expand Down Expand Up @@ -551,7 +551,7 @@ public function accountAction() {
if ($this->getLogLogin() && isset($_SESSION[self::SESSION_LOG_LOGIN])) {
// if tracking for login is enabled also track the logout...
$dbContact->addSystemNotice($_SESSION[kitContactInterface::session_kit_contact_id], $this->lang->translate('[kitIdea] user logout at {{ time }}', array(
'time' => date(cfg_time_str)
'time' => date(CFG_TIME_STR)
)));
}
unset($_SESSION[self::SESSION_LOG_LOGIN]);
Expand Down Expand Up @@ -682,7 +682,7 @@ private function accountIsAuthenticated() {
if ($this->getLogLogin() && !isset($_SESSION[self::SESSION_LOG_LOGIN])) {
$_SESSION[self::SESSION_LOG_LOGIN] = time();
$dbContact->addSystemNotice($_SESSION[kitContactInterface::session_kit_contact_id], $this->lang->translate('[kitIdea] user login in at {{ time }}', array(
'time' => date(cfg_time_str, $_SESSION[self::SESSION_LOG_LOGIN])
'time' => date(CFG_TIME_STR, $_SESSION[self::SESSION_LOG_LOGIN])
)));
}
return true;
Expand Down Expand Up @@ -711,7 +711,7 @@ private function accountIsAuthenticated() {
if ($this->getLogLogin() && !isset($_SESSION[self::SESSION_LOG_LOGIN])) {
$_SESSION[self::SESSION_LOG_LOGIN] = time();
$dbContact->addSystemNotice($_SESSION[kitContactInterface::session_kit_contact_id], $this->lang->translate('[kitIdea] user login in at {{ time }}', array(
'time' => date(cfg_time_str, $_SESSION[self::SESSION_LOG_LOGIN])
'time' => date(CFG_TIME_STR, $_SESSION[self::SESSION_LOG_LOGIN])
)));
}
return true;
Expand All @@ -738,7 +738,7 @@ private function accountIsAuthenticated() {
if ($this->getLogLogin() && !isset($_SESSION[self::SESSION_LOG_LOGIN])) {
$_SESSION[self::SESSION_LOG_LOGIN] = time();
$dbContact->addSystemNotice($_SESSION[kitContactInterface::session_kit_contact_id], $this->lang->translate('[kitIdea] user login in at {{ time }}', array(
'time' => date(cfg_time_str, $_SESSION[self::SESSION_LOG_LOGIN])
'time' => date(CFG_TIME_STR, $_SESSION[self::SESSION_LOG_LOGIN])
)));
}
return true;
Expand Down Expand Up @@ -2244,7 +2244,7 @@ public function projectProjectView() {
}
$items[] = array(
'value' => $revision[dbIdeaRevisionArchive::field_archived_revision],
'text' => sprintf('[%03d] %s - %s', $revision[dbIdeaRevisionArchive::field_archived_revision], date(cfg_datetime_str, strtotime($revision[dbIdeaRevisionArchive::field_timestamp])), $record[dbIdeaProjectArticles::field_author]),
'text' => sprintf('[%03d] %s - %s', $revision[dbIdeaRevisionArchive::field_archived_revision], date(CFG_DATETIME_STR, strtotime($revision[dbIdeaRevisionArchive::field_timestamp])), $record[dbIdeaProjectArticles::field_author]),
'selected' => ($record[dbIdeaProjectArticles::field_revision] == $select_revision) ? 1 : 0
);
}
Expand Down
20 changes: 10 additions & 10 deletions class.idea.php
Expand Up @@ -92,7 +92,7 @@ public function __construct($createTables = false) {
}
}
}
date_default_timezone_set(cfg_time_zone);
date_default_timezone_set(CFG_TIME_ZONE);
$this->status_array = array(
array(
'value' => self::status_active,
Expand Down Expand Up @@ -145,7 +145,7 @@ public function __construct($createTables = false) {
}
}
}
date_default_timezone_set(cfg_time_zone);
date_default_timezone_set(CFG_TIME_ZONE);
} // __construct()


Expand Down Expand Up @@ -208,7 +208,7 @@ public function __construct($createTables = false) {
}
}
}
date_default_timezone_set(cfg_time_zone);
date_default_timezone_set(CFG_TIME_ZONE);

$lang = new LEPTON_Helper_I18n();
// init arrays
Expand Down Expand Up @@ -262,7 +262,7 @@ public function __construct($createTables = false) {
}
}
}
date_default_timezone_set(cfg_time_zone);
date_default_timezone_set(CFG_TIME_ZONE);
} // __construct()


Expand Down Expand Up @@ -410,7 +410,7 @@ public function __construct($createTables = false) {
}
}
}
date_default_timezone_set(cfg_time_zone);
date_default_timezone_set(CFG_TIME_ZONE);
$this->status_array = array(
array(
'value' => self::status_active,
Expand Down Expand Up @@ -580,7 +580,7 @@ public function __construct($create_table = false) {
global $I18n;
$this->lang = $I18n;
$this->create_table = $create_table;
date_default_timezone_set(cfg_time_zone);
date_default_timezone_set(CFG_TIME_ZONE);
parent::__construct();
$this->setTableName('mod_kit_idea_project_access');
$this->addFieldDefinition(self::FIELD_ID, "INT NOT NULL AUTO_INCREMENT", true);
Expand Down Expand Up @@ -721,7 +721,7 @@ public function __construct($createTable = false) {
}
}

date_default_timezone_set(cfg_time_zone);
date_default_timezone_set(CFG_TIME_ZONE);

$this->status_array = array(
array(
Expand Down Expand Up @@ -1052,7 +1052,7 @@ public function __construct($createTables = false) {
}
}
// set timezone
date_default_timezone_set(cfg_time_zone);
date_default_timezone_set(CFG_TIME_ZONE);
// Default Werte garantieren
if ($this->sqlTableExists()) {
$this->checkConfig();
Expand Down Expand Up @@ -1366,7 +1366,7 @@ public function __construct($create_tables = false) {
}
}
}
date_default_timezone_set(cfg_time_zone);
date_default_timezone_set(CFG_TIME_ZONE);
} // __construct()


Expand Down Expand Up @@ -1417,7 +1417,7 @@ public function __construct($create_table = false) {
}
}
}
date_default_timezone_set(cfg_time_zone);
date_default_timezone_set(CFG_TIME_ZONE);
} // __construct()


Expand Down
56 changes: 28 additions & 28 deletions class.table.php
Expand Up @@ -357,8 +357,8 @@ private function calculateSum($cell_ID, $values, &$content, $cell_array, $comman
// add value of a cell to the $result
$val = ($cell_array[$cell]);
$val = str_replace(' ', '', $val);
$val = str_replace(cfg_thousand_separator, '', $val);
$val = str_replace(cfg_decimal_separator, '.', $val);
$val = str_replace(CFG_THOUSAND_SEPARATOR, '', $val);
$val = str_replace(CFG_DECIMAL_SEPARATOR, '.', $val);
$result += (float) $val;
}
}
Expand All @@ -385,8 +385,8 @@ private function calculateSum($cell_ID, $values, &$content, $cell_array, $comman
// add cell value to $result
$val = ($cell_array[$ce]);
$val = str_replace(' ', '', $val);
$val = str_replace(cfg_thousand_separator, '', $val);
$val = str_replace(cfg_decimal_separator, '.', $val);
$val = str_replace(CFG_THOUSAND_SEPARATOR, '', $val);
$val = str_replace(CFG_DECIMAL_SEPARATOR, '.', $val);
$result += (float) $val;
}
}
Expand All @@ -411,8 +411,8 @@ private function calculateSum($cell_ID, $values, &$content, $cell_array, $comman
// add cell value to $result
$val = ($cell_array[$ce]);
$val = str_replace(' ', '', $val);
$val = str_replace(cfg_thousand_separator, '', $val);
$val = str_replace(cfg_decimal_separator, '.', $val);
$val = str_replace(CFG_THOUSAND_SEPARATOR, '', $val);
$val = str_replace(CFG_DECIMAL_SEPARATOR, '.', $val);
$result += (float) $val;
}
}
Expand Down Expand Up @@ -452,8 +452,8 @@ private function calculateSum($cell_ID, $values, &$content, $cell_array, $comman
// add cell value to $result
$val = ($cell_array[$ce]);
$val = str_replace(' ', '', $val);
$val = str_replace(cfg_thousand_separator, '', $val);
$val = str_replace(cfg_decimal_separator, '.', $val);
$val = str_replace(CFG_THOUSAND_SEPARATOR, '', $val);
$val = str_replace(CFG_DECIMAL_SEPARATOR, '.', $val);
$result += (float) $val;
}
}
Expand All @@ -477,8 +477,8 @@ private function calculateSum($cell_ID, $values, &$content, $cell_array, $comman
// add cell value to $result
$val = ($cell_array[$ce]);
$val = str_replace(' ', '', $val);
$val = str_replace(cfg_thousand_separator, '', $val);
$val = str_replace(cfg_decimal_separator, '.', $val);
$val = str_replace(CFG_THOUSAND_SEPARATOR, '', $val);
$val = str_replace(CFG_DECIMAL_SEPARATOR, '.', $val);
$result += (float) $val;
}
}
Expand All @@ -494,12 +494,12 @@ private function calculateSum($cell_ID, $values, &$content, $cell_array, $comman
else {
// assume that the value is numeric
$val = str_replace(' ', '', $cell);
$val = str_replace(cfg_thousand_separator, '', $val);
$val = str_replace(cfg_decimal_separator, '.', $val);
$val = str_replace(CFG_THOUSAND_SEPARATOR, '', $val);
$val = str_replace(CFG_DECIMAL_SEPARATOR, '.', $val);
$result += (float) $val;
}
} // foreach
$content = str_replace($command, number_format($result, $decimals, cfg_decimal_separator, cfg_thousand_separator), $content);
$content = str_replace($command, number_format($result, $decimals, CFG_DECIMAL_SEPARATOR, CFG_THOUSAND_SEPARATOR), $content);
return true;
} // calculateSum

Expand Down Expand Up @@ -560,20 +560,20 @@ private function calculateMul($cell_ID, $values, &$content, $cell_array, $comman
// add value of a cell to the $result
$val = ($cell_array[$cell]);
$val = str_replace(' ', '', $val);
$val = str_replace(cfg_thousand_separator, '', $val);
$val = str_replace(cfg_decimal_separator, '.', $val);
$val = str_replace(CFG_THOUSAND_SEPARATOR, '', $val);
$val = str_replace(CFG_DECIMAL_SEPARATOR, '.', $val);
$result *= (float) $val;
}
}
else {
// assume that the value is numeric
$val = str_replace(' ', '', $cell);
$val = str_replace(cfg_thousand_separator, '', $val);
$val = str_replace(cfg_decimal_separator, '.', $val);
$val = str_replace(CFG_THOUSAND_SEPARATOR, '', $val);
$val = str_replace(CFG_DECIMAL_SEPARATOR, '.', $val);
$result *= (float) $val;
}
} // foreach
$content = str_replace($command, number_format($result, $decimals, cfg_decimal_separator, cfg_thousand_separator), $content);
$content = str_replace($command, number_format($result, $decimals, CFG_DECIMAL_SEPARATOR, CFG_THOUSAND_SEPARATOR), $content);
return true;
} // calculateMul()

Expand Down Expand Up @@ -634,20 +634,20 @@ private function calculateSub($cell_ID, $values, &$content, $cell_array, $comman
// add value of a cell to the $result
$val = ($cell_array[$cell]);
$val = str_replace(' ', '', $val);
$val = str_replace(cfg_thousand_separator, '', $val);
$val = str_replace(cfg_decimal_separator, '.', $val);
$val = str_replace(CFG_THOUSAND_SEPARATOR, '', $val);
$val = str_replace(CFG_DECIMAL_SEPARATOR, '.', $val);
$result = ($result !== null) ? $result - $val : $val;
}
}
else {
// assume that the value is numeric
$val = str_replace(' ', '', $cell);
$val = str_replace(cfg_thousand_separator, '', $val);
$val = str_replace(cfg_decimal_separator, '.', $val);
$val = str_replace(CFG_THOUSAND_SEPARATOR, '', $val);
$val = str_replace(CFG_DECIMAL_SEPARATOR, '.', $val);
$result = ($result !== null) ? $result - $val : $val;
}
} // foreach
$content = str_replace($command, number_format($result, $decimals, cfg_decimal_separator, cfg_thousand_separator), $content);
$content = str_replace($command, number_format($result, $decimals, CFG_DECIMAL_SEPARATOR, CFG_THOUSAND_SEPARATOR), $content);
return true;
} // calculateSub()

Expand Down Expand Up @@ -709,20 +709,20 @@ private function calculateDiv($cell_ID, $values, &$content, $cell_array, $comman
// add value of a cell to the $result
$val = ($cell_array[$cell]);
$val = str_replace(' ', '', $val);
$val = str_replace(cfg_thousand_separator, '', $val);
$val = str_replace(cfg_decimal_separator, '.', $val);
$val = str_replace(CFG_THOUSAND_SEPARATOR, '', $val);
$val = str_replace(CFG_DECIMAL_SEPARATOR, '.', $val);
$result = ($result !== null) ? $result/(float) $val : $val;
}
}
else {
// assume that the value is numeric
$val = str_replace(' ', '', $cell);
$val = str_replace(cfg_thousand_separator, '', $val);
$val = str_replace(cfg_decimal_separator, '.', $val);
$val = str_replace(CFG_THOUSAND_SEPARATOR, '', $val);
$val = str_replace(CFG_DECIMAL_SEPARATOR, '.', $val);
$result = ($result !== null) ? $result/(float) $val : $val;
}
} // foreach
$content = str_replace($command, number_format($result, $decimals, cfg_decimal_separator, cfg_thousand_separator), $content);
$content = str_replace($command, number_format($result, $decimals, CFG_DECIMAL_SEPARATOR, CFG_THOUSAND_SEPARATOR), $content);
return true;
} // calculateDiv()

Expand Down
12 changes: 2 additions & 10 deletions initialize.php
Expand Up @@ -49,17 +49,9 @@
require_once(WB_PATH .'/modules/'.basename(dirname(__FILE__)).'/languages/' .LANGUAGE .'.cfg.php');
}
if (! file_exists(WB_PATH . '/modules/' . basename(dirname(__FILE__)) . '/languages/' . LANGUAGE . '.php')) {
if (! defined('KIT_FORM_LANGUAGE')) define('KIT_IDEA_LANGUAGE', 'DE'); // important: language flag is used by template selection
if (! defined('KIT_IDEA_LANGUAGE')) define('KIT_IDEA_LANGUAGE', 'DE'); // important: language flag is used by template selection
} else {
if (! defined('KIT_FORM_LANGUAGE')) define('KIT_IDEA_LANGUAGE', LANGUAGE);
}

// ACHTUNG: EINBINDUNG NUR NOCH VORLAUEFIG BIS I18n VOLLSTAENDIG !!!
if(!file_exists(WB_PATH .'/modules/'.basename(dirname(__FILE__)).'/languages/' .LANGUAGE .'.php')) {
require_once(WB_PATH .'/modules/'.basename(dirname(__FILE__)).'/languages/DE.php'); // Vorgabe: DE verwenden
}
else {
require_once(WB_PATH .'/modules/'.basename(dirname(__FILE__)).'/languages/' .LANGUAGE .'.php');
if (! defined('KIT_IDEA_LANGUAGE')) define('KIT_IDEA_LANGUAGE', LANGUAGE);
}

if (!class_exists('Dwoo')) {
Expand Down
48 changes: 24 additions & 24 deletions languages/DE.cfg.php
Expand Up @@ -14,27 +14,27 @@
trigger_error('The language file <b>'.basename(__FILE__).'</b> is damaged, it must be saved <b>UTF-8</b> encoded!', E_USER_ERROR);
}

if (!defined('cfg_currency'))
define('cfg_currency', '%s €');
if (!defined('cfg_date_separator'))
define('cfg_date_separator', '.');
if (!defined('cfg_date_str'))
define('cfg_date_str', 'd.m.Y');
if (!defined('cfg_datetime_str'))
define('cfg_datetime_str', 'd.m.Y H:i');
if (!defined('cfg_day_names'))
define('cfg_day_names', "Sonntag, Montag, Dienstag, Mittwoch, Donnerstag, Freitag, Samstag");
if (!defined('cfg_decimal_separator'))
define('cfg_decimal_separator', ',');
if (!defined('cfg_month_names'))
define('cfg_month_names', "Januar,Februar,März,April,Mai,Juni,Juli,August,September,Oktober,November,Dezember");
if (!defined('cfg_thousand_separator'))
define('cfg_thousand_separator', '.');
if (!defined('cfg_time_long_str'))
define('cfg_time_long_str', 'H:i:s');
if (!defined('cfg_time_str'))
define('cfg_time_str', 'H:i');
if (!defined('cfg_time_zone'))
define('cfg_time_zone', 'Europe/Berlin');
if (!defined('cfg_title'))
define('cfg_title', 'Herr,Frau');
if (!defined('CFG_CURRENCY'))
define('CFG_CURRENCY', '%s €');
if (!defined('CFG_DATE_SEPARATOR'))
define('CFG_DATE_SEPARATOR', '.');
if (!defined('CFG_DATE_STR'))
define('CFG_DATE_STR', 'd.m.Y');
if (!defined('CFG_DATETIME_STR'))
define('CFG_DATETIME_STR', 'd.m.Y H:i');
if (!defined('CFG_DAY_NAMES'))
define('CFG_DAY_NAMES', "Sonntag, Montag, Dienstag, Mittwoch, Donnerstag, Freitag, Samstag");
if (!defined('CFG_DECIMAL_SEPARATOR'))
define('CFG_DECIMAL_SEPARATOR', ',');
if (!defined('CFG_MONTH_NAMES'))
define('CFG_MONTH_NAMES', "Januar,Februar,März,April,Mai,Juni,Juli,August,September,Oktober,November,Dezember");
if (!defined('CFG_THOUSAND_SEPARATOR'))
define('CFG_THOUSAND_SEPARATOR', '.');
if (!defined('CFG_TIME_LONG_STR'))
define('CFG_TIME_LONG_STR', 'H:i:s');
if (!defined('CFG_TIME_STR'))
define('CFG_TIME_STR', 'H:i');
if (!defined('CFG_TIME_ZONE'))
define('CFG_TIME_ZONE', 'Europe/Berlin');
if (!defined('CFG_TITLE'))
define('CFG_TITLE', 'Herr,Frau');

0 comments on commit 58352d9

Please sign in to comment.