fix blog creation page

This commit is contained in:
leosw
2018-11-05 21:35:21 +01:00
parent 7d3a00fd68
commit 9aa7498db7
4 changed files with 35 additions and 30 deletions

View File

@@ -14,8 +14,8 @@ require_once($config['third_folder']."Md/MarkdownExtra.inc.php");
class WikiPage
{
public $id = 0;
public $permalink = 0;
public $id = NULL;
public $permalink = NULL;
public $version = 0;
public $locale = NULL;
public $creation_date = NULL;
@@ -204,10 +204,10 @@ class WikiPage
$result = pg_execute($con, "prepare1", array($this->permalink, $this->locale, date('r'), date('r'), $user->id, $this->name, $this->content))
or die ("Cannot execute statement\n");
$this->id = pg_fetch_assoc($result)['id'];
pg_close($con);
$this->id = pg_fetch_assoc($result)['id'];
error_log(
date('r')." \t".$user->name." (".$user->id.") \tINSERT \tCreate new wiki page '".$this->permalink."'\r\n",
3,