Commit 9abd95fa authored by redmatrix's avatar redmatrix

static App

parent 256c228e
......@@ -6,21 +6,21 @@ class System {
function get_platform_name() {
$a = get_app();
if(is_array($a->config) && is_array($a->config['system']) && $a->config['system']['platform_name'])
return $a->config['system']['platform_name'];
if(is_array(\App::$config) && is_array(\App::$config['system']) && \App::$config['system']['platform_name'])
return \App::$config['system']['platform_name'];
return PLATFORM_NAME;
}
function get_project_version() {
$a = get_app();
if(is_array($a->config) && is_array($a->config['system']) && $a->config['system']['hide_version'])
if(is_array(\App::$config) && is_array(\App::$config['system']) && \App::$config['system']['hide_version'])
return '';
return RED_VERSION;
}
function get_update_version() {
$a = get_app();
if(is_array($a->config) && is_array($a->config['system']) && $a->config['system']['hide_version'])
if(is_array(\App::$config) && is_array(\App::$config['system']) && \App::$config['system']['hide_version'])
return '';
return DB_UPDATE_VERSION;
}
......@@ -28,15 +28,15 @@ class System {
function get_notify_icon() {
$a = get_app();
if(is_array($a->config) && is_array($a->config['system']) && $a->config['system']['email_notify_icon_url'])
return $a->config['system']['email_notify_icon_url'];
if(is_array(\App::$config) && is_array(\App::$config['system']) && \App::$config['system']['email_notify_icon_url'])
return \App::$config['system']['email_notify_icon_url'];
return z_root() . '/images/hz-white-32.png';
}
function get_site_icon() {
$a = get_app();
if(is_array($a->config) && is_array($a->config['system']) && $a->config['system']['site_icon_url'])
return $a->config['system']['site_icon_url'];
if(is_array(\App::$config) && is_array(\App::$config['system']) && \App::$config['system']['site_icon_url'])
return \App::$config['system']['site_icon_url'];
return z_root() . '/images/hz-32.png';
}
......
......@@ -243,7 +243,7 @@ class Browser extends DAV\Browser\Plugin {
));
$a = get_app();
$a->page['content'] = $html;
\App::$page['content'] = $html;
load_pdl($a);
$theme_info_file = "view/theme/" . current_theme() . "/php/theme.php";
......
......@@ -53,7 +53,7 @@ class Directory extends DAV\Node implements DAV\ICollection, DAV\IQuota {
logger('directory ' . $ext_path, LOGGER_DATA);
$this->ext_path = $ext_path;
// remove "/cloud" from the beginning of the path
$modulename = get_app()->module;
$modulename = \App::$module;
$this->red_path = ((strpos($ext_path, '/' . $modulename) === 0) ? substr($ext_path, strlen($modulename) + 1) : $ext_path);
if (! $this->red_path) {
$this->red_path = '/';
......@@ -114,7 +114,7 @@ class Directory extends DAV\Node implements DAV\ICollection, DAV\IQuota {
throw new DAV\Exception\Forbidden('Permission denied.');
}
$modulename = get_app()->module;
$modulename = \App::$module;
if ($this->red_path === '/' && $name === $modulename) {
return new Directory('/' . $modulename, $this->auth);
}
......@@ -332,7 +332,7 @@ class Directory extends DAV\Node implements DAV\ICollection, DAV\IQuota {
require_once('include/photos.php');
$args = array( 'resource_id' => $hash, 'album' => $album, 'os_path' => $f, 'filename' => $name, 'getimagesize' => $x, 'directory' => $direct);
$p = photo_upload($c[0],get_app()->get_observer(),$args);
$p = photo_upload($c[0],\App::get_observer(),$args);
}
}
......@@ -393,7 +393,7 @@ class Directory extends DAV\Node implements DAV\ICollection, DAV\IQuota {
public function childExists($name) {
// On /cloud we show a list of available channels.
// @todo what happens if no channels are available?
$modulename = get_app()->module;
$modulename = \App::$module;
if ($this->red_path === '/' && $name === $modulename) {
//logger('We are at ' $modulename . ' show a channel list', LOGGER_DEBUG);
return true;
......@@ -417,7 +417,7 @@ class Directory extends DAV\Node implements DAV\ICollection, DAV\IQuota {
logger('GetDir: ' . $this->ext_path, LOGGER_DEBUG);
$this->auth->log();
$modulename = get_app()->module;
$modulename = \App::$module;
$file = $this->ext_path;
......
......@@ -173,7 +173,7 @@ class File extends DAV\Node implements DAV\IFile {
if($is_photo) {
require_once('include/photos.php');
$args = array( 'resource_id' => $this->data['hash'], 'album' => $album, 'os_path' => $f, 'filename' => $r[0]['filename'], 'getimagesize' => $gis, 'directory' => $direct );
$p = photo_upload($c[0],get_app()->get_observer(),$args);
$p = photo_upload($c[0],\App::get_observer(),$args);
}
// update the folder's lastmodified timestamp
......
......@@ -9,9 +9,9 @@ class Router {
/**
*
* We have already parsed the server path into $a->argc and $a->argv
* We have already parsed the server path into App::$argc and App::$argv
*
* $a->argv[0] is our module name. We will load the file mod/{$a->argv[0]}.php
* App::$argv[0] is our module name. We will load the file mod/{App::$argv[0]}.php
* and use it for handling our URL request.
* The module file contains a few functions that we call in various circumstances
* and in the following order:
......@@ -25,7 +25,9 @@ class Router {
* further processing.
*/
if(strlen($a->module)) {
$module = \App::$module;
if(strlen($module)) {
/**
*
......@@ -34,14 +36,14 @@ class Router {
*
*/
if(is_array($a->plugins) && in_array($a->module,$a->plugins) && file_exists("addon/{$a->module}/{$a->module}.php")) {
include_once("addon/{$a->module}/{$a->module}.php");
if(function_exists($a->module . '_module'))
$a->module_loaded = true;
if(is_array(\App::$plugins) && in_array(\App::$module,\App::$plugins) && file_exists("addon/{$module}/{\$module}.php")) {
include_once("addon/{$module}/{$module}.php");
if(function_exists($module . '_module'))
\App::$module_loaded = true;
}
if((strpos($a->module,'admin') === 0) && (! is_site_admin())) {
$a->module_loaded = false;
if((strpos($module,'admin') === 0) && (! is_site_admin())) {
\App::$module_loaded = false;
notice( t('Permission denied.') . EOL);
goaway(z_root());
}
......@@ -51,17 +53,19 @@ class Router {
* Otherwise, look for the standard program module in the 'mod' directory
*/
if(! $a->module_loaded) {
if(file_exists("mod/site/{$a->module}.php")) {
include_once("mod/site/{$a->module}.php");
$a->module_loaded = true;
if(! (\App::$module_loaded)) {
if(file_exists("mod/site/{$module}.php")) {
include_once("mod/site/{$module}.php");
\App::$module_loaded = true;
}
elseif(file_exists("mod/{$a->module}.php")) {
include_once("mod/{$a->module}.php");
$a->module_loaded = true;
elseif(file_exists("mod/{$module}.php")) {
include_once("mod/{$module}.php");
\App::$module_loaded = true;
}
else logger("mod/{$module}.php not found.");
}
/**
* This provides a place for plugins to register module handlers which don't otherwise exist on the system.
* If the plugin sets 'installed' to true we won't throw a 404 error for the specified module even if
......@@ -69,10 +73,10 @@ class Router {
* The plugin should catch at least one of the module hooks for this URL.
*/
$x = array('module' => $a->module, 'installed' => false);
$x = array('module' => $module, 'installed' => false);
call_hooks('module_loaded', $x);
if($x['installed'])
$a->module_loaded = true;
\App::$module_loaded = true;
/**
* The URL provided does not resolve to a valid module.
......@@ -85,14 +89,14 @@ class Router {
* Otherwise we are going to emit a 404 not found.
*/
if(! $a->module_loaded) {
if(! (\App::$module_loaded)) {
// Stupid browser tried to pre-fetch our Javascript img template. Don't log the event or return anything - just quietly exit.
if((x($_SERVER, 'QUERY_STRING')) && preg_match('/{[0-9]}/', $_SERVER['QUERY_STRING']) !== 0) {
killme();
}
if((x($_SERVER, 'QUERY_STRING')) && ($_SERVER['QUERY_STRING'] === 'q=internal_error.html') && $a->config['system']['dreamhost_error_hack']) {
if((x($_SERVER, 'QUERY_STRING')) && ($_SERVER['QUERY_STRING'] === 'q=internal_error.html') && \App::$config['system']['dreamhost_error_hack']) {
logger('index.php: dreamhost_error_hack invoked. Original URI =' . $_SERVER['REQUEST_URI']);
goaway(z_root() . $_SERVER['REQUEST_URI']);
}
......@@ -100,13 +104,13 @@ class Router {
logger('index.php: page not found: ' . $_SERVER['REQUEST_URI'] . ' ADDRESS: ' . $_SERVER['REMOTE_ADDR'] . ' QUERY: ' . $_SERVER['QUERY_STRING'], LOGGER_DEBUG);
header($_SERVER['SERVER_PROTOCOL'] . ' 404 ' . t('Not Found'));
$tpl = get_markup_template('404.tpl');
$a->page['content'] = replace_macros($tpl, array(
\App::$page['content'] = replace_macros($tpl, array(
'$message' => t('Page not found.')
));
// pretend this is a module so it will initialise the theme
$a->module = '404';
$a->module_loaded = true;
\App::$module = '404';
\App::$module_loaded = true;
}
}
}
......@@ -118,8 +122,8 @@ class Router {
* Call module functions
*/
if($a->module_loaded) {
$a->page['page_title'] = $a->module;
if(\App::$module_loaded) {
\App::$page['page_title'] = \App::$module;
$placeholder = '';
/**
......@@ -129,11 +133,11 @@ class Router {
* to over-ride them.
*/
if(function_exists($a->module . '_init')) {
if(function_exists(\App::$module . '_init')) {
$arr = array('init' => true, 'replace' => false);
call_hooks($a->module . '_mod_init', $arr);
call_hooks(\App::$module . '_mod_init', $arr);
if(! $arr['replace']) {
$func = $a->module . '_init';
$func = \App::$module . '_init';
$func($a);
}
}
......@@ -167,32 +171,32 @@ class Router {
$func = str_replace('-', '_', current_theme()) . '_init';
$func($a);
}
elseif (x($a->theme_info, 'extends') && file_exists('view/theme/' . $a->theme_info['extends'] . '/php/theme.php')) {
require_once('view/theme/' . $a->theme_info['extends'] . '/php/theme.php');
if(function_exists(str_replace('-', '_', $a->theme_info['extends']) . '_init')) {
$func = str_replace('-', '_', $a->theme_info['extends']) . '_init';
elseif (x(\App::$theme_info, 'extends') && file_exists('view/theme/' . \App::$theme_info['extends'] . '/php/theme.php')) {
require_once('view/theme/' . \App::$theme_info['extends'] . '/php/theme.php');
if(function_exists(str_replace('-', '_', \App::$theme_info['extends']) . '_init')) {
$func = str_replace('-', '_', \App::$theme_info['extends']) . '_init';
$func($a);
}
}
if(($_SERVER['REQUEST_METHOD'] === 'POST') && (! $a->error)
&& (function_exists($a->module . '_post'))
if(($_SERVER['REQUEST_METHOD'] === 'POST') && (! \App::$error)
&& (function_exists(\App::$module . '_post'))
&& (! x($_POST, 'auth-params'))) {
call_hooks($a->module . '_mod_post', $_POST);
$func = $a->module . '_post';
call_hooks(\App::$module . '_mod_post', $_POST);
$func = \App::$module . '_post';
$func($a);
}
if((! $a->error) && (function_exists($a->module . '_content'))) {
$arr = array('content' => $a->page['content'], 'replace' => false);
call_hooks($a->module . '_mod_content', $arr);
$a->page['content'] = $arr['content'];
if((! \App::$error) && (function_exists(\App::$module . '_content'))) {
$arr = array('content' => \App::$page['content'], 'replace' => false);
call_hooks(\App::$module . '_mod_content', $arr);
\App::$page['content'] = $arr['content'];
if(! $arr['replace']) {
$func = $a->module . '_content';
$func = \App::$module . '_content';
$arr = array('content' => $func($a));
}
call_hooks($a->module . '_mod_aftercontent', $arr);
$a->page['content'] .= $arr['content'];
call_hooks(\App::$module . '_mod_aftercontent', $arr);
\App::$page['content'] .= $arr['content'];
}
}
}
......
......@@ -132,7 +132,7 @@ class Auth {
// tell them to logout if they're logged in locally as anything but the target remote account
// in which case just shut up because they don't need to be doing this at all.
if (get_app()->channel['channel_hash'] == $hubloc['xchan_hash']) {
if (\App::$channel['channel_hash'] == $hubloc['xchan_hash']) {
return true;
}
else {
......@@ -242,9 +242,9 @@ class Auth {
$arr = array('xchan' => $hubloc, 'url' => $this->desturl, 'session' => $_SESSION);
call_hooks('magic_auth_success',$arr);
get_app()->set_observer($hubloc);
\App::set_observer($hubloc);
require_once('include/security.php');
get_app()->set_groups(init_groups_visitor($_SESSION['visitor_id']));
\App::set_groups(init_groups_visitor($_SESSION['visitor_id']));
info(sprintf( t('Welcome %s. Remote authentication successful.'),$hubloc['xchan_name']));
logger('mod_zot: auth success from ' . $hubloc['xchan_addr']);
$this->success = true;
......@@ -341,5 +341,5 @@ class Auth {
* Service_class can be used by cooperating sites to provide different access rights based on account rights and subscription plans. It is
* a string whose contents are not defined by protocol. Example: "basic" or "gold".
*
* @param[in,out] App &$a
* @param[in,out] \App &$a
*/
This diff is collapsed.
......@@ -38,7 +38,7 @@ Inside it, put the following information - edit as needed
function mytheme_init(&$a) {
$a->theme_info['extends'] = 'redbasic';
App::$theme_info['extends'] = 'redbasic';
}
......@@ -79,7 +79,7 @@ If you want to use the redbasic schemas for your derived theme, you have to do a
Do everything as above, but don't create view/theme/mytheme/php/style.php, but copy instead view/theme/redbasic/php/style.php to view/theme/mytheme/php/style.php. Modify that file and remove (or comment out) these two lines:
if(local_channel() && $a->channel && $a->channel['channel_theme'] != 'redbasic')
if(local_channel() && App::$channel && App::$channel['channel_theme'] != 'redbasic')
set_pconfig(local_channel(), 'redbasic', 'schema', '---');
Also add this line at the bottom:
......
......@@ -12,7 +12,7 @@ There are certain scenarios where you might want your own directory-server that
* On the hub that will be the Directory Server, open the .htconfig.php file and set:
`$a->config['system']['directory_mode'] = DIRECTORY_MODE_PRIMARY;`
`App::$config['system']['directory_mode'] = DIRECTORY_MODE_PRIMARY;`
By default it should already be set as **DIRECTORY_MODE_NORMAL**, so just edit that line to say **DIRECTORY_MODE_PRIMARY**
......
......@@ -21,7 +21,7 @@ Returns the global app structure ($a).
* App::get_observer()
(App:: is usually assigned to the global $a), so $a->get_observer() or get_app()->get_observer() - returns an xchan structure representing the current viewer if authenticated (locally or remotely).
(App:: is usually assigned to the global $a), so App::get_observer() or App::get_observer() - returns an xchan structure representing the current viewer if authenticated (locally or remotely).
* get_config($family,$key), get_pconfig($uid,$family,$key)
......
......@@ -242,7 +242,7 @@ Befor you register a first user switch off the registration mails.
Open /var/www/.htconfig.php
and make sure "0" is set in this line
[code]
$a->config['system']['verify_email'] = 0;
App::$config['system']['verify_email'] = 0;
[/code]
You should be able to change the file as "yourself" (instead of using root or www-data).
......
......@@ -30,7 +30,7 @@ To configure this, please look in your .htconfig.php file for the following text
// DIRECTORY_MODE_PRIMARY = main directory server
// DIRECTORY_MODE_STANDALONE = "off the grid" or private directory services
$a->config['system']['directory_mode'] = DIRECTORY_MODE_STANDALONE;
App::$config['system']['directory_mode'] = DIRECTORY_MODE_STANDALONE;
[/code]
......
......@@ -8,22 +8,22 @@ $a is a class defined in boot.php and passed all around $Projectname as a global
We don't ever create more than one instance and always modify the elements of the single instance. The mechanics of this are somewhat tricky. If you have a function that is passed $a and needs to modify $a you need to declare it as a reference with '&' e.g.
[code]function foo(&$a) { $a->something = 'x'; // whatever };
[code]function foo(&$a) { App::$something = 'x'; // whatever };
*or* access it within your function as a global variable via get_app()
function foo() {
$a = get_app();
$a->something = 'x';
App::$something = 'x';
}
function foo($a) { $a->something = 'x'; };
function foo($a) { App::$something = 'x'; };
will *not* change the global app state.
function foo() {
get_app()->something = 'x';
App::$something = 'x';
}
[/code]
......
......@@ -8,5 +8,5 @@ The hook data for this call consists of an array
This element contains the HTML content which was prepared for this page by calling the module_content() function. It is invoked after the content has been created. It does not contain the result of AJAX or asynchronous page load calls.
The current module may be determined by lookin at $a->module
The current module may be determined by lookin at App::$module
......@@ -6,5 +6,5 @@ The hook data for this call consists of an array
This element contains the HTML content before calling the module_content() function. It is invoked before the content region has been populated. This may or may not be empty as there may be other processes or addons generating content prior to your hook handler is run. Be certain to preserve any current content. Typically anything you add here will be placed at the top of the content region of the page, but in any event prior to the main content region being generated.
The current module may be determined by lookin at $a->module
The current module may be determined by lookin at App::$module
......@@ -75,12 +75,12 @@ function vcard_from_xchan($xchan, $observer = null, $mode = '') {
$a = get_app();
if(! $xchan) {
if($a->poi) {
$xchan = $a->poi;
if(App::$poi) {
$xchan = App::$poi;
}
elseif(is_array($a->profile) && $a->profile['channel_hash']) {
elseif(is_array(App::$profile) && App::$profile['channel_hash']) {
$r = q("select * from xchan where xchan_hash = '%s' limit 1",
dbesc($a->profile['channel_hash'])
dbesc(App::$profile['channel_hash'])
);
if($r)
$xchan = $r[0];
......@@ -102,7 +102,7 @@ function vcard_from_xchan($xchan, $observer = null, $mode = '') {
}
if(array_key_exists('channel_id',$xchan))
$a->profile_uid = $xchan['channel_id'];
App::$profile_uid = $xchan['channel_id'];
$url = (($observer)
? z_root() . '/magic?f=&dest=' . $xchan['xchan_url'] . '&addr=' . $xchan['xchan_addr']
......@@ -111,7 +111,7 @@ function vcard_from_xchan($xchan, $observer = null, $mode = '') {
return replace_macros(get_markup_template('xchan_vcard.tpl'),array(
'$name' => $xchan['xchan_name'],
'$photo' => ((is_array($a->profile) && array_key_exists('photo',$a->profile)) ? $a->profile['photo'] : $xchan['xchan_photo_l']),
'$photo' => ((is_array(App::$profile) && array_key_exists('photo',App::$profile)) ? App::$profile['photo'] : $xchan['xchan_photo_l']),
'$follow' => $xchan['xchan_addr'],
'$link' => zid($xchan['xchan_url']),
'$connect' => $connect,
......@@ -333,19 +333,19 @@ function channel_remove($channel_id, $local = true, $unset_session=false) {
);
// if this was the default channel, set another one as default
if($a->account['account_default_channel'] == $channel_id) {
if(App::$account['account_default_channel'] == $channel_id) {
$r = q("select channel_id from channel where channel_account_id = %d and channel_removed = 0 limit 1",
intval($a->account['account_id']),
intval(App::$account['account_id']),
intval(PAGE_REMOVED));
if ($r) {
$rr = q("update account set account_default_channel = %d where account_id = %d",
intval($r[0]['channel_id']),
intval($a->account['account_id']));
intval(App::$account['account_id']));
logger("Default channel deleted, changing default to channel_id " . $r[0]['channel_id']);
}
else {
$rr = q("update account set account_default_channel = 0 where account_id = %d",
intval($a->account['account_id'])
intval(App::$account['account_id'])
);
}
}
......
......@@ -48,7 +48,7 @@ class Conversation extends BaseObject {
$a = $this->get_app();
$this->observer = $a->get_observer();
$this->observer = App::get_observer();
$ob_hash = (($this->observer) ? $this->observer['xchan_hash'] : '');
switch($mode) {
......@@ -57,7 +57,7 @@ class Conversation extends BaseObject {
$this->writable = true;
break;
case 'channel':
$this->profile_owner = $a->profile['profile_uid'];
$this->profile_owner = App::$profile['profile_uid'];
$this->writable = perm_is_allowed($this->profile_owner,$ob_hash,'post_comments');
break;
case 'display':
......@@ -67,7 +67,7 @@ class Conversation extends BaseObject {
$this->writable = perm_is_allowed($this->profile_owner,$ob_hash,'post_comments');
break;
case 'page':
$this->profile_owner = $a->profile['uid'];
$this->profile_owner = App::$profile['uid'];
$this->writable = perm_is_allowed($this->profile_owner,$ob_hash,'post_comments');
break;
default:
......
......@@ -8,7 +8,7 @@ require_once('include/photo/photo_driver.php');
function import_diaspora($data) {
$a = get_app();
$account = $a->get_account();
$account = App::get_account();
if(! $account)
return false;
......
......@@ -714,7 +714,7 @@ class Item extends BaseObject {
'$feature_encrypt' => ((feature_enabled($conv->get_profile_owner(),'content_encrypt')) ? true : false),
'$encrypt' => t('Encrypt text'),
'$cipher' => $conv->get_cipher(),
'$sourceapp' => get_app()->sourcename
'$sourceapp' => App::$sourcename
));
......
......@@ -248,7 +248,7 @@ function verify_email_address($arr) {
$res = mail($arr['email'], email_header_encode(sprintf( t('Registration confirmation for %s'), get_config('system','sitename'))),
$email_msg,
'From: ' . 'Administrator' . '@' . get_app()->get_hostname() . "\n"
'From: ' . 'Administrator' . '@' . App::get_hostname() . "\n"
. 'Content-type: text/plain; charset=UTF-8' . "\n"
. 'Content-transfer-encoding: 8bit'
);
......@@ -314,7 +314,7 @@ function send_reg_approval_email($arr) {
$res = mail($admin['email'], sprintf( t('Registration request at %s'), get_config('system','sitename')),
$email_msg,
'From: ' . t('Administrator') . '@' . get_app()->get_hostname() . "\n"
'From: ' . t('Administrator') . '@' . App::get_hostname() . "\n"
. 'Content-type: text/plain; charset=UTF-8' . "\n"
. 'Content-transfer-encoding: 8bit'
);
......@@ -341,7 +341,7 @@ function send_register_success_email($email,$password) {
$res = mail($email, sprintf( t('Registration details for %s'), get_config('system','sitename')),
$email_msg,
'From: ' . t('Administrator') . '@' . get_app()->get_hostname() . "\n"
'From: ' . t('Administrator') . '@' . App::get_hostname() . "\n"
. 'Content-type: text/plain; charset=UTF-8' . "\n"
. 'Content-transfer-encoding: 8bit'
);
......@@ -655,7 +655,7 @@ function account_service_class_allows($aid, $property, $usage = false) {
function service_class_fetch($uid, $property) {
$a = get_app();
if($uid == local_channel()) {
$service_class = $a->account['account_service_class'];
$service_class = App::$account['account_service_class'];
}
else {
$r = q("select account_service_class as service_class
......
......@@ -23,7 +23,7 @@ function group_select($selname,$selclass,$preselected = false,$size = 4) {
// e.g. 'network_pre_group_deny', 'profile_pre_group_allow'
call_hooks($a->module . '_pre_' . $selname, $arr);
call_hooks(App::$module . '_pre_' . $selname, $arr);
if($r) {
foreach($r as $rr) {
......@@ -39,7 +39,7 @@ function group_select($selname,$selclass,$preselected = false,$size = 4) {
}
$o .= "</select>\r\n";
call_hooks($a->module . '_post_' . $selname, $o);
call_hooks(App::$module . '_post_' . $selname, $o);
return $o;
......@@ -127,7 +127,7 @@ function contact_selector($selname, $selclass, $preselected = false, $options) {
// e.g. 'network_pre_contact_deny', 'profile_pre_contact_allow'
call_hooks($a->module . '_pre_' . $selname, $arr);
call_hooks(App::$module . '_pre_' . $selname, $arr);
if(count($r)) {
foreach($r as $rr) {
......@@ -145,7 +145,7 @@ function contact_selector($selname, $selclass, $preselected = false, $options) {
$o .= "</select>\r\n";
call_hooks($a->module . '_post_' . $selname, $o);
call_hooks(App::$module . '_post_' . $selname, $o);
return $o;
}*/
......@@ -182,7 +182,7 @@ function contact_select($selname, $selclass, $preselected = false, $size = 4, $p
// e.g. 'network_pre_contact_deny', 'profile_pre_contact_allow'
call_hooks($a->module . '_pre_' . $selname, $arr);
call_hooks(App::$module . '_pre_' . $selname, $arr);
if($r) {
foreach($r as $rr) {
......@@ -200,7 +200,7 @@ function contact_select($selname, $selclass, $preselected = false, $size = 4, $p
$o .= "</select>\r\n";
call_hooks($a->module . '_post_' . $selname, $o);
call_hooks(App::$module . '_post_' . $selname, $o);
return $o;
}
......