* adjust for oa.

This commit is contained in:
wangyidong
2017-09-04 14:46:02 +08:00
parent 57e31b1daf
commit ded7a07ad7
4 changed files with 32 additions and 5 deletions
+17
View File
@@ -124,3 +124,20 @@ function isonlybody()
{
return helper::inOnlyBodyMode();
}
/**
* Format time.
*
* @param int $time
* @param string $format
* @access public
* @return void
*/
function formatTime($time, $format = '')
{
$time = str_replace('0000-00-00', '', $time);
$time = str_replace('00:00:00', '', $time);
if(trim($time) == '') return ;
if($format) return date($format, strtotime($time));
return trim($time);
}
+13 -3
View File
@@ -703,7 +703,13 @@ class actionModel extends model
$objectType = strtolower($action->objectType);
$action->date = date(DT_MONTHTIME2, strtotime($action->date));
$action->actionLabel = isset($this->lang->action->label->$actionType) ? $this->lang->action->label->$actionType : $action->action;
$action->objectLabel = isset($this->lang->action->label->$objectType) ? $this->lang->action->label->$objectType : $objectType;
$action->objectLabel = $objectType;
if(isset($this->lang->action->label->$objectType))
{
$objectLabel = $this->lang->action->label->$objectType;
if(!is_array($objectLabel)) $action->objectLabel = $objectLabel;
if(is_array($objectLabel) and isset($objectLabel[$actionType])) $action->objectLabel = $objectLabel[$actionType];
}
/* If action type is login or logout, needn't link. */
if($actionType == 'svncommited')
@@ -715,8 +721,12 @@ class actionModel extends model
if(strpos($action->objectLabel, '|') !== false)
{
list($objectLabel, $moduleName, $methodName, $vars) = explode('|', $action->objectLabel);
$action->objectLink = helper::createLink($moduleName, $methodName, sprintf($vars, $action->objectID));
if($action->objectType == 'user') $action->objectLink = helper::createLink($moduleName, $methodName, sprintf($vars, $action->actor));
$action->objectLink = '';
if(common::hasPriv($moduleName, $methodName))
{
$action->objectLink = helper::createLink($moduleName, $methodName, sprintf($vars, $action->objectID));
if($action->objectType == 'user') $action->objectLink = helper::createLink($moduleName, $methodName, sprintf($vars, $action->actor));
}
$action->objectLabel = $objectLabel;
}
else
+1 -1
View File
@@ -478,7 +478,7 @@ $lang->datepicker->dpText->TEXT_CLOSE = 'Close';
$lang->datepicker->dpText->TEXT_DATE = 'Choose Time';
$lang->datepicker->dpText->TEXT_CHOOSE_DATE = 'Choose Date';
$lang->datepicker->dayNames = array('Sun', 'Mon', 'Tues', 'Wed', 'Thur', 'Fri', 'Sat');
$lang->datepicker->dayNames = array('Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday');
$lang->datepicker->abbrDayNames = array('Sun', 'Mon', 'Tues', 'Wed', 'Thur', 'Fri', 'Sat');
$lang->datepicker->monthNames = array('Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec');
+1 -1
View File
@@ -478,7 +478,7 @@ $lang->datepicker->dpText->TEXT_CLOSE = '关闭';
$lang->datepicker->dpText->TEXT_DATE = '选择时间段';
$lang->datepicker->dpText->TEXT_CHOOSE_DATE = '选择日期';
$lang->datepicker->dayNames = array('日', '一', '二', '三', '四', '五', '六');
$lang->datepicker->dayNames = array('星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六');
$lang->datepicker->abbrDayNames = array('日', '一', '二', '三', '四', '五', '六');
$lang->datepicker->monthNames = array('一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月');