table name in uppercase in profile
This commit is contained in:
@@ -989,6 +989,7 @@ class Databap extends PhpObject
|
||||
if($bSuccess)
|
||||
{
|
||||
$asTable['date'] = self::getDateFormat($asTable['timestamp'], self::DATE_FORMAT);
|
||||
$asTable['title'] = $asTable['table_name'];
|
||||
unset($asTable['timestamp']);
|
||||
$asTable['id'] = $asTable[MySqlManager::getId(self::TABL_TABLE)];
|
||||
|
||||
@@ -1157,6 +1158,7 @@ class Databap extends PhpObject
|
||||
{
|
||||
$asTable['system'] = self::getTableFormat($asTable['system']);
|
||||
$asTable['description'] = self::getDescriptionFormat($asTable['description']);
|
||||
$asTable['table_name'] = self::getTableFormat($asTable['title']);
|
||||
$asTable['title'] = self::getTableFormat($asTable['title']).' - '.$asTable['description'];
|
||||
$asTable['led'] = self::getDateFormat($asTable['led']);
|
||||
$asTable['formated_keywords'] = ToolBox::formatText($asTable['keywords']);
|
||||
@@ -1379,27 +1381,25 @@ class Databap extends PhpObject
|
||||
|
||||
//History Info
|
||||
$asTables = $this->getTypeInfo('table');
|
||||
unset($asTables[self::ART_TYPE]); //Skip articles
|
||||
foreach($asTables as $sType=>$sTableName)
|
||||
{
|
||||
//Skip articles
|
||||
if($sTableName==self::ART_TABLE) continue;
|
||||
|
||||
//Add Text
|
||||
$sText = mb_strtolower($this->getPageTitles($this->getPagesFromHash($sType)));
|
||||
if(!$sText) $this->addError('Pas de texte pour le type "'.$sType.'"');
|
||||
|
||||
//Loop through items
|
||||
$asSqlInfo = array('from'=>$sTableName, 'constraint'=>array(MySqlManager::getId(self::USER_TABLE)=>$iUserId));
|
||||
$asSqlInfo = array('select'=>MySqlManager::getId($sTableName), 'from'=>$sTableName, 'constraint'=>array(MySqlManager::getId(self::USER_TABLE)=>$iUserId));
|
||||
$asHistory = $this->oMySql->selectRows($asSqlInfo);
|
||||
foreach($asHistory as $asInfo)
|
||||
foreach($asHistory as $iItemId)
|
||||
{
|
||||
$sLed = $asInfo['led'];
|
||||
$iItemId = $asInfo[MySqlManager::getId($sTableName)];
|
||||
$asProfile['history'][$sLed]['type'] = $sType;
|
||||
$asProfile['history'][$sLed]['id'] = $iItemId;
|
||||
$asProfile['history'][$sLed]['action'] = (($asInfo['refer_id']==$iItemId)?'Création':'Modification').' de '.$sText;
|
||||
$asProfile['history'][$sLed]['date'] = self::getDateFormat($sLed);
|
||||
$asProfile['history'][$sLed]['title'] = array_key_exists('title', $asInfo)?$asInfo['title']:$asInfo['description'];
|
||||
$asInfo = $this->getItemInfo($sType, $iItemId);
|
||||
$sKey = $asInfo['timestamp'].$sType.$iItemId;
|
||||
$asProfile['history'][$sKey]['type'] = $sType;
|
||||
$asProfile['history'][$sKey]['id'] = $iItemId;
|
||||
$asProfile['history'][$sKey]['action'] = (($asInfo['refer_id']==$iItemId)?'Création':'Modification').' de '.$sText;
|
||||
$asProfile['history'][$sKey]['date'] = $asInfo['led'];
|
||||
$asProfile['history'][$sKey]['title'] = $asInfo['title'];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user