From 0dcea87b9944c106bce3e9604c8facf58fa9225f Mon Sep 17 00:00:00 2001 From: redmatrix Date: Thu, 9 Jun 2016 16:20:16 -0700 Subject: namespace issue with openid reverse auth --- Zotlabs/Module/Rmagic.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'Zotlabs/Module') diff --git a/Zotlabs/Module/Rmagic.php b/Zotlabs/Module/Rmagic.php index bcdbf6c90..26b0c46a6 100644 --- a/Zotlabs/Module/Rmagic.php +++ b/Zotlabs/Module/Rmagic.php @@ -24,7 +24,7 @@ class Rmagic extends \Zotlabs\Web\Controller { } } - function post() { + function post() { $address = trim($_REQUEST['address']); @@ -34,13 +34,13 @@ class Rmagic extends \Zotlabs\Web\Controller { try { require_once('library/openid/openid.php'); - $openid = new LightOpenID(z_root()); + $openid = new \LightOpenID(z_root()); $openid->identity = $address; $openid->returnUrl = z_root() . '/openid'; $openid->required = array('namePerson/friendly', 'namePerson'); $openid->optional = array('namePerson/first','media/image/aspect11','media/image/default'); goaway($openid->authUrl()); - } catch (Exception $e) { + } catch (\Exception $e) { notice( t('We encountered a problem while logging in with the OpenID you provided. Please check the correct spelling of the ID.').'

'. t('The error message was:').' '.$e->getMessage()); } @@ -82,7 +82,7 @@ class Rmagic extends \Zotlabs\Web\Controller { } - function get() { + function get() { $o = replace_macros(get_markup_template('rmagic.tpl'),array( '$title' => t('Remote Authentication'), -- cgit v1.2.3 From bb3d56a0b2e3676e780b4b6dd4e1b31b211c7b5e Mon Sep 17 00:00:00 2001 From: redmatrix Date: Thu, 9 Jun 2016 22:07:27 -0700 Subject: foreach: invalid argument --- Zotlabs/Module/Acl.php | 28 +++++++++++++++------------- Zotlabs/Module/Admin.php | 2 +- 2 files changed, 16 insertions(+), 14 deletions(-) (limited to 'Zotlabs/Module') diff --git a/Zotlabs/Module/Acl.php b/Zotlabs/Module/Acl.php index 7bc197a93..2bc4ba62d 100644 --- a/Zotlabs/Module/Acl.php +++ b/Zotlabs/Module/Acl.php @@ -65,18 +65,20 @@ class Acl extends \Zotlabs\Web\Controller { intval($count), intval($start) ); - - foreach($r as $g){ - // logger('acl: group: ' . $g['gname'] . ' members: ' . group_get_members_xchan($g['id'])); - $groups[] = array( - "type" => "g", - "photo" => "images/twopeople.png", - "name" => $g['gname'], - "id" => $g['id'], - "xid" => $g['hash'], - "uids" => group_get_members_xchan($g['id']), - "link" => '' - ); + + if($r) { + foreach($r as $g){ + // logger('acl: group: ' . $g['gname'] . ' members: ' . group_get_members_xchan($g['id'])); + $groups[] = array( + "type" => "g", + "photo" => "images/twopeople.png", + "name" => $g['gname'], + "id" => $g['id'], + "xid" => $g['hash'], + "uids" => group_get_members_xchan($g['id']), + "link" => '' + ); + } } } @@ -204,7 +206,7 @@ class Acl extends \Zotlabs\Web\Controller { else $r = array(); - if(count($r)) { + if($r) { foreach($r as $g){ // remove RSS feeds from ACLs - they are inaccessible diff --git a/Zotlabs/Module/Admin.php b/Zotlabs/Module/Admin.php index 21ab7f6a7..085d13fd7 100644 --- a/Zotlabs/Module/Admin.php +++ b/Zotlabs/Module/Admin.php @@ -1738,7 +1738,7 @@ class Admin extends \Zotlabs\Web\Controller { // name, label, value, help string, extra data... '$debugging' => array('debugging', t("Debugging"),get_config('system','debugging'), ""), - '$logfile' => array('logfile', t("Log file"), get_config('system','logfile'), t("Must be writable by web server. Relative to your Red top-level directory.")), + '$logfile' => array('logfile', t("Log file"), get_config('system','logfile'), t("Must be writable by web server. Relative to your top-level webserver directory.")), '$loglevel' => array('loglevel', t("Log level"), get_config('system','loglevel'), "", $log_choices), '$form_security_token' => get_form_security_token('admin_logs'), -- cgit v1.2.3