Example #1
0
 public function store()
 {
     $page_name = $this->name;
     // cleanups to make directory transversal impossible
     // TODO proper cleanup of name!
     $page_name = str_replace('.', '_', $page_name);
     $page_name = str_replace('/', '_', $page_name);
     $page_name = str_replace('\\', '_', $page_name);
     $page_name = str_replace(' ', '_', $page_name);
     $dst_file = WikiConfig::getDiskPath() . '/' . $page_name;
     file_put_contents($dst_file, $this->text);
     return SqlObject::store($this, self::$tbl_name, 'name');
 }
Example #2
0
 public function store()
 {
     return SqlObject::store($this, self::$tbl_name, 'id');
 }
Example #3
0
 public function store()
 {
     $obj->time_saved = sql_datetime(time());
     return SqlObject::store($this, self::$tbl_name, 'id');
 }