Feature #19790 » 10095_4.3_alpha1.patch
t3lib/config_default.php (working copy) | ||
---|---|---|
'enable_DLOG' => FALSE, // Whether the developer log is enabled. See constant "TYPO3_DLOG"
|
||
'ddmmyy' => 'd-m-y', // Format of Date-Month-Year - see PHP-function date()
|
||
'hhmm' => 'H:i', // Format of Hours-Minutes - see PHP-function date()
|
||
'hhmmss' => 'H:i:s', // Format of Hours-Minutes-seconds - see PHP-function date()
|
||
'USdateFormat' => 0, // Boolean. If true, dates entered in the TCEforms of the backend will be formatted mm-dd-yyyy
|
||
'loginCopyrightWarrantyProvider' => '', // String: If you provide warranty for TYPO3 to your customers insert you (company) name here. It will appear in the login-dialog as the warranty provider. (You must also set URL below).
|
||
'loginCopyrightWarrantyURL' => '', // String: Add the URL where you explain the extend of the warranty you provide. This URL is displayed in the login dialog as the place where people can learn more about the conditions of your warranty. Must be set (more than 10 chars) in addition with the 'loginCopyrightWarrantyProvider' message.
|
t3lib/class.t3lib_tceforms.php (working copy) | ||
---|---|---|
$config['format'] = 'date';
|
||
} elseif (in_array('datetime',$evalList)) {
|
||
$config['format'] = 'datetime';
|
||
} elseif (in_array('datetimesec', $evalList)) {
|
||
$config['format'] = 'datetimesec';
|
||
} elseif (in_array('time',$evalList)) {
|
||
$config['format'] = 'time';
|
||
} elseif (in_array('timesec', $evalList)) {
|
||
$config['format'] = 'timesec';
|
||
}
|
||
if (in_array('password',$evalList)) {
|
||
$itemFormElValue = $itemFormElValue ? '*********' : '';
|
||
... | ... | |
case 'required':
|
||
$this->registerRequiredProperty('field', $table.'_'.$row['uid'].'_'.$field, $PA['itemFormElName']);
|
||
// Mark this field for date/time disposal:
|
||
if (array_intersect($evalList, array('date', 'datetime', 'time'))) {
|
||
if (array_intersect($evalList, array('date', 'datetime', 'datetimesec', 'time', 'timesec'))) {
|
||
$this->requiredAdditional[$PA['itemFormElName']]['isPositiveNumber'] = true;
|
||
}
|
||
break;
|
||
... | ... | |
$paramsList = "'".$PA['itemFormElName']."','".implode(',',$evalList)."','".trim($config['is_in'])."',".(isset($config['checkbox'])?1:0).",'".$config['checkbox']."'";
|
||
if (isset($config['checkbox'])) {
|
||
// Setting default "click-checkbox" values for eval types "date" and "datetime":
|
||
// Setting default "click-checkbox" values for eval types "date" and "datetime"/"datetimesec":
|
||
$thisMidnight = gmmktime(0,0,0);
|
||
if (in_array('date',$evalList)) {
|
||
$checkSetValue = $thisMidnight;
|
||
} elseif (in_array('datetime',$evalList)) {
|
||
} elseif (in_array('datetime', $evalList) || in_array('datetimesec', $evalList)) {
|
||
$checkSetValue = time();
|
||
} elseif (in_array('year',$evalList)) {
|
||
$checkSetValue = gmdate('Y');
|
||
... | ... | |
$cOnClick = 'typo3form.fieldGet('.$paramsList.',1,\''.$checkSetValue.'\');'.implode('',$PA['fieldChangeFunc']);
|
||
$item .= '<input type="checkbox" class="' . $this->formElStyleClassValue('check', TRUE) . ' alignToInputText" name="' . $PA['itemFormElName'] . '_cb" onclick="' . htmlspecialchars($cOnClick) . '" />';
|
||
}
|
||
if ((in_array('date',$evalList) || in_array('datetime',$evalList)) && $PA['itemFormElValue']>0){
|
||
if ( $PA['itemFormElValue'] > 0 &&
|
||
(in_array('date', $evalList) || in_array('datetime', $evalList) || in_array('datetimesec', $evalList))
|
||
) {
|
||
// Add server timezone offset to UTC to our stored date
|
||
$PA['itemFormElValue'] += date('Z', $PA['itemFormElValue']);
|
||
}
|
||
... | ... | |
case 'datetime': // compatibility with "eval" (type "input")
|
||
$itemValue = date('H:i d-m-Y',$itemValue);
|
||
break;
|
||
case 'datetimesec': // compatibility with "eval" (type "input")
|
||
$itemValue = date('H:i:s d-m-Y',$itemValue);
|
||
break;
|
||
case 'time': // compatibility with "eval" (type "input")
|
||
$itemValue = date('H:i',$itemValue);
|
||
break;
|
t3lib/class.t3lib_befunc.php (working copy) | ||
---|---|---|
* @param integer Time stamp, seconds
|
||
* @return string Formatted time
|
||
*/
|
||
public static function datetime($value) {
|
||
return date($GLOBALS['TYPO3_CONF_VARS']['SYS']['ddmmyy'].' '.$GLOBALS['TYPO3_CONF_VARS']['SYS']['hhmm'], $value);
|
||
public static function datetime($value, $withSeconds = FALSE) {
|
||
return date (
|
||
$GLOBALS['TYPO3_CONF_VARS']['SYS']['ddmmyy'] . ' ' . ($withSeconds ? $GLOBALS['TYPO3_CONF_VARS']['SYS']['hhmmss'] : $GLOBALS['TYPO3_CONF_VARS']['SYS']['hhmm']),
|
||
$value
|
||
);
|
||
}
|
||
/**
|
||
... | ... | |
$l = t3lib_BEfunc::time($value);
|
||
} elseif (t3lib_div::inList($theColConf['eval'], 'datetime')) {
|
||
$l = t3lib_BEfunc::datetime($value);
|
||
} else {
|
||
} elseif (t3lib_div::inList($theColConf['eval'], 'datetimesec')) {
|
||
$l = t3lib_BEfunc::datetimesec($value, TRUE);
|
||
}
|
||
else {
|
||
$l = $value;
|
||
}
|
||
}
|
t3lib/jsfunc.evalfield.js (working copy) | ||
---|---|---|
}
|
||
switch (type) {
|
||
case "datetime":
|
||
case "datetimesec":
|
||
switch (theCmd) {
|
||
case "d":
|
||
case "t":
|
||
... | ... | |
var dateVal = this.input("date",value.substr(index,value.length));
|
||
// set refDate so that evalFunc_input on time will work with correct DST information
|
||
this.refDate = new Date(dateVal*1000);
|
||
this.lastTime = dateVal + this.input("time",value.substr(0,index));
|
||
this.lastTime = dateVal + this.input(((type=="datetime") ? "time" : "timesec"), value.substr(0, index));
|
||
} else {
|
||
// only date, no time
|
||
this.lastTime = this.input("date", value);
|
||
... | ... | |
}
|
||
break;
|
||
case "datetime":
|
||
case "datetimesec":
|
||
if (!parseInt(value)) {return '';}
|
||
theString = this.output("time",value)+' '+this.output("date",value);
|
||
theString = this.output(((type == "datetime") ? "time" : "timesec"), value) + ' ' + this.output("date", value);
|
||
break;
|
||
case "time":
|
||
case "timesec":
|
t3lib/class.t3lib_tcemain.php (working copy) | ||
---|---|---|
break;
|
||
case 'date':
|
||
case 'datetime':
|
||
case 'datetimesec':
|
||
$value = intval($value);
|
||
if ($value>0 && !$this->dontProcessTransformations) {
|
||
$value -= date('Z', $value);
|
typo3/jsfunc.tbe_editor.js (working copy) | ||
---|---|---|
var split = evallist.split(',');
|
||
for (var i = 0; split.length > i; i++) {
|
||
var el = split[i].replace(/ /g, '');
|
||
if (el == 'datetime' || el == 'date') {
|
||
if (el == 'datetime' || el == 'date' || el == 'datetimesec') {
|
||
var now = new Date();
|
||
checkSetValue = Date.parse(now)/1000 - now.getTimezoneOffset()*60;
|
||
break;
|