- Ppgrade jquery

- Early detection of table existency (on creation)
- Replaced deprecated ajax calls (defer)
This commit is contained in:
2014-09-05 23:13:55 +02:00
parent 7df342462b
commit ecc3471ebc
5 changed files with 68 additions and 72 deletions

View File

@@ -938,7 +938,7 @@ class Databap extends PhpObject
return self::jsonExport($asDoc);
}
public function addTable($sSystem, $sTitle, $sDescription, $sKeyWords, $iPrevTableId=0)
public function addTable($sSystem, $sTitle, $sDescription, $sKeyWords, $iPrevTableId, $bSimul=false)
{
$bCreation = ($iPrevTableId==0);
$iDbTableId = 0;
@@ -955,7 +955,7 @@ class Databap extends PhpObject
//Check for existing table with the same name
if($bCreation && $this->checkValue(self::TABL_TABLE, array('title'=>$sTitle))) $sDesc = 'Une documentation existe déjà pour la '.$sRightTableLink;
elseif(!$bCreation && $iPrevTableId!=$this->getUpToDateId(self::TABL_TABLE, $sTitle)) $sDesc = 'Une version plus récente de cette documentation existe : '.$sRightTableLink;
else
elseif(!$bSimul)
{
//Load table into database
$asData = array(MySqlManager::getId(self::USER_TABLE)=>$this->getUserId(), 'title'=>$sTitle, 'description'=>$sDescription, 'system'=>$sSystem, 'keywords'=>$sKeyWords);