merge from branch luminous (version 1.5.4.2, ~r12561)

git-svn-id: http://xe-core.googlecode.com/svn/trunk@12611 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
flyskyko 2013-01-30 05:53:14 +00:00
parent 2263200ce4
commit cc47d2b247
196 changed files with 3655 additions and 2033 deletions

View file

@ -454,42 +454,52 @@
return $content;
}
function getRegdate($format = 'Y.m.d H:i:s') {
return zdate($this->get('regdate'), $format);
}
function getRegdate($format = 'Y.m.d H:i:s') {
return zdate($this->get('regdate'), $format);
}
function getRegdateTime() {
$regdate = $this->get('regdate');
$year = substr($regdate,0,4);
$month = substr($regdate,4,2);
$day = substr($regdate,6,2);
$hour = substr($regdate,8,2);
$min = substr($regdate,10,2);
$sec = substr($regdate,12,2);
return mktime($hour,$min,$sec,$month,$day,$year);
}
function getRegdateTime() {
$regdate = $this->get('regdate');
$year = substr($regdate,0,4);
$month = substr($regdate,4,2);
$day = substr($regdate,6,2);
$hour = substr($regdate,8,2);
$min = substr($regdate,10,2);
$sec = substr($regdate,12,2);
return mktime($hour,$min,$sec,$month,$day,$year);
}
function getRegdateGM() {
return $this->getRegdate('D, d M Y H:i:s').' '.$GLOBALS['_time_zone'];
}
function getRegdateGM() {
return $this->getRegdate('D, d M Y H:i:s').' '.$GLOBALS['_time_zone'];
}
function getUpdate($format = 'Y.m.d H:i:s') {
return zdate($this->get('last_update'), $format);
}
function getRegdateDT()
{
return $this->getRegdate('Y-m-d').'T'.$this->getRegdate('H:i:s').substr($GLOBALS['_time_zone'],0,3).':'.substr($GLOBALS['_time_zone'],3,2);
}
function getUpdateTime() {
$year = substr($this->get('last_update'),0,4);
$month = substr($this->get('last_update'),4,2);
$day = substr($this->get('last_update'),6,2);
$hour = substr($this->get('last_update'),8,2);
$min = substr($this->get('last_update'),10,2);
$sec = substr($this->get('last_update'),12,2);
return mktime($hour,$min,$sec,$month,$day,$year);
}
function getUpdate($format = 'Y.m.d H:i:s') {
return zdate($this->get('last_update'), $format);
}
function getUpdateGM() {
return gmdate("D, d M Y H:i:s", $this->getUpdateTime());
}
function getUpdateTime() {
$year = substr($this->get('last_update'),0,4);
$month = substr($this->get('last_update'),4,2);
$day = substr($this->get('last_update'),6,2);
$hour = substr($this->get('last_update'),8,2);
$min = substr($this->get('last_update'),10,2);
$sec = substr($this->get('last_update'),12,2);
return mktime($hour,$min,$sec,$month,$day,$year);
}
function getUpdateGM() {
return gmdate("D, d M Y H:i:s", $this->getUpdateTime());
}
function getUpdateDT()
{
return $this->getUpdate('Y-m-d').'T'.$this->getUpdate('H:i:s').substr($GLOBALS['_time_zone'],0,3).':'.substr($GLOBALS['_time_zone'],3,2);
}
function getPermanentUrl() {
return getFullUrl('','document_srl',$this->get('document_srl'));
@ -499,7 +509,7 @@
if(!$this->document_srl) return;
// Generate a key to prevent spams
$oTrackbackModel = &getModel('trackback');
return $oTrackbackModel->getTrackbackUrl($this->document_srl);
return $oTrackbackModel->getTrackbackUrl($this->document_srl, $this->getDocumentMid());
}
/**
@ -665,7 +675,7 @@
// Find an iamge file among attached files if exists
if($this->get('uploaded_count')) {
$oFileModel = &getModel('file');
$file_list = $oFileModel->getFiles($this->document_srl);
$file_list = $oFileModel->getFiles($this->document_srl, array(), 'file_srl', true);
if(count($file_list)) {
foreach($file_list as $file) {
if($file->direct_download!='Y') continue;
@ -809,7 +819,7 @@
if(!$this->uploadedFiles[$sortIndex])
{
$oFileModel = &getModel('file');
$this->uploadedFiles[$sortIndex] = $oFileModel->getFiles($this->document_srl, array(), $sortIndex);
$this->uploadedFiles[$sortIndex] = $oFileModel->getFiles($this->document_srl, array(), $sortIndex, true);
}
return $this->uploadedFiles[$sortIndex];