Need to pull in the global $user variable.
This commit is contained in:
parent
4ec5a7ce52
commit
860af25550
@ -32,8 +32,7 @@ class Bookmarks extends Extension {
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected function install() {
|
protected function install() {
|
||||||
global $database;
|
global $database, $config;
|
||||||
global $config;
|
|
||||||
|
|
||||||
// shortcut to latest
|
// shortcut to latest
|
||||||
if($config->get_int("ext_bookmarks_version") < 1) {
|
if($config->get_int("ext_bookmarks_version") < 1) {
|
||||||
@ -61,9 +60,9 @@ class Bookmarks extends Extension {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private function add_bookmark(/*string*/ $url, /*string*/ $title) {
|
private function add_bookmark(/*string*/ $url, /*string*/ $title) {
|
||||||
global $database;
|
global $database, $user;
|
||||||
$sql = "INSERT INTO bookmark(owner_id, url, title) VALUES (?, ?, ?)";
|
$sql = "INSERT INTO bookmark(owner_id, url, title) VALUES (?, ?, ?)";
|
||||||
$database->Execute($sql, array($user->id, $url, $title));
|
$database->Execute($sql, array($user->id, $url, $title));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user