]> git.mxchange.org Git - friendica-addons.git/blobdiff - pumpio/pumpio.php
Rendertime: possibility to define a minimal value for displaying the execution times
[friendica-addons.git] / pumpio / pumpio.php
index 6b61a5946438cb1794f9b66ec4e86dd387c7df63..cd44b682e6ddf5e760cd65ade8e4ed152cee7252 100644 (file)
@@ -45,19 +45,6 @@ function pumpio_install()
        Hook::register('check_item_notification', 'addon/pumpio/pumpio.php', 'pumpio_check_item_notification');
 }
 
-function pumpio_uninstall()
-{
-       Hook::unregister('load_config',      'addon/pumpio/pumpio.php', 'pumpio_load_config');
-       Hook::unregister('hook_fork',        'addon/pumpio/pumpio.php', 'pumpio_hook_fork');
-       Hook::unregister('post_local',       'addon/pumpio/pumpio.php', 'pumpio_post_local');
-       Hook::unregister('notifier_normal',  'addon/pumpio/pumpio.php', 'pumpio_send');
-       Hook::unregister('jot_networks',     'addon/pumpio/pumpio.php', 'pumpio_jot_nets');
-       Hook::unregister('connector_settings',      'addon/pumpio/pumpio.php', 'pumpio_settings');
-       Hook::unregister('connector_settings_post', 'addon/pumpio/pumpio.php', 'pumpio_settings_post');
-       Hook::unregister('cron', 'addon/pumpio/pumpio.php', 'pumpio_cron');
-       Hook::unregister('check_item_notification', 'addon/pumpio/pumpio.php', 'pumpio_check_item_notification');
-}
-
 function pumpio_module() {}
 
 function pumpio_content(App $a)
@@ -158,8 +145,7 @@ function pumpio_connect(App $a)
        if (($consumer_key == "") || ($consumer_secret == "")) {
                Logger::log("pumpio_connect: ".sprintf("Unable to register the client at the pump.io server '%s'.", $hostname));
 
-               $o .= DI::l10n()->t("Unable to register the client at the pump.io server '%s'.", $hostname);
-               return $o;
+               return DI::l10n()->t("Unable to register the client at the pump.io server '%s'.", $hostname);
        }
 
        // The callback URL is the script that gets called after the user authenticates with pumpio
@@ -1517,12 +1503,12 @@ function pumpio_fetchallcomments(App $a, $uid, $id)
 
        // Fetching the original post
        $condition = ["`uri` = ? AND `uid` = ? AND `extid` != ''", $id, $uid];
-       $item = Item::selectFirst(['extid'], $condition);
-       if (!DBA::isResult($item)) {
+       $original = Item::selectFirst(['extid'], $condition);
+       if (!DBA::isResult($original)) {
                return false;
        }
 
-       $url = $item["extid"];
+       $url = $original["extid"];
 
        $client = new oauth_client_class;
        $client->oauth_version = '1.0a';
@@ -1604,7 +1590,7 @@ function pumpio_fetchallcomments(App $a, $uid, $id)
 
 function pumpio_reachable($url)
 {
-       return DI::httpRequest()->get($url, false, ['timeout' => 10])->isSuccess();
+       return DI::httpRequest()->get($url, ['timeout' => 10])->isSuccess();
 }
 
 /*