From 8a197055e3efc441085a6cb367e59d1bfda00f6a Mon Sep 17 00:00:00 2001
From: Hypolite Petovan
', $s);
}
-function babel_content(App &$a) {
+function babel_content(App $a) {
$o .= 'Babel Diagnostic
';
$o .= '';
+ $o .= '';
$o .= '
';
$o .= '';
+ $o .= '';
$o .= '
';
if(x($_REQUEST,'text')) {
$text = trim($_REQUEST['text']);
- $o .= "" . t("Source input: ") . "
" . EOL. EOL;
- $o .= visible_lf($text) . EOL. EOL;
+ $o .= "" . t("Source input: ") . "
" . EOL. EOL;
+ $o .= visible_lf($text) . EOL. EOL;
$html = bbcode($text);
- $o .= "" . t("bb2html (raw HTML): ") . "
" . EOL. EOL;
- $o .= htmlspecialchars($html). EOL. EOL;
+ $o .= "" . t("bb2html (raw HTML): ") . "
" . EOL. EOL;
+ $o .= htmlspecialchars($html). EOL. EOL;
//$html = bbcode($text);
- $o .= "" . t("bb2html: ") . "
" . EOL. EOL;
- $o .= $html. EOL. EOL;
+ $o .= "" . t("bb2html: ") . "
" . EOL. EOL;
+ $o .= $html. EOL. EOL;
$bbcode = html2bbcode($html);
- $o .= "" . t("bb2html2bb: ") . "
" . EOL. EOL;
- $o .= visible_lf($bbcode) . EOL. EOL;
+ $o .= "" . t("bb2html2bb: ") . "
" . EOL. EOL;
+ $o .= visible_lf($bbcode) . EOL. EOL;
$diaspora = bb2diaspora($text);
- $o .= "" . t("bb2md: ") . "
" . EOL. EOL;
- $o .= visible_lf($diaspora) . EOL. EOL;
+ $o .= "" . t("bb2md: ") . "
" . EOL. EOL;
+ $o .= visible_lf($diaspora) . EOL. EOL;
$html = Markdown($diaspora);
- $o .= "" . t("bb2md2html: ") . "
" . EOL. EOL;
- $o .= $html. EOL. EOL;
+ $o .= "" . t("bb2md2html: ") . "
" . EOL. EOL;
+ $o .= $html. EOL. EOL;
$bbcode = diaspora2bb($diaspora);
- $o .= "" . t("bb2dia2bb: ") . "
" . EOL. EOL;
- $o .= visible_lf($bbcode) . EOL. EOL;
+ $o .= "" . t("bb2dia2bb: ") . "
" . EOL. EOL;
+ $o .= visible_lf($bbcode) . EOL. EOL;
$bbcode = html2bbcode($html);
- $o .= "" . t("bb2md2html2bb: ") . "
" . EOL. EOL;
- $o .= visible_lf($bbcode) . EOL. EOL;
+ $o .= "" . t("bb2md2html2bb: ") . "
" . EOL. EOL;
+ $o .= visible_lf($bbcode) . EOL. EOL;
@@ -66,13 +66,13 @@ function babel_content(App &$a) {
if(x($_REQUEST,'d2bbtext')) {
$d2bbtext = trim($_REQUEST['d2bbtext']);
- $o .= "" . t("Source input (Diaspora format): ") . "
" . EOL. EOL;
- $o .= visible_lf($d2bbtext) . EOL. EOL;
+ $o .= "" . t("Source input (Diaspora format): ") . "
" . EOL. EOL;
+ $o .= visible_lf($d2bbtext) . EOL. EOL;
$bb = diaspora2bb($d2bbtext);
- $o .= "" . t("diaspora2bb: ") . "
" . EOL. EOL;
- $o .= visible_lf($bb) . EOL. EOL;
+ $o .= "" . t("diaspora2bb: ") . "
" . EOL. EOL;
+ $o .= visible_lf($bb) . EOL. EOL;
}
return $o;
diff --git a/mod/bookmarklet.php b/mod/bookmarklet.php
index 9bc8c33535..c4ef845704 100644
--- a/mod/bookmarklet.php
+++ b/mod/bookmarklet.php
@@ -3,11 +3,11 @@
require_once('include/conversation.php');
require_once('include/items.php');
-function bookmarklet_init(App &$a) {
+function bookmarklet_init(App $a) {
$_GET["mode"] = "minimal";
}
-function bookmarklet_content(App &$a) {
+function bookmarklet_content(App $a) {
if (!local_user()) {
$o = ''.t('Login').'
';
$o .= login(($a->config['register_policy'] == REGISTER_CLOSED) ? false : true);
diff --git a/mod/cal.php b/mod/cal.php
index 7cb36e7a54..b3cd1e3221 100644
--- a/mod/cal.php
+++ b/mod/cal.php
@@ -9,7 +9,7 @@
require_once('include/event.php');
require_once('include/redir.php');
-function cal_init(App &$a) {
+function cal_init(App $a) {
if($a->argc > 1)
auto_redir($a, $a->argv[1]);
@@ -64,7 +64,7 @@ function cal_init(App &$a) {
return;
}
-function cal_content(App &$a) {
+function cal_content(App $a) {
nav_set_selected('events');
$editselect = 'none';
diff --git a/mod/cb.php b/mod/cb.php
index 90e41fb6d5..3c5df6e38b 100644
--- a/mod/cb.php
+++ b/mod/cb.php
@@ -5,19 +5,19 @@
*/
-function cb_init(App &$a) {
+function cb_init(App $a) {
call_hooks('cb_init');
}
-function cb_post(App &$a) {
+function cb_post(App $a) {
call_hooks('cb_post', $_POST);
}
-function cb_afterpost(App &$a) {
+function cb_afterpost(App $a) {
call_hooks('cb_afterpost');
}
-function cb_content(App &$a) {
+function cb_content(App $a) {
$o = '';
call_hooks('cb_content', $o);
return $o;
diff --git a/mod/common.php b/mod/common.php
index 26ef7e48b7..5a40663f9e 100644
--- a/mod/common.php
+++ b/mod/common.php
@@ -5,7 +5,7 @@ require_once('include/Contact.php');
require_once('include/contact_selectors.php');
require_once('mod/contacts.php');
-function common_content(App &$a) {
+function common_content(App $a) {
$o = '';
diff --git a/mod/community.php b/mod/community.php
index 2c2ea32b33..2c00b3fad6 100644
--- a/mod/community.php
+++ b/mod/community.php
@@ -1,6 +1,6 @@
t('Delete'),
- 'url' => 'contacts/' . $contact['id'] . '/drop',
+ 'url' => 'contacts/' . $contact['id'] . '/drop',
'title' => t('Delete contact'),
'sel' => '',
'id' => 'delete',
diff --git a/mod/content.php b/mod/content.php
index 2377032a79..43f3fc2ba6 100644
--- a/mod/content.php
+++ b/mod/content.php
@@ -16,7 +16,7 @@
// and 10-20 milliseconds to fetch all the child items.
-function content_content(&$a, $update = 0) {
+function content_content(App $a, $update = 0) {
require_once('include/conversation.php');
@@ -61,7 +61,7 @@ function content_content(&$a, $update = 0) {
$o = '';
-
+
$contact_id = $a->cid;
@@ -100,7 +100,7 @@ function content_content(&$a, $update = 0) {
$def_acl = array('allow_cid' => $str);
}
-
+
$sql_options = (($star) ? " and starred = 1 " : '');
$sql_options .= (($bmark) ? " and bookmark = 1 " : '');
@@ -137,7 +137,7 @@ function content_content(&$a, $update = 0) {
}
elseif($cid) {
- $r = q("SELECT `id`,`name`,`network`,`writable`,`nurl` FROM `contact` WHERE `id` = %d
+ $r = q("SELECT `id`,`name`,`network`,`writable`,`nurl` FROM `contact` WHERE `id` = %d
AND `blocked` = 0 AND `pending` = 0 LIMIT 1",
intval($cid)
);
@@ -307,7 +307,7 @@ function content_content(&$a, $update = 0) {
-function render_content(&$a, $items, $mode, $update, $preview = false) {
+function render_content(App $a, $items, $mode, $update, $preview = false) {
require_once('include/bbcode.php');
require_once('mod/proxy.php');
@@ -382,7 +382,7 @@ function render_content(&$a, $items, $mode, $update, $preview = false) {
if($mode === 'network-new' || $mode === 'search' || $mode === 'community') {
- // "New Item View" on network page or search page results
+ // "New Item View" on network page or search page results
// - just loop through the items and format them minimally for display
//$tpl = get_markup_template('search_item.tpl');
@@ -402,7 +402,7 @@ function render_content(&$a, $items, $mode, $update, $preview = false) {
|| (activity_match($item['verb'],ACTIVITY_DISLIKE))
|| activity_match($item['verb'],ACTIVITY_ATTEND)
|| activity_match($item['verb'],ACTIVITY_ATTENDNO)
- || activity_match($item['verb'],ACTIVITY_ATTENDMAYBE))
+ || activity_match($item['verb'],ACTIVITY_ATTENDMAYBE))
&& ($item['id'] != $item['parent']))
continue;
$nickname = $item['nickname'];
@@ -450,7 +450,7 @@ function render_content(&$a, $items, $mode, $update, $preview = false) {
$drop = array(
'dropping' => $dropping,
- 'select' => t('Select'),
+ 'select' => t('Select'),
'delete' => t('Delete'),
);
@@ -540,11 +540,11 @@ function render_content(&$a, $items, $mode, $update, $preview = false) {
$comments[$item['parent']] = 1;
else
$comments[$item['parent']] += 1;
- } elseif(! x($comments,$item['parent']))
+ } elseif(! x($comments,$item['parent']))
$comments[$item['parent']] = 0; // avoid notices later on
}
- // map all the like/dislike/attendance activities for each parent item
+ // map all the like/dislike/attendance activities for each parent item
// Store these in the $alike and $dlike arrays
foreach($items as $item) {
@@ -633,14 +633,14 @@ function render_content(&$a, $items, $mode, $update, $preview = false) {
$redirect_url = 'redir/' . $item['cid'] ;
- $lock = ((($item['private'] == 1) || (($item['uid'] == local_user()) && (strlen($item['allow_cid']) || strlen($item['allow_gid'])
+ $lock = ((($item['private'] == 1) || (($item['uid'] == local_user()) && (strlen($item['allow_cid']) || strlen($item['allow_gid'])
|| strlen($item['deny_cid']) || strlen($item['deny_gid']))))
? t('Private Message')
: false);
// Top-level wall post not written by the wall owner (wall-to-wall)
- // First figure out who owns it.
+ // First figure out who owns it.
$osparkle = '';
@@ -667,13 +667,13 @@ function render_content(&$a, $items, $mode, $update, $preview = false) {
if((! $owner_linkmatch) && (! $alias_linkmatch) && (! $owner_namematch)) {
// The author url doesn't match the owner (typically the contact)
- // and also doesn't match the contact alias.
- // The name match is a hack to catch several weird cases where URLs are
+ // and also doesn't match the contact alias.
+ // The name match is a hack to catch several weird cases where URLs are
// all over the park. It can be tricked, but this prevents you from
// seeing "Bob Smith to Bob Smith via Wall-to-wall" and you know darn
- // well that it's the same Bob Smith.
+ // well that it's the same Bob Smith.
- // But it could be somebody else with the same name. It just isn't highly likely.
+ // But it could be somebody else with the same name. It just isn't highly likely.
$owner_url = $item['owner-link'];
@@ -682,7 +682,7 @@ function render_content(&$a, $items, $mode, $update, $preview = false) {
$template = $wallwall;
$commentww = 'ww';
// If it is our contact, use a friendly redirect link
- if((link_compare($item['owner-link'],$item['url']))
+ if((link_compare($item['owner-link'],$item['url']))
&& ($item['network'] === NETWORK_DFRN)) {
$owner_url = $redirect_url;
$osparkle = ' sparkle';
@@ -694,7 +694,7 @@ function render_content(&$a, $items, $mode, $update, $preview = false) {
}
$likebuttons = '';
- $shareable = ((($profile_owner == local_user()) && ($item['private'] != 1)) ? true : false);
+ $shareable = ((($profile_owner == local_user()) && ($item['private'] != 1)) ? true : false);
if($page_writeable) {
/* if($toplevelpost) { */
@@ -714,7 +714,7 @@ function render_content(&$a, $items, $mode, $update, $preview = false) {
if(($show_comment_box) || (($show_comment_box == false) && ($override_comment_box == false) && ($item['last-child']))) {
$comment = replace_macros($cmnt_tpl,array(
- '$return_path' => '',
+ '$return_path' => '',
'$jsreload' => (($mode === 'display') ? $_SESSION['return_url'] : ''),
'$type' => (($mode === 'profile') ? 'wall-comment' : 'net-comment'),
'$id' => $item['item_id'],
@@ -756,7 +756,7 @@ function render_content(&$a, $items, $mode, $update, $preview = false) {
$drop = array(
'dropping' => $dropping,
- 'select' => t('Select'),
+ 'select' => t('Select'),
'delete' => t('Delete'),
);
diff --git a/mod/credits.php b/mod/credits.php
index 84e32b83d5..f5c34b6105 100644
--- a/mod/credits.php
+++ b/mod/credits.php
@@ -5,7 +5,7 @@
* addons repository will be listed though ATM)
*/
-function credits_content (App &$a) {
+function credits_content (App $a) {
/* fill the page with credits */
$f = fopen('util/credits.txt','r');
$names = fread($f, filesize('util/credits.txt'));
diff --git a/mod/crepair.php b/mod/crepair.php
index c141958e8b..902a129303 100644
--- a/mod/crepair.php
+++ b/mod/crepair.php
@@ -2,7 +2,7 @@
require_once("include/contact_selectors.php");
require_once("mod/contacts.php");
-function crepair_init(App &$a) {
+function crepair_init(App $a) {
if (! local_user()) {
return;
}
@@ -30,7 +30,7 @@ function crepair_init(App &$a) {
}
}
-function crepair_post(App &$a) {
+function crepair_post(App $a) {
if (! local_user()) {
return;
}
@@ -96,7 +96,7 @@ function crepair_post(App &$a) {
-function crepair_content(App &$a) {
+function crepair_content(App $a) {
if (! local_user()) {
notice( t('Permission denied.') . EOL);
diff --git a/mod/delegate.php b/mod/delegate.php
index 6930a5943a..4212ec9b13 100644
--- a/mod/delegate.php
+++ b/mod/delegate.php
@@ -1,12 +1,12 @@
argc > 1)
$which = $a->argv[1];
@@ -42,7 +42,7 @@ function dfrn_request_init(App &$a) {
* After logging in, we click 'submit' to approve the linkage.
*
*/
-function dfrn_request_post(App &$a) {
+function dfrn_request_post(App $a) {
if(($a->argc != 2) || (! count($a->profile))) {
logger('Wrong count of argc or profiles: argc=' . $a->argc . ',profile()=' . count($a->profile));
@@ -658,7 +658,7 @@ function dfrn_request_post(App &$a) {
}
-function dfrn_request_content(App &$a) {
+function dfrn_request_content(App $a) {
if (($a->argc != 2) || (! count($a->profile))) {
return "";
diff --git a/mod/directory.php b/mod/directory.php
index f3fbb9eb77..ba48bb3926 100644
--- a/mod/directory.php
+++ b/mod/directory.php
@@ -1,6 +1,6 @@
set_pager_itemspage(60);
if(local_user()) {
@@ -20,19 +20,19 @@ function directory_init(App &$a) {
}
-function directory_post(App &$a) {
+function directory_post(App $a) {
if(x($_POST,'search'))
$a->data['search'] = $_POST['search'];
}
-function directory_content(App &$a) {
+function directory_content(App $a) {
global $db;
require_once("mod/proxy.php");
- if((get_config('system','block_public')) && (! local_user()) && (! remote_user()) ||
+ if((get_config('system','block_public')) && (! local_user()) && (! remote_user()) ||
(get_config('system','block_local_dir')) && (! local_user()) && (! remote_user())) {
notice( t('Public access denied.') . EOL);
return;
@@ -124,7 +124,7 @@ function directory_content(App &$a) {
}
// if(strlen($rr['dob'])) {
// if(($years = age($rr['dob'],$rr['timezone'],'')) != 0)
-// $details .= '
' . t('Age: ') . $years ;
+// $details .= '
' . t('Age: ') . $years ;
// }
// if(strlen($rr['gender']))
// $details .= '
' . t('Gender: ') . $rr['gender'];
diff --git a/mod/dirfind.php b/mod/dirfind.php
index 7eb830bb68..1b19ad92c4 100644
--- a/mod/dirfind.php
+++ b/mod/dirfind.php
@@ -5,7 +5,7 @@ require_once('include/Contact.php');
require_once('include/contact_selectors.php');
require_once('mod/contacts.php');
-function dirfind_init(App &$a) {
+function dirfind_init(App $a) {
if (! local_user()) {
notice( t('Permission denied.') . EOL );
@@ -23,7 +23,7 @@ function dirfind_init(App &$a) {
-function dirfind_content(&$a, $prefix = "") {
+function dirfind_content(App $a, $prefix = "") {
$community = false;
$discover_user = false;
diff --git a/mod/display.php b/mod/display.php
index c98d936a0f..115feb0ce5 100644
--- a/mod/display.php
+++ b/mod/display.php
@@ -1,6 +1,6 @@
argc != 3) OR (!in_array($a->argv[1], array("post", "status_message", "reshare")))) {
header($_SERVER["SERVER_PROTOCOL"].' 404 '.t('Not Found'));
diff --git a/mod/filer.php b/mod/filer.php
index 1b5589380b..47c4aa5e4c 100644
--- a/mod/filer.php
+++ b/mod/filer.php
@@ -5,7 +5,7 @@ require_once('include/bbcode.php');
require_once('include/items.php');
-function filer_content(App &$a) {
+function filer_content(App $a) {
if (! local_user()) {
killme();
@@ -30,7 +30,7 @@ function filer_content(App &$a) {
'$field' => array('term', t("Save to Folder:"), '', '', $filetags, t('- select -')),
'$submit' => t('Save'),
));
-
+
echo $o;
}
killme();
diff --git a/mod/filerm.php b/mod/filerm.php
index 7dbfe29473..7dd7df2f5a 100644
--- a/mod/filerm.php
+++ b/mod/filerm.php
@@ -1,6 +1,6 @@
argv[1]=="json"){
$register_policy = Array('REGISTER_CLOSED', 'REGISTER_APPROVE', 'REGISTER_OPEN');
@@ -59,7 +59,7 @@ function friendica_init(App &$a) {
-function friendica_content(App &$a) {
+function friendica_content(App $a) {
$o = '';
$o .= 'Friendica
';
@@ -70,7 +70,7 @@ function friendica_content(App &$a) {
$o .= t('This is Friendica, version') . ' ' . FRIENDICA_VERSION . ' ';
$o .= t('running at web location') . ' ' . z_root() . '
'; - $o .= t('Please visit Friendica.com to learn more about the Friendica project.') . '
'; + $o .= t('Please visit Friendica.com to learn more about the Friendica project.') . '
'; $o .= t('Bug reports and issues: please visit') . ' ' . ''.t('the bugtracker at github').'
'; $o .= t('Suggestions, praise, donations, etc. - please email "Info" at Friendica - dot com') . '
'; @@ -102,7 +102,7 @@ function friendica_content(App &$a) { else $o .= '' . t('No installed plugins/addons/apps') . '
'; - call_hooks('about_hook', $o); + call_hooks('about_hook', $o); return $o; diff --git a/mod/fsuggest.php b/mod/fsuggest.php index fcbadcc9b7..b3d5439712 100644 --- a/mod/fsuggest.php +++ b/mod/fsuggest.php @@ -1,7 +1,7 @@ '; - $o .= contact_selector('suggest','suggest-select', false, + $o .= contact_selector('suggest','suggest-select', false, array('size' => 4, 'exclude' => $contact_id, 'networks' => 'DFRN_ONLY', 'single' => true)); diff --git a/mod/group.php b/mod/group.php index 681bc88cc3..2b332e401f 100644 --- a/mod/group.php +++ b/mod/group.php @@ -4,7 +4,7 @@ function validate_members(&$item) { $item = intval($item); } -function group_init(App &$a) { +function group_init(App $a) { if(local_user()) { require_once('include/group.php'); $a->page['aside'] = group_side('contacts','group','extended',(($a->argc > 1) ? intval($a->argv[1]) : 0)); @@ -13,7 +13,7 @@ function group_init(App &$a) { -function group_post(App &$a) { +function group_post(App $a) { if (! local_user()) { notice( t('Permission denied.') . EOL); @@ -69,7 +69,7 @@ function group_post(App &$a) { return; } -function group_content(App &$a) { +function group_content(App $a) { $change = false; if (! local_user()) { diff --git a/mod/hcard.php b/mod/hcard.php index d53405009a..07eb291510 100644 --- a/mod/hcard.php +++ b/mod/hcard.php @@ -1,6 +1,6 @@