remove the app $a passed to profile_load, also add profile_load to mod_wiki which should fix issue #431
This commit is contained in:
parent
2029b2b9ed
commit
3035c792dc
@ -18,7 +18,7 @@ class Achievements extends \Zotlabs\Web\Controller {
|
||||
|
||||
$profile = 0;
|
||||
$profile = argv(1);
|
||||
profile_load($a,$which,$profile);
|
||||
profile_load($which,$profile);
|
||||
|
||||
$r = q("select channel_id from channel where channel_address = '%s'",
|
||||
dbesc($which)
|
||||
|
@ -12,7 +12,7 @@ class Block extends \Zotlabs\Web\Controller {
|
||||
|
||||
$which = argv(1);
|
||||
$profile = 0;
|
||||
profile_load($a,$which,$profile);
|
||||
profile_load($which,$profile);
|
||||
|
||||
if(\App::$profile['profile_uid'])
|
||||
head_set_icon(\App::$profile['thumb']);
|
||||
|
@ -22,7 +22,7 @@ class Blocks extends \Zotlabs\Web\Controller {
|
||||
else
|
||||
return;
|
||||
|
||||
profile_load($a,$which);
|
||||
profile_load($which);
|
||||
|
||||
}
|
||||
|
||||
|
@ -20,7 +20,7 @@ class Cal extends \Zotlabs\Web\Controller {
|
||||
if(argc() > 1) {
|
||||
$nick = argv(1);
|
||||
|
||||
profile_load($a,$nick);
|
||||
profile_load($nick);
|
||||
|
||||
$channelx = channelx_by_nick($nick);
|
||||
|
||||
|
@ -48,7 +48,7 @@ class Channel extends \Zotlabs\Web\Controller {
|
||||
// Run profile_load() here to make sure the theme is set before
|
||||
// we start loading content
|
||||
|
||||
profile_load($a,$which,$profile);
|
||||
profile_load($which,$profile);
|
||||
|
||||
}
|
||||
|
||||
|
@ -39,7 +39,7 @@ class Chat extends \Zotlabs\Web\Controller {
|
||||
// Run profile_load() here to make sure the theme is set before
|
||||
// we start loading content
|
||||
|
||||
profile_load($a,$which,$profile);
|
||||
profile_load($which,$profile);
|
||||
|
||||
}
|
||||
|
||||
|
@ -37,7 +37,7 @@ class Cloud extends \Zotlabs\Web\Controller {
|
||||
\App::$page['htmlhead'] .= '<link rel="alternate" type="application/atom+xml" href="' . z_root() . '/feed/' . $which . '" />' . "\r\n";
|
||||
|
||||
if ($which)
|
||||
profile_load($a, $which, $profile);
|
||||
profile_load( $which, $profile);
|
||||
|
||||
$auth = new \Zotlabs\Storage\BasicAuth();
|
||||
|
||||
|
@ -21,7 +21,7 @@ class Common extends \Zotlabs\Web\Controller {
|
||||
);
|
||||
|
||||
if($x)
|
||||
profile_load($a,$x[0]['channel_address'],0);
|
||||
profile_load($x[0]['channel_address'],0);
|
||||
|
||||
}
|
||||
|
||||
|
@ -26,7 +26,7 @@ class Connect extends \Zotlabs\Web\Controller {
|
||||
if($r)
|
||||
\App::$data['channel'] = $r[0];
|
||||
|
||||
profile_load($a,$which,'');
|
||||
profile_load($which,'');
|
||||
}
|
||||
|
||||
function post() {
|
||||
|
@ -29,7 +29,7 @@ class Cover_photo extends \Zotlabs\Web\Controller {
|
||||
}
|
||||
|
||||
$channel = \App::get_channel();
|
||||
profile_load($a,$channel['channel_address']);
|
||||
profile_load($channel['channel_address']);
|
||||
|
||||
}
|
||||
|
||||
|
@ -58,7 +58,7 @@ class Dav extends \Zotlabs\Web\Controller {
|
||||
\App::$page['htmlhead'] .= '<link rel="alternate" type="application/atom+xml" href="' . z_root() . '/feed/' . $which . '" />' . "\r\n";
|
||||
|
||||
if ($which)
|
||||
profile_load($a, $which, $profile);
|
||||
profile_load( $which, $profile);
|
||||
|
||||
|
||||
|
||||
|
@ -21,7 +21,7 @@ class Editblock extends \Zotlabs\Web\Controller {
|
||||
else
|
||||
return;
|
||||
|
||||
profile_load($a,$which);
|
||||
profile_load($which);
|
||||
|
||||
}
|
||||
|
||||
|
@ -21,7 +21,7 @@ class Editlayout extends \Zotlabs\Web\Controller {
|
||||
else
|
||||
return;
|
||||
|
||||
profile_load($a,$which);
|
||||
profile_load($which);
|
||||
|
||||
}
|
||||
|
||||
|
@ -23,7 +23,7 @@ class Editwebpage extends \Zotlabs\Web\Controller {
|
||||
else
|
||||
return;
|
||||
|
||||
profile_load($a,$which);
|
||||
profile_load($which);
|
||||
|
||||
}
|
||||
|
||||
|
@ -40,7 +40,7 @@ class Hcard extends \Zotlabs\Web\Controller {
|
||||
}
|
||||
}
|
||||
|
||||
profile_load($a,$which,$profile);
|
||||
profile_load($which,$profile);
|
||||
|
||||
|
||||
}
|
||||
|
@ -57,7 +57,7 @@ class Id extends \Zotlabs\Web\Controller {
|
||||
|
||||
$profile = '';
|
||||
$channel = \App::get_channel();
|
||||
profile_load($a,$which,$profile);
|
||||
profile_load($which,$profile);
|
||||
|
||||
$op = new MysqlProvider;
|
||||
$op->server();
|
||||
|
@ -21,7 +21,7 @@ class Layouts extends \Zotlabs\Web\Controller {
|
||||
else
|
||||
return;
|
||||
|
||||
profile_load($a,$which);
|
||||
profile_load($which);
|
||||
|
||||
}
|
||||
|
||||
|
@ -13,7 +13,7 @@ class Page extends \Zotlabs\Web\Controller {
|
||||
|
||||
$which = argv(1);
|
||||
$profile = 0;
|
||||
profile_load($a,$which,$profile);
|
||||
profile_load($which,$profile);
|
||||
|
||||
|
||||
|
||||
|
@ -27,7 +27,7 @@ class Photos extends \Zotlabs\Web\Controller {
|
||||
if(argc() > 1) {
|
||||
$nick = argv(1);
|
||||
|
||||
profile_load($a,$nick);
|
||||
profile_load($nick);
|
||||
|
||||
$channelx = channelx_by_nick($nick);
|
||||
|
||||
|
@ -48,7 +48,7 @@ class Profile extends \Zotlabs\Web\Controller {
|
||||
}
|
||||
}
|
||||
|
||||
profile_load($a,$which,$profile);
|
||||
profile_load($which,$profile);
|
||||
|
||||
|
||||
}
|
||||
|
@ -34,7 +34,7 @@ class Profile_photo extends \Zotlabs\Web\Controller {
|
||||
}
|
||||
|
||||
$channel = \App::get_channel();
|
||||
profile_load($a,$channel['channel_address']);
|
||||
profile_load($channel['channel_address']);
|
||||
|
||||
}
|
||||
|
||||
|
@ -193,7 +193,7 @@ class Profiles extends \Zotlabs\Web\Controller {
|
||||
|
||||
$chan = \App::get_channel();
|
||||
|
||||
profile_load($a,$chan['channel_address'],$r[0]['id']);
|
||||
profile_load($chan['channel_address'],$r[0]['id']);
|
||||
}
|
||||
}
|
||||
|
||||
@ -584,7 +584,7 @@ class Profiles extends \Zotlabs\Web\Controller {
|
||||
|
||||
if($is_default) {
|
||||
// reload the info for the sidebar widget - why does this not work?
|
||||
profile_load($a,$channel['channel_address']);
|
||||
profile_load($channel['channel_address']);
|
||||
\Zotlabs\Daemon\Master::Summon(array('Directory',local_channel()));
|
||||
}
|
||||
}
|
||||
|
@ -17,7 +17,7 @@ class Profperm extends \Zotlabs\Web\Controller {
|
||||
|
||||
$profile = \App::$argv[1];
|
||||
|
||||
profile_load($a,$which,$profile);
|
||||
profile_load($which,$profile);
|
||||
|
||||
}
|
||||
|
||||
|
@ -11,7 +11,7 @@ class Viewconnections extends \Zotlabs\Web\Controller {
|
||||
return;
|
||||
}
|
||||
if(argc() > 1)
|
||||
profile_load($a,argv(1));
|
||||
profile_load(argv(1));
|
||||
}
|
||||
|
||||
function get() {
|
||||
|
@ -23,7 +23,7 @@ class Webpages extends \Zotlabs\Web\Controller {
|
||||
else
|
||||
return;
|
||||
|
||||
profile_load($a,$which);
|
||||
profile_load($which);
|
||||
|
||||
}
|
||||
|
||||
|
@ -20,6 +20,8 @@ class Wiki extends \Zotlabs\Web\Controller {
|
||||
notice(t('You must be logged in to see this page.') . EOL);
|
||||
goaway('/login');
|
||||
}
|
||||
profile_load($nick);
|
||||
|
||||
}
|
||||
|
||||
function get() {
|
||||
|
@ -761,11 +761,10 @@ function identity_export_year($channel_id,$year,$month = 0) {
|
||||
*
|
||||
* The channel default theme is also selected for use, unless over-riden elsewhere.
|
||||
*
|
||||
* @param[in,out] App &$a
|
||||
* @param string $nickname
|
||||
* @param string $profile
|
||||
*/
|
||||
function profile_load(&$a, $nickname, $profile = '') {
|
||||
function profile_load($nickname, $profile = '') {
|
||||
|
||||
// logger('profile_load: ' . $nickname . (($profile) ? ' profile: ' . $profile : ''));
|
||||
|
||||
|
Reference in New Issue
Block a user