]> git.wh0rd.org - tt-rss.git/commitdiff
fix missing DB object when instantiated to import opml
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Thu, 18 Apr 2013 19:19:14 +0000 (23:19 +0400)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Thu, 18 Apr 2013 19:19:14 +0000 (23:19 +0400)
backend.php
classes/handler.php
opml.php
public.php
update.php

index c69d6d98baa277778f08e1f7472c491e2b151636..84abc97304b83db640e64af02254db18b2efcc7b 100644 (file)
                if ($override) {
                        $handler = $override;
                } else {
-                       $handler = new $op(Db::get(), $_REQUEST);
+                       $handler = new $op($_REQUEST);
                }
 
                if ($handler && implements_interface($handler, 'IHandler')) {
index d8e2a3025cfb47d329577391f6791868bbe47b28..b209320458d40d52b8d530a9e2ee9324da4ce8d0 100644 (file)
@@ -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;
        }
 
index b932216148bf39b922e7fc9585528c97876baa4e..af3694051d16d64f3b4862c18202ba10e101c8cd 100644 (file)
--- a/opml.php
+++ b/opml.php
@@ -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 {
index f92d252e2a210befc2603a46d5181de8373d56c5..33f5af75713df54fad835da2bed0c3085428a223 100644 (file)
@@ -42,7 +42,7 @@
        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)) {
index d8ea52361ac27c0571f51c4628a5c31f86638427..c301083f931e3c22f0f64ab5d13adee0ebfd79dd 100755 (executable)
                                $_REQUEST = $filter;
                                $_SESSION["uid"] = $owner_uid;
 
-                               $filters = new Pref_Filters( $_REQUEST);
+                               $filters = new Pref_Filters($_REQUEST);
                                $filters->add();
                        }
                }