diff --git a/livesupport/modules/htmlUI/var/SmartyExtensions.inc.php b/livesupport/modules/htmlUI/var/SmartyExtensions.inc.php index b05f0a8fa..cf3acc9f9 100644 --- a/livesupport/modules/htmlUI/var/SmartyExtensions.inc.php +++ b/livesupport/modules/htmlUI/var/SmartyExtensions.inc.php @@ -73,7 +73,7 @@ function S_htmlspecialchars($param) * @param void array, array of strings to be outputted translated */ function S_tra($in) -{ +{ global $uiBrowser; foreach($in as $val) $param[] = $val; @@ -86,8 +86,10 @@ function S_getHour($param) ## input format is HH:MM:SS.dddddd extract ($param); list ($h, $m, $s) = explode (':', $time); - settype($h, 'integer'); - return $h; + $curr = mktime($h, $m ,$s); + if ($pause) $curr = strtotime(UI_SCHEDULER_PAUSE_PL2PL, $curr); + + return strftime("%H", $curr); } function S_getMinute($param) @@ -95,8 +97,10 @@ function S_getMinute($param) ## input format is HH:MM:SS.dddddd extract ($param); list ($h, $m, $s) = explode (':', $time); - settype($m, 'integer'); - return $m; + $curr = mktime($h, $m ,$s); + if ($pause) $curr = strtotime(UI_SCHEDULER_PAUSE_PL2PL, $curr); + + return strftime("%M", $curr); } function S_getSecond($param) @@ -104,9 +108,10 @@ function S_getSecond($param) ## input format is HH:MM:SS.dddddd extract ($param); list ($h, $m, $s) = explode (':', $time); - if ($plus) $s += $plus; - settype($s, 'integer'); - return $s; + $curr = mktime($h, $m ,$s); + if ($pause) $curr = strtotime(UI_SCHEDULER_PAUSE_PL2PL, $curr); + + return strftime("%S", $curr); } diff --git a/livesupport/modules/htmlUI/var/templates/scheduler/day.tpl b/livesupport/modules/htmlUI/var/templates/scheduler/day.tpl index 0b4c3f389..2e2c287da 100755 --- a/livesupport/modules/htmlUI/var/templates/scheduler/day.tpl +++ b/livesupport/modules/htmlUI/var/templates/scheduler/day.tpl @@ -6,7 +6,7 @@

##Daily View##

 
-

{$SCHEDULER->curr.monthname} {$SCHEDULER->curr.day}, {$SCHEDULER->curr.year}

+

##{$SCHEDULER->curr.monthname}## {$SCHEDULER->curr.day}, {$SCHEDULER->curr.year}

@@ -14,7 +14,7 @@ {* Tag vor/zurück + code um heutigen Tag abzufragen - + *} @@ -25,8 +25,8 @@ *} - - + + {foreach from=$_scale item="_hour"} @@ -44,7 +44,7 @@ {$i.start}-{$i.end} {$i.creator} - {*
*} + {include file="scheduler/between_additem.tpl"} {/foreach} diff --git a/livesupport/modules/htmlUI/var/templates/scheduler/month.tpl b/livesupport/modules/htmlUI/var/templates/scheduler/month.tpl index f1d6a70a1..259da67c0 100755 --- a/livesupport/modules/htmlUI/var/templates/scheduler/month.tpl +++ b/livesupport/modules/htmlUI/var/templates/scheduler/month.tpl @@ -8,7 +8,7 @@
<<curr.isToday} bgcolor="grey"{/if}>{$SCHEDULER->curr.dayname}, {$SCHEDULER->curr.year}-{$SCHEDULER->curr.month}-{$SCHEDULER->curr.day}curr.isToday} bgcolor="grey"{/if}>##{$SCHEDULER->curr.dayname}##, ##{$SCHEDULER->curr.year}##-##{$SCHEDULER->curr.month}##-##{$SCHEDULER->curr.day}## >>
TimeShow Info##Time####Show Info##
{foreach from=$SCHEDULER->Week item="_Weekday"} - + {/foreach} diff --git a/livesupport/modules/htmlUI/var/templates/scheduler/week.tpl b/livesupport/modules/htmlUI/var/templates/scheduler/week.tpl index 5e3ace44a..d2bb0926a 100755 --- a/livesupport/modules/htmlUI/var/templates/scheduler/week.tpl +++ b/livesupport/modules/htmlUI/var/templates/scheduler/week.tpl @@ -22,7 +22,7 @@ {foreach from=$SCHEDULER->Week item="_Day"} {* hier werden die Tagesnamen angezeigt *} - + {/foreach} {* Link Woche vor >> *} @@ -56,7 +56,7 @@

{$i.start|truncate:8:""} - {$i.end|truncate:8:""}

{$i.creator}

