Skip to content

Commit

Permalink
fix missing DB object when instantiated to import opml
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Dolgov committed Apr 18, 2013
1 parent 7f1113a commit 1f29443
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion backend.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ function stripslashes_deep($value) {
if ($override) {
$handler = $override;
} else {
$handler = new $op(Db::get(), $_REQUEST);
$handler = new $op($_REQUEST);
}

if ($handler && implements_interface($handler, 'IHandler')) {
Expand Down
4 changes: 2 additions & 2 deletions classes/handler.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ class Handler implements IHandler {
protected $dbh;
protected $args;

function __construct($dbh, $args) {
$this->dbh = $dbh;
function __construct($args) {
$this->dbh = Db::get();
$this->args = $args;
}

Expand Down
2 changes: 1 addition & 1 deletion opml.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
if (db_num_rows($result) == 1) {
$owner_uid = db_fetch_result($result, 0, "owner_uid");

$opml = new Opml( $_REQUEST);
$opml = new Opml($_REQUEST);
$opml->opml_export("", $owner_uid, true, false);

} else {
Expand Down
2 changes: 1 addition & 1 deletion public.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ function stripslashes_deep($value) {
if ($override) {
$handler = $override;
} else {
$handler = new Handler_Public(Db::get(), $_REQUEST);
$handler = new Handler_Public($_REQUEST);
}

if (implements_interface($handler, "IHandler") && $handler->before($method)) {
Expand Down
2 changes: 1 addition & 1 deletion update.php
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@
$_REQUEST = $filter;
$_SESSION["uid"] = $owner_uid;

$filters = new Pref_Filters( $_REQUEST);
$filters = new Pref_Filters($_REQUEST);
$filters->add();
}
}
Expand Down

0 comments on commit 1f29443

Please sign in to comment.