fix date in table adding
This commit is contained in:
@@ -418,10 +418,10 @@ class Databap extends PhpObject
|
||||
{
|
||||
$asNews = $this->getNews(false);
|
||||
$iLinkId = count($asNews);
|
||||
foreach($asNews as $iMsgId=>$asRow)
|
||||
foreach($asNews as $asRow)
|
||||
{
|
||||
//TODO mutualiser avec le reste
|
||||
$sChatlink = $this->getInternalLink('chat', $iMsgId);
|
||||
$sChatlink = $this->getInternalLink('chat', $asRow[MySqlManager::getId(self::MSG_TABLE)]);
|
||||
$asItem = array
|
||||
(
|
||||
'title'=>'Lien'.($sCat==''?'':' - '.$sCat).' #'.$iLinkId,
|
||||
@@ -897,8 +897,8 @@ class Databap extends PhpObject
|
||||
$sDesc = '';
|
||||
if($bSuccess)
|
||||
{
|
||||
$asTable['date'] = self::getDateFormat($asTable['timestamp'], self::DATE_FORMAT);
|
||||
unset($asTable['timestamp']);
|
||||
$asTable['date'] = self::getDateFormat($asTable['led'], self::DATE_FORMAT);
|
||||
$asTable['id'] = $asTable[MySqlManager::getId(self::TABL_TABLE)];
|
||||
|
||||
//Extract extra data
|
||||
@@ -927,7 +927,8 @@ class Databap extends PhpObject
|
||||
'constraint'=>$asConstraint,
|
||||
'groupBy'=>array('refer_id'),
|
||||
'orderBy'=>array($sItemIdCol=>'desc'));
|
||||
return array_shift($this->oMySql->selectRows($asInfo));
|
||||
$asResult = $this->oMySql->selectRows($asInfo);
|
||||
return array_shift($asResult);
|
||||
}
|
||||
|
||||
public function getFile($iFileId)
|
||||
@@ -1893,11 +1894,12 @@ class Databap extends PhpObject
|
||||
$asFormatNews = array();
|
||||
foreach($asNews2 as $asNew)
|
||||
{
|
||||
$iMsgId = '-'.$asNew[$sMsgIdCol];
|
||||
$asFormatNews[$iMsgId]['time'] = $asNew['led'];
|
||||
$asFormatNews[$iMsgId]['time_desc'] = ToolBox::getDateTimeDesc($asNew['led']);
|
||||
$asFormatNews[$iMsgId]['message'] = self::getDescriptionFormat($asNew['message']);
|
||||
$asFormatNews[$iMsgId]['nickname'] = self::getNickNameFormat($asNew['nickname']);
|
||||
$iListId = '-'.$asNew[$sMsgIdCol];
|
||||
$asFormatNews[$iListId][$sMsgIdCol] = $asNew[$sMsgIdCol];
|
||||
$asFormatNews[$iListId]['time'] = $asNew['led'];
|
||||
$asFormatNews[$iListId]['time_desc'] = ToolBox::getDateTimeDesc($asNew['led']);
|
||||
$asFormatNews[$iListId]['message'] = self::getDescriptionFormat($asNew['message']);
|
||||
$asFormatNews[$iListId]['nickname'] = self::getNickNameFormat($asNew['nickname']);
|
||||
}
|
||||
|
||||
$sSuccess = (count($asFormatNews)>0);
|
||||
|
||||
Reference in New Issue
Block a user