- {*
*} + {include file="scheduler/between_additem.tpl"} {/foreach} {else} diff --git a/livesupport/modules/htmlUI/var/templates/scheduler/week_additem.tpl b/livesupport/modules/htmlUI/var/templates/scheduler/week_additem.tpl index 356354973..a6731671b 100755 --- a/livesupport/modules/htmlUI/var/templates/scheduler/week_additem.tpl +++ b/livesupport/modules/htmlUI/var/templates/scheduler/week_additem.tpl @@ -1,11 +1,3 @@ style="cursor: pointer" +onClick="return contextmenu('year={$_day.year}&month={$_day.month}&day={$_day.day}&hour={$_hour}&minute=0&second=0', 'SCHEDULER.addItem')" -{getHour time=$i.end assign="_endH"} - -{if $_endH == $_hour} - onClick="return contextmenu('year={$_day.year}&month={$_day.month}&day={$_day.day}&hour={getHour time=$i.end}&minute={getMinute time=$i.end}&second={getSecond time=$i.end}', 'SCHEDULER.addItem')" -{else} - onClick="return contextmenu('year={$_day.year}&month={$_day.month}&day={$_day.day}&hour={$_hour}&minute=0&second=0', 'SCHEDULER.addItem')" -{/if} - -{assign var="_endH" value=null} diff --git a/livesupport/modules/htmlUI/var/templates/sub/mouseover.tpl b/livesupport/modules/htmlUI/var/templates/sub/mouseover.tpl index 695d05d91..54a6b7edc 100755 --- a/livesupport/modules/htmlUI/var/templates/sub/mouseover.tpl +++ b/livesupport/modules/htmlUI/var/templates/sub/mouseover.tpl @@ -1,5 +1,5 @@ {UIBROWSER->getMDataArr id=$i.id assign='_metaarr'} - + onMouseover = "showalttext('
##{$i.type|lower|capitalize}##: {$_metaarr.metadata.Title}
' + {if $i.type|lower == 'playlist'} {if $PL->isUSedBy($i.id) != false}'
##(used by {$PL->isUSedBy($i.id)})##
' + {/if} diff --git a/livesupport/modules/htmlUI/var/ui_base.inc.php b/livesupport/modules/htmlUI/var/ui_base.inc.php index c42a43ad0..e2617d8f0 100644 --- a/livesupport/modules/htmlUI/var/ui_base.inc.php +++ b/livesupport/modules/htmlUI/var/ui_base.inc.php @@ -348,11 +348,11 @@ class uiBase } - function _getMDataValue($id, $key, $langid=FALSE, $deflangid=UI_DEFAULT_LANGID) + function _getMDataValue($id, $key, $langid=NULL, $deflangid=UI_DEFAULT_LANGID) { if (!$langid) $langid = $_SESSION['langid']; - if (is_array($arr = $this->gb->getMDataValue($id, $key, $this->sessid, $langid, $deflangid))) { + if (is_array($arr = $this->gb->getMDataValue($id, $key, $this->sessid, $langid, $deflangid))) { $value = current($arr); return $value['value']; } @@ -360,11 +360,14 @@ class uiBase } - function _setMDataValue($id, $key, $value, $langid=UI_DEFAULT_LANGID) + function _setMDataValue($id, $key, $value, $langid=NULL) { + if (!$langid) $langid = $_SESSION['langid']; + if ($this->gb->setMDataValue($id, $key, $this->sessid, $value, $langid)) { return TRUE; } + return FALSE; } diff --git a/livesupport/modules/htmlUI/var/ui_handler.class.php b/livesupport/modules/htmlUI/var/ui_handler.class.php index b2f1a3b42..9248ebb7d 100644 --- a/livesupport/modules/htmlUI/var/ui_handler.class.php +++ b/livesupport/modules/htmlUI/var/ui_handler.class.php @@ -132,6 +132,7 @@ class uiHandler extends uiBase { $r = $this->gb->putFile($folderId, $formdata['mediafile']['name'], $ntmp, NULL, $this->sessid, $replace); @unlink($ntmp); + if(PEAR::isError($r)) { $this->_retMsg($r->getMessage()); $this->redirUrl = UI_BROWSER."?act=editFile&id=".$id; @@ -141,6 +142,11 @@ class uiHandler extends uiBase { $this->_setMDataValue($r, UI_MDATA_KEY_TITLE, $formdata['mediafile']['name']); $this->transMData($r); + if ($_SESSION['langid'] != UI_DEFAULT_LANGID) { // set records in default language too + $this->_setMDataValue($r, UI_MDATA_KEY_TITLE, $formdata['mediafile']['name'], UI_DEFAULT_LANGID); + $this->transMData($r, UI_DEFAULT_LANGID); + } + $this->redirUrl = UI_BROWSER."?act=editFile&id=$r"; if (UI_VERBOSE) $this->_retMsg('Audioclip Data saved'); return $r; @@ -158,14 +164,11 @@ class uiHandler extends uiBase { } - function transMData($id) + function transMData($id, $langid=NULL) { include dirname(__FILE__).'/formmask/metadata.inc.php'; - #$this->gb->replaceMetadata($id, $this->_analyzeFile($id, 'xml'), 'string', $this->sessid); $ia = $this->gb->analyzeFile($id, $this->sessid); - #print_r($ia); - $this->_setMdataValue($id, UI_MDATA_KEY_DURATION, $this->gb->_secsToPlTime($ia['playtime_seconds'])); $this->_setMDataValue($id, UI_MDATA_KEY_FORMAT, UI_MDATA_VALUE_FORMAT_FILE); @@ -180,9 +183,8 @@ class uiHandler extends uiBase { foreach ($mask['pages'][$key] as $k=>$v) { if ($v['id3'] != FALSE) { $key = strtolower($v['id3']); - if ($ia['comments'][$key][0]) { - $this->_setMdataValue($id, $v['element'], $ia['comments'][$key][0]); - #echo "E: ".$v['element']." V: ".$ia['comments'][$key][0]."
"; + if ($ia['comments'][$key][0]) { + $this->_setMdataValue($id, $v['element'], $ia['comments'][$key][0], $langid); } } }
{$_Weekday.label.full}##{$_Weekday.label.full}##
{$_Day.label.full}##{$_Day.label.full}##