require_once("include/Contact.php");
require_once('include/Probe.php');
-function profiles_init(App &$a) {
+function profiles_init(App $a) {
nav_set_selected('profiles');
return $keywords;
}
-function profiles_post(App &$a) {
+function profiles_post(App $a) {
if (! local_user()) {
notice( t('Permission denied.') . EOL);
}
-function profiles_content(App &$a) {
+function profiles_content(App $a) {
if (! local_user()) {
notice( t('Permission denied.') . EOL);
<?php
-function profperm_init(App &$a) {
+function profperm_init(App $a) {
if (! local_user()) {
return;
}
-function profperm_content(App &$a) {
+function profperm_content(App $a) {
if (! local_user()) {
notice( t('Permission denied') . EOL);
}
$o .= '<div id="prof-update-wrapper">';
- if($change)
+ if($change)
$o = '';
-
+
$o .= '<div id="prof-members-title">';
$o .= '<h3>' . t('Visible To') . '</h3>';
$o .= '</div>';
-function pubsub_init(App &$a) {
+function pubsub_init(App $a) {
$nick = (($a->argc > 1) ? notags(trim($a->argv[1])) : '');
$contact_id = (($a->argc > 2) ? intval($a->argv[2]) : 0 );
$sql_extra = ((strlen($hub_verify)) ? sprintf(" AND `hub-verify` = '%s' ", dbesc($hub_verify)) : '');
- $r = q("SELECT * FROM `contact` WHERE `id` = %d AND `uid` = %d
+ $r = q("SELECT * FROM `contact` WHERE `id` = %d AND `uid` = %d
AND `blocked` = 0 AND `pending` = 0 $sql_extra LIMIT 1",
intval($contact_id),
intval($owner['uid'])
$contact = $r[0];
- // We must initiate an unsubscribe request with a verify_token.
+ // We must initiate an unsubscribe request with a verify_token.
// Don't allow outsiders to unsubscribe us.
if($hub_mode === 'unsubscribe') {
require_once('include/security.php');
-function pubsub_post(App &$a) {
+function pubsub_post(App $a) {
$xml = file_get_contents('php://input');
return (x($_POST, $name)) ? notags(trim($_POST[$name])) : '';
}
-function pubsubhubbub_init(App &$a) {
+function pubsubhubbub_init(App $a) {
// PuSH subscription must be considered "public" so just block it
// if public access isn't enabled.
if (get_config('system', 'block_public')) {
<?php
-function qsearch_init(App &$a) {
+function qsearch_init(App $a) {
if (! local_user()) {
killme();
<?php
-function randprof_init(App &$a) {
+function randprof_init(App $a) {
require_once('include/Contact.php');
$x = random_profile();
require_once('include/diaspora.php');
-function receive_post(App &$a) {
+function receive_post(App $a) {
$enabled = intval(get_config('system','diaspora_enabled'));
<?php
-function redir_init(App &$a) {
+function redir_init(App $a) {
$url = ((x($_GET,'url')) ? $_GET['url'] : '');
$quiet = ((x($_GET,'quiet')) ? '&quiet=1' : '');
intval(time() + 45)
);
- logger('mod_redir: ' . $r[0]['name'] . ' ' . $sec, LOGGER_DEBUG);
+ logger('mod_redir: ' . $r[0]['name'] . ' ' . $sec, LOGGER_DEBUG);
$dest = (($url) ? '&destination_url=' . $url : '');
- goaway ($r[0]['poll'] . '?dfrn_id=' . $dfrn_id
+ goaway ($r[0]['poll'] . '?dfrn_id=' . $dfrn_id
. '&dfrn_version=' . DFRN_PROTOCOL_VERSION . '&type=profile&sec=' . $sec . $dest . $quiet );
}
require_once('include/user.php');
if(! function_exists('register_post')) {
-function register_post(App &$a) {
+function register_post(App $a) {
global $lang;
if(! function_exists('register_content')) {
-function register_content(App &$a) {
+function register_content(App $a) {
// logged in users can register others (people/pages/groups)
// even with closed registrations, unless specifically prohibited by site policy.
}
-function regmod_content(App &$a) {
+function regmod_content(App $a) {
global $lang;
<?php
-function removeme_post(App &$a) {
+function removeme_post(App $a) {
if (! local_user()) {
return;
}
-function removeme_content(App &$a) {
+function removeme_content(App $a) {
if (! local_user()) {
goaway(z_root());
require_once('include/Scrape.php');
require_once('include/follow.php');
-function repair_ostatus_content(App &$a) {
+function repair_ostatus_content(App $a) {
if (! local_user()) {
notice( t('Permission denied.') . EOL);
-function rsd_xml_content(App &$a) {
+function rsd_xml_content(App $a) {
header ("Content-Type: text/xml");
echo '<?xml version="1.0" encoding="UTF-8"?>
<rsd version="1.0" xmlns="http://archipelago.phrasewise.com/rsd">
}
-function salmon_post(App &$a) {
+function salmon_post(App $a) {
$xml = file_get_contents('php://input');
if(get_pconfig($importer['uid'],'system','ostatus_autofriend')) {
$result = new_contact($importer['uid'],$author_link);
if($result['success']) {
- $r = q("SELECT * FROM `contact` WHERE `network` = '%s' AND ( `url` = '%s' OR `alias` = '%s')
+ $r = q("SELECT * FROM `contact` WHERE `network` = '%s' AND ( `url` = '%s' OR `alias` = '%s')
AND `uid` = %d LIMIT 1",
dbesc(NETWORK_OSTATUS),
dbesc($author_link),
}
-function search_init(App &$a) {
+function search_init(App $a) {
$search = ((x($_GET,'search')) ? notags(trim(rawurldecode($_GET['search']))) : '');
-function search_post(App &$a) {
+function search_post(App $a) {
if(x($_POST,'search'))
$a->data['search'] = $_POST['search'];
}
-function search_content(App &$a) {
+function search_content(App $a) {
if((get_config('system','block_public')) && (! local_user()) && (! remote_user())) {
notice( t('Public access denied.') . EOL);
<?php
-function session_content(&$a) {
+function session_content(App $a) {
}
return null;
}
-function settings_init(App &$a) {
+function settings_init(App $a) {
if (! local_user()) {
notice( t('Permission denied.') . EOL );
}
-function settings_post(App &$a) {
+function settings_post(App $a) {
if (! local_user()) {
return;
}
-function settings_content(App &$a) {
+function settings_content(App $a) {
$o = '';
nav_set_selected('settings');
<?php
-function share_init(App &$a) {
+function share_init(App $a) {
$post_id = (($a->argc > 1) ? intval($a->argv[1]) : 0);
if((! $post_id) || (! local_user()))
killme();
- $r = q("SELECT item.*, contact.network FROM `item`
- inner join contact on `item`.`contact-id` = `contact`.`id`
+ $r = q("SELECT item.*, contact.network FROM `item`
+ inner join contact on `item`.`contact-id` = `contact`.`id`
WHERE `item`.`id` = %d AND `item`.`uid` = %d LIMIT 1",
intval($post_id),
require_once("include/Smilies.php");
-function smilies_content(App &$a) {
+function smilies_content(App $a) {
if ($a->argv[1]==="json"){
$tmp = Smilies::get_list();
$results = array();
<?php
-function starred_init(App &$a) {
+function starred_init(App $a) {
require_once("include/threads.php");
require_once("include/plugin.php");
-function statistics_json_init(App &$a) {
+function statistics_json_init(App $a) {
if (!get_config("system", "nodeinfo")) {
http_status_exit(404);
require_once('include/items.php');
-function subthread_content(App &$a) {
+function subthread_content(App $a) {
if(! local_user() && ! remote_user()) {
return;
}
}
- // this represents the post owner on this system.
+ // this represents the post owner on this system.
$r = q("SELECT `contact`.*, `user`.`nickname` FROM `contact` LEFT JOIN `user` ON `contact`.`uid` = `user`.`uid`
WHERE `contact`.`self` = 1 AND `contact`.`uid` = %d LIMIT 1",
require_once('include/socgraph.php');
require_once('include/contact_widgets.php');
-function suggest_init(App &$a) {
+function suggest_init(App $a) {
if (! local_user()) {
return;
}
-function suggest_content(App &$a) {
+function suggest_content(App $a) {
require_once("mod/proxy.php");
require_once('include/items.php');
-function tagger_content(App &$a) {
+function tagger_content(App $a) {
if(! local_user() && ! remote_user()) {
return;
require_once('include/bbcode.php');
-function tagrm_post(App &$a) {
+function tagrm_post(App $a) {
if (! local_user()) {
goaway(App::get_baseurl() . '/' . $_SESSION['photo_return']);
info( t('Tag removed') . EOL );
goaway(App::get_baseurl() . '/' . $_SESSION['photo_return']);
-
+
// NOTREACHED
}
-function tagrm_content(App &$a) {
+function tagrm_content(App $a) {
$o = '';
<?php
-function toggle_mobile_init(App &$a) {
+function toggle_mobile_init(App $a) {
if (isset($_GET['off'])) {
$_SESSION['show-mobile'] = false;
<?php
-function uexport_init(App &$a){
+function uexport_init(App $a) {
if (! local_user()) {
killme();
}
}
/// @TODO Change space -> tab where wanted
-function uexport_content(App &$a){
+function uexport_content(App $a) {
if ($a->argc > 1) {
header("Content-type: application/json");
/**
* echoes account data and items as separated json, one per line
*/
-function uexport_all(App &$a) {
+function uexport_all(App $a) {
uexport_account($a);
echo "\n";
\r
require_once("include/uimport.php");\r
\r
-function uimport_post(App &$a) {\r
+function uimport_post(App $a) {\r
switch($a->config['register_policy']) {\r
case REGISTER_OPEN:\r
$blocked = 0;\r
$verified = 0;\r
break;\r
}\r
- \r
+\r
if (x($_FILES,'accountfile')){\r
/// @TODO Pass $blocked / $verified, send email to admin on REGISTER_APPROVE\r
import_account($a, $_FILES['accountfile']);\r
}\r
}\r
\r
-function uimport_content(App &$a) {\r
- \r
+function uimport_content(App $a) {\r
+\r
if((! local_user()) && ($a->config['register_policy'] == REGISTER_CLOSED)) {\r
notice("Permission denied." . EOL);\r
return;\r
return;\r
}\r
}\r
- \r
- \r
+\r
+\r
if(x($_SESSION,'theme'))\r
unset($_SESSION['theme']);\r
if(x($_SESSION,'mobile-theme'))\r
require_once("mod/community.php");
-function update_community_content(App &$a) {
+function update_community_content(App $a) {
header("Content-type: text/html");
echo "<!DOCTYPE html><html><body>\r\n";
require_once("mod/display.php");
require_once("include/group.php");
-function update_display_content(App &$a) {
+function update_display_content(App $a) {
$profile_uid = intval($_GET["p"]);
require_once("mod/network.php");
require_once("include/group.php");
-function update_network_content(App &$a) {
+function update_network_content(App $a) {
$profile_uid = intval($_GET["p"]);
require_once("mod/notes.php");
-function update_notes_content(App &$a) {
+function update_notes_content(App $a) {
$profile_uid = intval($_GET["p"]);
require_once("mod/profile.php");
-function update_profile_content(App &$a) {
+function update_profile_content(App $a) {
$profile_uid = intval($_GET["p"]);
require_once('include/redir.php');
-function videos_init(App &$a) {
+function videos_init(App $a) {
if($a->argc > 1)
auto_redir($a, $a->argv[1]);
-function videos_post(App &$a) {
+function videos_post(App $a) {
$owner_uid = $a->data['user']['uid'];
-function videos_content(App &$a) {
+function videos_content(App $a) {
// URLs (most aren't currently implemented):
// videos/name
require_once('include/Contact.php');
require_once('include/contact_selectors.php');
-function viewcontacts_init(App &$a) {
+function viewcontacts_init(App $a) {
if((get_config('system','block_public')) && (! local_user()) && (! remote_user())) {
return;
}
-function viewcontacts_content(App &$a) {
+function viewcontacts_content(App $a) {
require_once("mod/proxy.php");
if((get_config('system','block_public')) && (! local_user()) && (! remote_user())) {
<?php
-function viewsrc_content(App &$a) {
+function viewsrc_content(App $a) {
if (! local_user()) {
notice( t('Access denied.') . EOL);
return;
}
- $r = q("SELECT `item`.`body` FROM `item`
+ $r = q("SELECT `item`.`body` FROM `item`
WHERE `item`.`uid` = %d AND `item`.`visible` = 1 AND `item`.`deleted` = 0
and `item`.`moderated` = 0
AND `item`.`id` = '%s' LIMIT 1",
require_once('include/attach.php');
require_once('include/datetime.php');
-function wall_attach_post(App &$a) {
+function wall_attach_post(App $a) {
$r_json = (x($_GET,'response') && $_GET['response']=='json');
require_once('include/Photo.php');
-function wall_upload_post(&$a, $desktopmode = true) {
+function wall_upload_post(App $a, $desktopmode = true) {
logger("wall upload: starting new upload", LOGGER_DEBUG);
require_once('include/message.php');
-function wallmessage_post(App &$a) {
+function wallmessage_post(App $a) {
$replyto = get_my_url();
if(! $replyto) {
}
-function wallmessage_content(App &$a) {
+function wallmessage_content(App $a) {
if(! get_my_url()) {
notice( t('Permission denied.') . EOL);
'$nickname' => $user['nickname'],
'$linkurl' => t('Please enter a link URL:')
));
-
-
+
+
$tpl = get_markup_template('wallmessage.tpl');
$o .= replace_macros($tpl,array(
'$header' => t('Send Private Message'),
<?php
require_once("include/Probe.php");
-function webfinger_content(App &$a) {
+function webfinger_content(App $a) {
$o .= '<h3>Webfinger Diagnostic</h3>';
require_once('include/crypto.php');
-function xrd_init(App &$a) {
+function xrd_init(App $a) {
$uri = urldecode(notags(trim($_GET['uri'])));