]> git.mxchange.org Git - friendica-addons.git/commitdiff
remove other occurrences of file_get_contents() being used to fetch urls
authorfriendica <info@friendica.com>
Fri, 14 Dec 2012 04:14:24 +0000 (20:14 -0800)
committerfriendica <info@friendica.com>
Fri, 14 Dec 2012 04:14:24 +0000 (20:14 -0800)
altpager.tgz
altpager/altpager.php
fbpost.tgz
fbpost/fbpost.php
fromgplus.tgz
fromgplus/fromgplus.php

index cbc64a9e31bec265ef1e219c521d436a23eda565..87bb2f8fc2306b3d89eb6d3572f56e673a388904 100644 (file)
Binary files a/altpager.tgz and b/altpager.tgz differ
index f5ccbe4d025a79d9f280afe881cb6aed9daa4412..20517d2f16ef41d85e959e1183877d6acb3cead2 100755 (executable)
@@ -93,7 +93,7 @@ function altpager_settings(&$a,&$s) {
 }
 
 function altpager_plugin_admin(&$a, &$o){
-       $t = file_get_contents( $a->get_baseurl() . "/addon/altpager/admin.tpl" );
+       $t = file_get_contents( "addon/altpager/admin.tpl" );
        $o = replace_macros($t, array(
                '$submit' => t('Submit'),
                '$global' => array('altpagerchoice', t('Global'), 1, t('Force global use of the alternate pager'),  get_config('alt_pager', 'global') == 1),
index cd104d65cef7a7c7dbfcde9c568512209650adbe..ecf933d8e023c0c5ddabf96e975d3e7364682796 100644 (file)
Binary files a/fbpost.tgz and b/fbpost.tgz differ
index 76c5f67265626d8086f7dae2da027c6ae34d798f..57c831ce96748667683b71401e8c09fbdd9224af 100644 (file)
@@ -239,7 +239,7 @@ function fbpost_content(&$a) {
                $page_access_token = get_pconfig(local_user(),'facebook','page_access_token');
                $fb_token  = get_pconfig($a->user['uid'],'facebook','access_token');
                $url = 'https://graph.facebook.com/me/accounts';
-               $x = file_get_contents($url."?access_token=".$fb_token);
+               $x = fetch_url($url."?access_token=".$fb_token);
                $accounts = json_decode($x);
 
                $o .= t("Post to page/group:")."<select name='post_to_page'>";
@@ -257,7 +257,7 @@ function fbpost_content(&$a) {
                }
 
                $url = 'https://graph.facebook.com/me/groups';
-               $x = file_get_contents($url."?access_token=".$fb_token);
+               $x = fetch_url($url."?access_token=".$fb_token);
                $groups = json_decode($x);
 
                foreach($groups->data as $group) {
index 61b701026382fff32e19ddccb1049bda177fa00d..712019e45ab9d7971e278cef2534c7f78ea72950 100644 (file)
Binary files a/fromgplus.tgz and b/fromgplus.tgz differ
index d1fac25b078a9cd670f948fdadfa1d28332b12ed..d86f7efea35cccd726be675cb71ef35cdf95cca2 100644 (file)
@@ -288,7 +288,7 @@ function fromgplus_fetch($a, $uid) {
        $account = get_pconfig($uid,'fromgplus','account');
        $key = get_config('fromgplus','key');
 
-       $result = file_get_contents("https://www.googleapis.com/plus/v1/people/".$account."/activities/public?alt=json&pp=1&key=".$key."&maxResults=".$maxfetch);
+       $result = fetch_url("https://www.googleapis.com/plus/v1/people/".$account."/activities/public?alt=json&pp=1&key=".$key."&maxResults=".$maxfetch);
        //$result = file_get_contents("google.txt");
        //file_put_contents("google.txt", $result);