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