]> git.mxchange.org Git - friendica.git/commitdiff
used dbm::is_result() instead of count()
authorRoland Haeder <roland@mxchange.org>
Tue, 20 Dec 2016 20:39:06 +0000 (21:39 +0100)
committerRoland Haeder <roland@mxchange.org>
Tue, 20 Dec 2016 20:39:06 +0000 (21:39 +0100)
Signed-off-by: Roland Haeder <roland@mxchange.org>
mod/item.php
mod/lostpass.php

index 2080bb1653438016268221ba78b2755f37de9402..695e76a2fa8f1b981b15b6ab0b6952669a2e310d 100644 (file)
@@ -139,7 +139,7 @@ function item_post(App &$a) {
 
                        // If the contact id doesn't fit with the contact, then set the contact to null
                        $thrparent = q("SELECT `author-link`, `network` FROM `item` WHERE `uri` = '%s' LIMIT 1", dbesc($thr_parent));
-                       if (count($thrparent) AND ($thrparent[0]["network"] === NETWORK_OSTATUS)
+                       if (dbm::is_result($thrparent) AND ($thrparent[0]["network"] === NETWORK_OSTATUS)
                                AND (normalise_link($parent_contact["url"]) != normalise_link($thrparent[0]["author-link"]))) {
                                $parent_contact = null;
 
index 43e9cf715e08cc258be0d6ddbdc7a60d4988c702..f9e9400fc2caf47318c49be9babe156a5f3a159e 100644 (file)
@@ -102,6 +102,8 @@ function lostpass_content(App &$a) {
                        dbesc($new_password_encoded),
                        intval($uid)
                );
+
+               /// @TODO Is dbm::is_result() okay here?
                if ($r) {
                        $tpl = get_markup_template('pwdreset.tpl');
                        $o .= replace_macros($tpl,array(