]> git.mxchange.org Git - friendica.git/blobdiff - include/contact_widgets.php
set version to 3.6-dev
[friendica.git] / include / contact_widgets.php
index 744d2f2b034e0fb00fb0e2051cc34c090c4f61e4..b359781ffd734b818187caaa65df898bc57ac9ba 100644 (file)
@@ -1,8 +1,11 @@
 <?php
 
 use Friendica\App;
+use Friendica\Core\System;
 use Friendica\Core\Config;
 
+require_once 'include/contact_selectors.php';
+
 function follow_widget($value = "") {
 
        return replace_macros(get_markup_template('follow.tpl'), array(
@@ -113,16 +116,13 @@ function networks_widget($baseurl, $selected = '') {
        );
 
        $nets = array();
-       if (dbm::is_result($r)) {
-               require_once 'include/contact_selectors.php';
-               while ($rr = dba::fetch($r)) {
-                       /// @TODO If 'network' is not there, this triggers an E_NOTICE
-                       if ($rr['network']) {
-                               $nets[] = array('ref' => $rr['network'], 'name' => network_to_name($rr['network']), 'selected' => (($selected == $rr['network']) ? 'selected' : '' ));
-                       }
+       while ($rr = dba::fetch($r)) {
+               /// @TODO If 'network' is not there, this triggers an E_NOTICE
+               if ($rr['network']) {
+                       $nets[] = array('ref' => $rr['network'], 'name' => network_to_name($rr['network']), 'selected' => (($selected == $rr['network']) ? 'selected' : '' ));
                }
-               dba::close($r);
        }
+       dba::close($r);
 
        if (count($nets) < 2) {
                return '';
@@ -265,7 +265,7 @@ function common_friends_visitor_widget($profile_uid) {
 
        return replace_macros(get_markup_template('remote_friends_common.tpl'), array(
                '$desc' =>  sprintf( tt("%d contact in common", "%d contacts in common", $t), $t),
-               '$base' => App::get_baseurl(),
+               '$base' => System::baseUrl(),
                '$uid' => $profile_uid,
                '$cid' => (($cid) ? $cid : '0'),
                '$linkmore' => (($t > 5) ? 'true' : ''),