';
- call_hooks('about_hook', $o);
+ call_hooks('about_hook', $o);
return $o;
-}
+
}
diff --git a/mod/fsuggest.php b/mod/fsuggest.php
index 26a5e9806..6b1cbd753 100644
--- a/mod/fsuggest.php
+++ b/mod/fsuggest.php
@@ -1,6 +1,6 @@
';
- $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));
@@ -109,4 +109,3 @@ function fsuggest_content(&$a) {
return $o;
}
-}
diff --git a/mod/group.php b/mod/group.php
index 2f8053eef..5b28784f5 100644
--- a/mod/group.php
+++ b/mod/group.php
@@ -1,21 +1,18 @@
page['aside'] = group_side('contacts','group','extended',(($a->argc > 1) ? intval($a->argv[1]) : 0));
}
}
-}
-if(! function_exists('group_post')) {
+
+
function group_post(&$a) {
if(! local_user()) {
@@ -67,9 +64,7 @@ function group_post(&$a) {
}
return;
}
-}
-if(! function_exists('group_content')) {
function group_content(&$a) {
$change = false;
@@ -234,5 +229,5 @@ function group_content(&$a) {
}
return replace_macros($tpl, $context);
-}
+
}
diff --git a/mod/hcard.php b/mod/hcard.php
index af49423de..6d2d9e2eb 100644
--- a/mod/hcard.php
+++ b/mod/hcard.php
@@ -1,6 +1,5 @@
argc > 2) && ($a->argv[2] === 'view')) {
$which = $a->user['nickname'];
- $profile = $a->argv[1];
+ $profile = $a->argv[1];
}
profile_load($a,$which,$profile);
@@ -24,7 +23,7 @@ function hcard_init(&$a) {
if((x($a->profile,'page-flags')) && ($a->profile['page-flags'] == PAGE_COMMUNITY)) {
$a->page['htmlhead'] .= '';
}
- if(x($a->profile,'openidserver'))
+ if(x($a->profile,'openidserver'))
$a->page['htmlhead'] .= '' . "\r\n";
if(x($a->profile,'openid')) {
$delegate = ((strstr($a->profile['openid'],'://')) ? $a->profile['openid'] : 'http://' . $a->profile['openid']);
@@ -43,9 +42,10 @@ function hcard_init(&$a) {
$uri = urlencode('acct:' . $a->profile['nickname'] . '@' . $a->get_hostname() . (($a->path) ? '/' . $a->path : ''));
$a->page['htmlhead'] .= '' . "\r\n";
header('Link: <' . $a->get_baseurl() . '/xrd/?uri=' . $uri . '>; rel="lrdd"; type="application/xrd+xml"', false);
-
+
$dfrn_pages = array('request', 'confirm', 'notify', 'poll');
foreach($dfrn_pages as $dfrn)
$a->page['htmlhead'] .= "get_baseurl()."/dfrn_{$dfrn}/{$which}\" />\r\n";
+
}
-}
+
diff --git a/mod/help.php b/mod/help.php
index 320e622fa..5465d3e90 100644
--- a/mod/help.php
+++ b/mod/help.php
@@ -18,7 +18,6 @@ if (!function_exists('load_doc_file')) {
}
-if(! function_exists('help_content')) {
function help_content(&$a) {
nav_set_selected('help');
@@ -99,5 +98,5 @@ function help_content(&$a) {
}
".$html;
return $html;
-}
+
}
diff --git a/mod/hostxrd.php b/mod/hostxrd.php
index 5b178e9b8..4121764f1 100644
--- a/mod/hostxrd.php
+++ b/mod/hostxrd.php
@@ -2,7 +2,6 @@
require_once('include/crypto.php');
-if(! function_exists('hostxrd_init')) {
function hostxrd_init(&$a) {
header('Access-Control-Allow-Origin: *');
header("Content-type: text/xml");
@@ -28,5 +27,5 @@ function hostxrd_init(&$a) {
));
session_write_close();
exit();
-}
+
}
diff --git a/mod/ignored.php b/mod/ignored.php
index 8a681a115..e876b4ef8 100644
--- a/mod/ignored.php
+++ b/mod/ignored.php
@@ -1,6 +1,6 @@
config['system']['theme'] = "../install";
$a->theme['stylesheet'] = $a->get_baseurl()."/view/install/style.css";
-
-
-
+
+
+
global $install_wizard_pass;
if (x($_POST,'pass'))
$install_wizard_pass = intval($_POST['pass']);
-}
+
}
-if(! function_exists('install_post')) {
function install_post(&$a) {
global $install_wizard_pass, $db;
@@ -113,18 +112,14 @@ function install_post(&$a) {
break;
}
}
-}
-if(! function_exists('get_db_errno')) {
function get_db_errno() {
if(class_exists('mysqli'))
return mysqli_connect_errno();
else
return mysql_errno();
}
-}
-if(! function_exists('install_content')) {
function install_content(&$a) {
global $install_wizard_pass, $db;
@@ -309,7 +304,6 @@ function install_content(&$a) {
}
}
-}
/**
* checks : array passed to template
@@ -318,8 +312,7 @@ function install_content(&$a) {
* required : boolean
* help : string optional
*/
-if(! function_exists('check_add')) {
-function check_add(&$checks, $title, $status, $required, $help) {
+function check_add(&$checks, $title, $status, $required, $help){
$checks[] = array(
'title' => $title,
'status' => $status,
@@ -327,9 +320,7 @@ function check_add(&$checks, $title, $status, $required, $help) {
'help' => $help,
);
}
-}
-if(! function_exists('check_php')) {
function check_php(&$phpath, &$checks) {
$passed = $passed2 = $passed3 = false;
if (strlen($phpath)){
@@ -379,10 +370,9 @@ function check_php(&$phpath, &$checks) {
check_add($checks, t('PHP register_argc_argv'), $passed3, true, $help);
}
-}
+
}
-if(! function_exists('check_keys')) {
function check_keys(&$checks) {
$help = '';
@@ -402,10 +392,10 @@ function check_keys(&$checks) {
$help .= t('If running under Windows, please see "http://www.php.net/manual/en/openssl.installation.php".');
}
check_add($checks, t('Generate encryption keys'), $res, true, $help);
-}
+
}
-if(! function_exists('check_funcs')) {
+
function check_funcs(&$checks) {
$ck_funcs = array();
check_add($ck_funcs, t('libCurl PHP module'), true, true, "");
@@ -467,9 +457,8 @@ function check_funcs(&$checks) {
/*if((x($_SESSION,'sysmsg')) && is_array($_SESSION['sysmsg']) && count($_SESSION['sysmsg']))
notice( t('Please see the file "INSTALL.txt".') . EOL);*/
}
-}
-if(! function_exists('check_htconfig')) {
+
function check_htconfig(&$checks) {
$status = true;
$help = "";
@@ -484,10 +473,9 @@ function check_htconfig(&$checks) {
}
check_add($checks, t('.htconfig.php is writable'), $status, false, $help);
-}
+
}
-if(! function_exists('check_smarty3')) {
function check_smarty3(&$checks) {
$status = true;
$help = "";
@@ -501,10 +489,9 @@ function check_smarty3(&$checks) {
}
check_add($checks, t('view/smarty3 is writable'), $status, true, $help);
-}
+
}
-if(! function_exists('check_htaccess')) {
function check_htaccess(&$checks) {
$a = get_app();
$status = true;
@@ -524,9 +511,7 @@ function check_htaccess(&$checks) {
// cannot check modrewrite if libcurl is not installed
}
}
-}
-if(! function_exists('check_imagik')) {
function check_imagik(&$checks) {
$imagick = false;
$gif = false;
@@ -543,18 +528,16 @@ function check_imagik(&$checks) {
check_add($checks, t('ImageMagick supports GIF'), $gif, false, "");
}
}
-}
-if(! function_exists('manual_config')) {
+
+
function manual_config(&$a) {
$data = htmlentities($a->data['txt'],ENT_COMPAT,'UTF-8');
$o = t('The database configuration file ".htconfig.php" could not be written. Please use the enclosed text to create a configuration file in your web server root.');
$o .= "";
return $o;
}
-}
-if(! function_exists('load_database_rem')) {
function load_database_rem($v, $i){
$l = trim($i);
if (strlen($l)>1 && ($l[0]=="-" || ($l[0]=="/" && $l[1]=="*"))){
@@ -563,9 +546,8 @@ function load_database_rem($v, $i){
return $v."\n".$i;
}
}
-}
-if(! function_exists('load_database')) {
+
function load_database($db) {
require_once("include/dbstructure.php");
@@ -585,9 +567,7 @@ function load_database($db) {
return $errors;
}
-}
-if(! function_exists('what_next')) {
function what_next() {
$a = get_app();
$baseurl = $a->get_baseurl();
@@ -599,4 +579,5 @@ function what_next() {
.t("Go to your new Friendica node registration page and register as new user. Remember to use the same email you have entered as administrator email. This will allow you to enter the site admin panel.")
."";
}
-}
+
+
diff --git a/mod/invite.php b/mod/invite.php
index 1f559dabc..ccf876c7c 100644
--- a/mod/invite.php
+++ b/mod/invite.php
@@ -9,7 +9,6 @@
require_once('include/email.php');
-if(! function_exists('invite_post')) {
function invite_post(&$a) {
if(! local_user()) {
@@ -50,7 +49,7 @@ function invite_post(&$a) {
notice( sprintf( t('%s : Not a valid email address.'), $recip) . EOL);
continue;
}
-
+
if($invonly && ($x || is_site_admin())) {
$code = autoname(8) . srand(1000,9999);
$nmessage = str_replace('$invite_code',$code,$message);
@@ -71,8 +70,8 @@ function invite_post(&$a) {
else
$nmessage = $message;
- $res = mail($recip, email_header_encode( t('Please join us on Friendica'),'UTF-8'),
- $nmessage,
+ $res = mail($recip, email_header_encode( t('Please join us on Friendica'),'UTF-8'),
+ $nmessage,
"From: " . $a->user['email'] . "\n"
. 'Content-type: text/plain; charset=UTF-8' . "\n"
. 'Content-transfer-encoding: 8bit' );
@@ -94,9 +93,8 @@ function invite_post(&$a) {
notice( sprintf( tt("%d message sent.", "%d messages sent.", $total) , $total) . EOL);
return;
}
-}
-if(! function_exists('invite_content')) {
+
function invite_content(&$a) {
if(! local_user()) {
@@ -136,7 +134,7 @@ function invite_content(&$a) {
'$msg_text' => t('Your message:'),
'$default_message' => t('You are cordially invited to join me and other close friends on Friendica - and help us to create a better social web.') . "\r\n" . "\r\n"
. $linktxt
- . "\r\n" . "\r\n" . (($invonly) ? t('You will need to supply this invitation code: $invite_code') . "\r\n" . "\r\n" : '') .t('Once you have registered, please connect with me via my profile page at:')
+ . "\r\n" . "\r\n" . (($invonly) ? t('You will need to supply this invitation code: $invite_code') . "\r\n" . "\r\n" : '') .t('Once you have registered, please connect with me via my profile page at:')
. "\r\n" . "\r\n" . $a->get_baseurl() . '/profile/' . $a->user['nickname']
. "\r\n" . "\r\n" . t('For more information about the Friendica project and why we feel it is important, please visit http://friendica.com') . "\r\n" . "\r\n" ,
'$submit' => t('Submit')
@@ -144,4 +142,3 @@ function invite_content(&$a) {
return $o;
}
-}
diff --git a/mod/item.php b/mod/item.php
index f8f2e0faf..8c5a47964 100644
--- a/mod/item.php
+++ b/mod/item.php
@@ -25,7 +25,6 @@ require_once('include/text.php');
require_once('include/items.php');
require_once('include/Scrape.php');
-if(! function_exists('item_post')) {
function item_post(&$a) {
if((! local_user()) && (! remote_user()) && (! x($_REQUEST,'commenter')))
@@ -1018,9 +1017,7 @@ function item_post(&$a) {
item_post_return($a->get_baseurl(), $api_source, $return_path);
// NOTREACHED
}
-}
-if(! function_exists('item_post_return')) {
function item_post_return($baseurl, $api_source, $return_path) {
// figure out how to return, depending on from whence we came
@@ -1040,9 +1037,9 @@ function item_post_return($baseurl, $api_source, $return_path) {
echo json_encode($json);
killme();
}
-}
-if(! function_exists('item_content')) {
+
+
function item_content(&$a) {
if((! local_user()) && (! remote_user()))
@@ -1061,7 +1058,6 @@ function item_content(&$a) {
}
return $o;
}
-}
/**
* This function removes the tag $tag from the text $body and replaces it with
@@ -1075,7 +1071,6 @@ function item_content(&$a) {
*
* @return boolean true if replaced, false if not replaced
*/
-if(! function_exists('handle_tag')) {
function handle_tag($a, &$body, &$inform, &$str_tags, $profile_uid, $tag, $network = "") {
require_once("include/Scrape.php");
require_once("include/socgraph.php");
@@ -1250,9 +1245,8 @@ function handle_tag($a, &$body, &$inform, &$str_tags, $profile_uid, $tag, $netwo
return array('replaced' => $replaced, 'contact' => $r[0]);
}
-}
-if(! function_exists('store_diaspora_comment_sig')) {
+
function store_diaspora_comment_sig($datarray, $author, $uprvkey, $parent_item, $post_id) {
// We won't be able to sign Diaspora comments for authenticated visitors - we don't have their private key
@@ -1290,4 +1284,3 @@ function store_diaspora_comment_sig($datarray, $author, $uprvkey, $parent_item,
return;
}
-}
diff --git a/mod/like.php b/mod/like.php
index ef483a1f9..8d383b9ab 100755
--- a/mod/like.php
+++ b/mod/like.php
@@ -5,7 +5,6 @@ require_once('include/bbcode.php');
require_once('include/items.php');
require_once('include/like.php');
-if(! function_exists('like_content')) {
function like_content(&$a) {
if(! local_user() && ! remote_user()) {
return false;
@@ -29,11 +28,11 @@ function like_content(&$a) {
killme(); // NOTREACHED
// return; // NOTREACHED
}
-}
+
// Decide how to return. If we were called with a 'return' argument,
// then redirect back to the calling page. If not, just quietly end
-if(! function_exists('like_content_return')) {
+
function like_content_return($baseurl, $return_path) {
if($return_path) {
@@ -46,4 +45,4 @@ function like_content_return($baseurl, $return_path) {
killme();
}
-}
+
diff --git a/mod/localtime.php b/mod/localtime.php
index fc500f4dd..d1453bc52 100644
--- a/mod/localtime.php
+++ b/mod/localtime.php
@@ -2,7 +2,7 @@
require_once('include/datetime.php');
-if(! function_exists('localtime_post')) {
+
function localtime_post(&$a) {
$t = $_REQUEST['time'];
@@ -13,10 +13,9 @@ function localtime_post(&$a) {
if($_POST['timezone'])
$a->data['mod-localtime'] = datetime_convert('UTC',$_POST['timezone'],$t,$bd_format);
-}
+
}
-if(! function_exists('localtime_content')) {
function localtime_content(&$a) {
$t = $_REQUEST['time'];
if(! $t)
@@ -39,12 +38,12 @@ function localtime_content(&$a) {
$o .= '';
return $o;
-}
-}
+
+}
\ No newline at end of file
diff --git a/mod/lockview.php b/mod/lockview.php
index 82f93f498..0ae54c8c1 100644
--- a/mod/lockview.php
+++ b/mod/lockview.php
@@ -1,8 +1,8 @@
argc > 1) ? $a->argv[1] : 0);
if (is_numeric($type)) {
$item_id = intval($type);
@@ -10,13 +10,13 @@ function lockview_content(&$a) {
} else {
$item_id = (($a->argc > 2) ? intval($a->argv[2]) : 0);
}
-
+
if(! $item_id)
killme();
if (!in_array($type, array('item','photo','event')))
killme();
-
+
$r = q("SELECT * FROM `%s` WHERE `id` = %d LIMIT 1",
dbesc($type),
intval($item_id)
@@ -33,7 +33,7 @@ function lockview_content(&$a) {
}
- if(($item['private'] == 1) && (! strlen($item['allow_cid'])) && (! strlen($item['allow_gid']))
+ if(($item['private'] == 1) && (! strlen($item['allow_cid'])) && (! strlen($item['allow_gid']))
&& (! strlen($item['deny_cid'])) && (! strlen($item['deny_gid']))) {
echo t('Remote privacy information not available.') . ' ';
@@ -53,7 +53,7 @@ function lockview_content(&$a) {
dbesc(implode(', ', $allowed_groups))
);
if(count($r))
- foreach($r as $rr)
+ foreach($r as $rr)
$l[] = '' . $rr['name'] . '';
}
if(count($allowed_users)) {
@@ -61,7 +61,7 @@ function lockview_content(&$a) {
dbesc(implode(', ',$allowed_users))
);
if(count($r))
- foreach($r as $rr)
+ foreach($r as $rr)
$l[] = $rr['name'];
}
@@ -71,7 +71,7 @@ function lockview_content(&$a) {
dbesc(implode(', ', $deny_groups))
);
if(count($r))
- foreach($r as $rr)
+ foreach($r as $rr)
$l[] = '' . $rr['name'] . '';
}
if(count($deny_users)) {
@@ -79,12 +79,12 @@ function lockview_content(&$a) {
dbesc(implode(', ',$deny_users))
);
if(count($r))
- foreach($r as $rr)
+ foreach($r as $rr)
$l[] = '' . $rr['name'] . '';
}
echo $o . implode(', ', $l);
killme();
-}
+
}
diff --git a/mod/login.php b/mod/login.php
index 47c329eb6..d09fc1868 100644
--- a/mod/login.php
+++ b/mod/login.php
@@ -1,5 +1,5 @@
config['register_policy'] == REGISTER_CLOSED) ? false : true);
-}
+
}
diff --git a/mod/lostpass.php b/mod/lostpass.php
index 0c4bb1a83..938d1cbb0 100644
--- a/mod/lostpass.php
+++ b/mod/lostpass.php
@@ -4,7 +4,6 @@ require_once('include/email.php');
require_once('include/enotify.php');
require_once('include/text.php');
-if(! function_exists('lostpass_post')) {
function lostpass_post(&$a) {
$loginame = notags(trim($_POST['login-name']));
@@ -75,10 +74,10 @@ function lostpass_post(&$a) {
'body' => $body));
goaway(z_root());
-}
+
}
-if(! function_exists('lostpass_content')) {
+
function lostpass_content(&$a) {
@@ -165,5 +164,5 @@ function lostpass_content(&$a) {
return $o;
}
-}
+
}
diff --git a/mod/maintenance.php b/mod/maintenance.php
index 02de29108..b50c94c9b 100644
--- a/mod/maintenance.php
+++ b/mod/maintenance.php
@@ -1,8 +1,7 @@
t('System down for maintenance')
));
}
-}
diff --git a/mod/manage.php b/mod/manage.php
index 6af3db997..adcc3d787 100644
--- a/mod/manage.php
+++ b/mod/manage.php
@@ -2,7 +2,7 @@
require_once("include/text.php");
-if(! function_exists('manage_post')) {
+
function manage_post(&$a) {
if(! local_user())
@@ -87,9 +87,9 @@ function manage_post(&$a) {
goaway( $a->get_baseurl() . "/profile/" . $a->user['nickname'] );
// NOTREACHED
}
-}
-if(! function_exists('manage_content')) {
+
+
function manage_content(&$a) {
if(! local_user()) {
@@ -144,5 +144,5 @@ function manage_content(&$a) {
));
return $o;
-}
+
}
diff --git a/mod/match.php b/mod/match.php
index f4936b28d..3b0367b42 100644
--- a/mod/match.php
+++ b/mod/match.php
@@ -13,7 +13,6 @@ require_once('mod/proxy.php');
* @param App &$a
* @return void|string
*/
-if(! function_exists('match_content')) {
function match_content(&$a) {
$o = '';
@@ -110,4 +109,3 @@ function match_content(&$a) {
return $o;
}
-}
diff --git a/mod/message.php b/mod/message.php
index 1f11797d8..1724ebc42 100644
--- a/mod/message.php
+++ b/mod/message.php
@@ -3,7 +3,6 @@
require_once('include/acl_selectors.php');
require_once('include/message.php');
-if(! function_exists('message_init')) {
function message_init(&$a) {
$tabs = '';
@@ -37,10 +36,9 @@ function message_init(&$a) {
'$baseurl' => $a->get_baseurl(true),
'$base' => $base
));
-}
+
}
-if(! function_exists('message_post')) {
function message_post(&$a) {
if(! local_user()) {
@@ -93,7 +91,7 @@ function message_post(&$a) {
}
else
goaway($a->get_baseurl(true) . '/' . $_SESSION['return_url']);
-}
+
}
// Note: the code in 'item_extract_images' and 'item_redir_and_replace_images'
@@ -173,7 +171,7 @@ function item_redir_and_replace_images($body, $images, $cid) {
}}
-if(! function_exists('message_content')) {
+
function message_content(&$a) {
$o = '';
@@ -532,9 +530,7 @@ function message_content(&$a) {
return $o;
}
}
-}
-if(! function_exists('get_messages')) {
function get_messages($user, $lstart, $lend) {
return q("SELECT max(`mail`.`created`) AS `mailcreated`, min(`mail`.`seen`) AS `mailseen`,
@@ -545,9 +541,7 @@ function get_messages($user, $lstart, $lend) {
intval($user), intval($lstart), intval($lend)
);
}
-}
-if(! function_exists('render_messages')) {
function render_messages($msg, $t) {
$a = get_app();
@@ -599,4 +593,3 @@ function render_messages($msg, $t) {
return $rslt;
}
-}
diff --git a/mod/modexp.php b/mod/modexp.php
index 282d55a24..bba2c2882 100644
--- a/mod/modexp.php
+++ b/mod/modexp.php
@@ -2,7 +2,6 @@
require_once('library/asn1.php');
-if(! function_exists('modexp_init')) {
function modexp_init(&$a) {
if($a->argc != 2)
@@ -30,5 +29,6 @@ function modexp_init(&$a) {
echo 'RSA' . '.' . $m . '.' . $e ;
killme();
+
}
-}
+
diff --git a/mod/mood.php b/mod/mood.php
index 2476f0656..eee11e20c 100644
--- a/mod/mood.php
+++ b/mod/mood.php
@@ -4,7 +4,7 @@ require_once('include/security.php');
require_once('include/bbcode.php');
require_once('include/items.php');
-if(! function_exists('mood_init')) {
+
function mood_init(&$a) {
if(! local_user())
@@ -59,7 +59,7 @@ function mood_init(&$a) {
$uri = item_new_uri($a->get_hostname(),$uid);
- $action = sprintf( t('%1$s is currently %2$s'), '[url=' . $poster['url'] . ']' . $poster['name'] . '[/url]' , $verbs[$verb]);
+ $action = sprintf( t('%1$s is currently %2$s'), '[url=' . $poster['url'] . ']' . $poster['name'] . '[/url]' , $verbs[$verb]);
$arr = array();
@@ -105,9 +105,9 @@ function mood_init(&$a) {
return;
}
-}
-if(! function_exists('mood_content')) {
+
+
function mood_content(&$a) {
if(! local_user()) {
@@ -138,5 +138,5 @@ function mood_content(&$a) {
));
return $o;
-}
+
}
diff --git a/mod/msearch.php b/mod/msearch.php
index 3b1b0b617..89de5b705 100644
--- a/mod/msearch.php
+++ b/mod/msearch.php
@@ -1,6 +1,5 @@
$rr['name'],
- 'url' => $a->get_baseurl() . '/profile/' . $rr['nickname'],
+ 'name' => $rr['name'],
+ 'url' => $a->get_baseurl() . '/profile/' . $rr['nickname'],
'photo' => $a->get_baseurl() . '/photo/avatar/' . $rr['uid'] . '.jpg',
'tags' => str_replace(array(',',' '),array(' ',' '),$rr['pub_keywords'])
);
@@ -39,5 +38,5 @@ function msearch_post(&$a) {
echo json_encode($output);
killme();
-}
-}
+
+}
\ No newline at end of file
diff --git a/mod/navigation.php b/mod/navigation.php
index 8fbabfda9..5db69b171 100644
--- a/mod/navigation.php
+++ b/mod/navigation.php
@@ -2,7 +2,6 @@
require_once("include/nav.php");
-if(! function_exists('navigation_content')) {
function navigation_content(&$a) {
$nav_info = nav_info($a);
@@ -23,5 +22,5 @@ function navigation_content(&$a) {
'$apps' => $a->apps,
'$clear_notifs' => t('Clear notifications')
));
-}
+
}
diff --git a/mod/network.php b/mod/network.php
index f9a0bec23..0010a3d82 100644
--- a/mod/network.php
+++ b/mod/network.php
@@ -1,6 +1,4 @@
page['aside'] .= networks_widget($a->get_baseurl(true) . '/network',(x($_GET, 'nets') ? $_GET['nets'] : ''));
$a->page['aside'] .= saved_searches($search);
$a->page['aside'] .= fileas_widget($a->get_baseurl(true) . '/network',(x($_GET, 'file') ? $_GET['file'] : ''));
-}
+
}
-if(! function_exists('saved_searches')) {
function saved_searches($search) {
if(! feature_enabled(local_user(),'savedsearch'))
@@ -207,7 +204,7 @@ function saved_searches($search) {
));
return $o;
-}
+
}
/**
@@ -225,7 +222,6 @@ function saved_searches($search) {
*
* @return Array ( $no_active, $comment_active, $postord_active, $conv_active, $new_active, $starred_active, $bookmarked_active, $spam_active );
*/
-if(! function_exists('network_query_get_sel_tab')) {
function network_query_get_sel_tab($a) {
$no_active='';
$starred_active = '';
@@ -282,12 +278,10 @@ function network_query_get_sel_tab($a) {
return array($no_active, $all_active, $postord_active, $conv_active, $new_active, $starred_active, $bookmarked_active, $spam_active);
}
-}
/**
* Return selected network from query
*/
-if(! function_exists('network_query_get_sel_net')) {
function network_query_get_sel_net() {
$network = false;
@@ -297,9 +291,7 @@ function network_query_get_sel_net() {
return $network;
}
-}
-if(! function_exists('network_query_get_sel_group')) {
function network_query_get_sel_group($a) {
$group = false;
@@ -309,9 +301,8 @@ function network_query_get_sel_group($a) {
return $group;
}
-}
-if(! function_exists('network_content')) {
+
function network_content(&$a, $update = 0) {
require_once('include/conversation.php');
@@ -895,4 +886,4 @@ function network_content(&$a, $update = 0) {
return $o;
}
-}
+
diff --git a/mod/newmember.php b/mod/newmember.php
index ef2533330..aa55c3a09 100644
--- a/mod/newmember.php
+++ b/mod/newmember.php
@@ -1,6 +1,5 @@
';
- $o .= '
' . '' . t('Friendica Walk-Through') . ' ' . t('On your Quick Start page - find a brief introduction to your profile and network tabs, make some new connections, and find some groups to join.') . '
' . EOL;
+ $o .= '
' . '' . t('Friendica Walk-Through') . ' ' . t('On your Quick Start page - find a brief introduction to your profile and network tabs, make some new connections, and find some groups to join.') . '
' . '' . t('Go to Your Settings') . ' ' . t('On your Settings page - change your initial password. Also make a note of your Identity Address. This looks just like an email address - and will be useful in making friends on the free social web.') . '
' . EOL;
+ $o .= '
' . '' . t('Go to Your Settings') . ' ' . t('On your Settings page - change your initial password. Also make a note of your Identity Address. This looks just like an email address - and will be useful in making friends on the free social web.') . '
' . EOL;
$o .= '
' . t('Review the other settings, particularly the privacy settings. An unpublished directory listing is like having an unlisted phone number. In general, you should probably publish your listing - unless all of your friends and potential friends know exactly how to find you.') . '
' . '' . t('Upload Profile Photo') . ' ' . t('Upload a profile photo if you have not done so already. Studies have shown that people with real photos of themselves are ten times more likely to make friends than people who do not.') . '
' . EOL;
+ $o .= '
' . '' . t('Upload Profile Photo') . ' ' . t('Upload a profile photo if you have not done so already. Studies have shown that people with real photos of themselves are ten times more likely to make friends than people who do not.') . '
' . EOL;
$o .= '
' . '' . t('Edit Your Profile') . ' ' . t('Edit your default profile to your liking. Review the settings for hiding your list of friends and hiding the profile from unknown visitors.') . '
' . '' . t('Importing Emails') . ' ' . t('Enter your email access information on your Connector Settings page if you wish to import and interact with friends or mailing lists from your email INBOX') . '
' . EOL;
@@ -83,4 +82,3 @@ function newmember_content(&$a) {
return $o;
}
-}
diff --git a/mod/nodeinfo.php b/mod/nodeinfo.php
index 7f8939182..ba310a105 100644
--- a/mod/nodeinfo.php
+++ b/mod/nodeinfo.php
@@ -1,13 +1,12 @@
diff --git a/mod/nogroup.php b/mod/nogroup.php
index 818b0da77..9f6e97843 100644
--- a/mod/nogroup.php
+++ b/mod/nogroup.php
@@ -4,7 +4,6 @@ require_once('include/Contact.php');
require_once('include/socgraph.php');
require_once('include/contact_selectors.php');
-if(! function_exists('nogroup_init')) {
function nogroup_init(&$a) {
if(! local_user())
@@ -18,9 +17,8 @@ function nogroup_init(&$a) {
$a->page['aside'] .= group_side('contacts','group','extended',0,$contact_id);
}
-}
-if(! function_exists('nogroup_content')) {
+
function nogroup_content(&$a) {
if(! local_user()) {
@@ -68,5 +66,5 @@ function nogroup_content(&$a) {
));
return $o;
-}
+
}
diff --git a/mod/noscrape.php b/mod/noscrape.php
index 49fe2b9a3..51bd7234c 100644
--- a/mod/noscrape.php
+++ b/mod/noscrape.php
@@ -1,6 +1,5 @@
argc > 1)
@@ -63,5 +62,5 @@ function noscrape_init(&$a) {
header('Content-type: application/json; charset=utf-8');
echo json_encode($json_info);
exit;
-}
+
}
diff --git a/mod/notes.php b/mod/notes.php
index 7817e2554..73c1507e3 100644
--- a/mod/notes.php
+++ b/mod/notes.php
@@ -1,6 +1,5 @@
contact['id'] . ">' ";
$r = q("SELECT COUNT(*) AS `total`
FROM `item` LEFT JOIN `contact` ON `contact`.`id` = `item`.`contact-id`
- WHERE `item`.`uid` = %d AND `item`.`visible` = 1 and `item`.`moderated` = 0
+ WHERE `item`.`uid` = %d AND `item`.`visible` = 1 and `item`.`moderated` = 0
AND `item`.`deleted` = 0 AND `item`.`type` = 'note'
AND `contact`.`blocked` = 0 AND `contact`.`pending` = 0 AND `contact`.`self` = 1
AND `item`.`id` = `item`.`parent` AND `item`.`wall` = 0
@@ -91,7 +90,7 @@ function notes_content(&$a,$update = false) {
$r = q("SELECT `item`.`id` AS `item_id`, `contact`.`uid` AS `contact-uid`
FROM `item` LEFT JOIN `contact` ON `contact`.`id` = `item`.`contact-id`
- WHERE `item`.`uid` = %d AND `item`.`visible` = 1 AND `item`.`deleted` = 0
+ WHERE `item`.`uid` = %d AND `item`.`visible` = 1 AND `item`.`deleted` = 0
and `item`.`moderated` = 0 AND `item`.`type` = 'note'
AND `contact`.`blocked` = 0 AND `contact`.`pending` = 0 AND `contact`.`self` = 1
AND `item`.`id` = `item`.`parent` AND `item`.`wall` = 0
@@ -110,10 +109,10 @@ function notes_content(&$a,$update = false) {
foreach($r as $rr)
$parents_arr[] = $rr['item_id'];
$parents_str = implode(', ', $parents_arr);
-
- $r = q("SELECT `item`.*, `item`.`id` AS `item_id`,
- `contact`.`name`, `contact`.`photo`, `contact`.`url`, `contact`.`alias`, `contact`.`network`, `contact`.`rel`,
- `contact`.`thumb`, `contact`.`self`, `contact`.`writable`,
+
+ $r = q("SELECT `item`.*, `item`.`id` AS `item_id`,
+ `contact`.`name`, `contact`.`photo`, `contact`.`url`, `contact`.`alias`, `contact`.`network`, `contact`.`rel`,
+ `contact`.`thumb`, `contact`.`self`, `contact`.`writable`,
`contact`.`id` AS `cid`, `contact`.`uid` AS `contact-uid`
FROM `item` LEFT JOIN `contact` ON `contact`.`id` = `item`.`contact-id`
WHERE `item`.`uid` = %d AND `item`.`visible` = 1 and `item`.`moderated` = 0 AND `item`.`deleted` = 0
@@ -136,4 +135,3 @@ function notes_content(&$a,$update = false) {
$o .= paginate($a);
return $o;
}
-}
diff --git a/mod/notice.php b/mod/notice.php
index a42d60dd4..19cf53189 100644
--- a/mod/notice.php
+++ b/mod/notice.php
@@ -1,8 +1,7 @@
friendica items permanent-url compatibility */
-
-if(! function_exists('notice_init')) {
- function notice_init(&$a) {
+ /* identi.ca -> friendica items permanent-url compatibility */
+
+ function notice_init(&$a){
$id = $a->argv[1];
$r = q("SELECT user.nickname FROM user LEFT JOIN item ON item.uid=user.uid WHERE item.id=%d",
intval($id)
@@ -17,5 +16,5 @@ if(! function_exists('notice_init')) {
}
return;
+
}
-}
diff --git a/mod/notifications.php b/mod/notifications.php
index c7421b2d4..a267b7c95 100644
--- a/mod/notifications.php
+++ b/mod/notifications.php
@@ -3,7 +3,6 @@ include_once("include/bbcode.php");
include_once("include/contact_selectors.php");
include_once("include/Scrape.php");
-if(! function_exists('notifications_post')) {
function notifications_post(&$a) {
if(! local_user()) {
@@ -59,11 +58,11 @@ function notifications_post(&$a) {
}
}
}
-}
-if(! function_exists('notifications_content')) {
+
+
function notifications_content(&$a) {
if(! local_user()) {
@@ -580,4 +579,3 @@ function notifications_content(&$a) {
$o .= paginate($a);
return $o;
}
-}
diff --git a/mod/notify.php b/mod/notify.php
index 7acac1084..02260514a 100644
--- a/mod/notify.php
+++ b/mod/notify.php
@@ -1,6 +1,6 @@
query_string, LOGGER_ALL);
if ($a->argv[1]=='b2h'){
@@ -34,4 +33,3 @@ function oembed_content(&$a) {
}
killme();
}
-}
diff --git a/mod/oexchange.php b/mod/oexchange.php
index 1e7c9b23c..bbb436e70 100644
--- a/mod/oexchange.php
+++ b/mod/oexchange.php
@@ -1,6 +1,6 @@
argc > 1) && ($a->argv[1] === 'xrd')) {
@@ -11,10 +11,9 @@ function oexchange_init(&$a) {
killme();
}
-}
+
}
-if(! function_exists('oexchange_content')) {
function oexchange_content(&$a) {
if(! local_user()) {
@@ -27,13 +26,13 @@ function oexchange_content(&$a) {
return;
}
- $url = (((x($_REQUEST,'url')) && strlen($_REQUEST['url']))
+ $url = (((x($_REQUEST,'url')) && strlen($_REQUEST['url']))
? urlencode(notags(trim($_REQUEST['url']))) : '');
- $title = (((x($_REQUEST,'title')) && strlen($_REQUEST['title']))
+ $title = (((x($_REQUEST,'title')) && strlen($_REQUEST['title']))
? '&title=' . urlencode(notags(trim($_REQUEST['title']))) : '');
- $description = (((x($_REQUEST,'description')) && strlen($_REQUEST['description']))
+ $description = (((x($_REQUEST,'description')) && strlen($_REQUEST['description']))
? '&description=' . urlencode(notags(trim($_REQUEST['description']))) : '');
- $tags = (((x($_REQUEST,'tags')) && strlen($_REQUEST['tags']))
+ $tags = (((x($_REQUEST,'tags')) && strlen($_REQUEST['tags']))
? '&tags=' . urlencode(notags(trim($_REQUEST['tags']))) : '');
$s = fetch_url($a->get_baseurl() . '/parse_url?f=&url=' . $url . $title . $description . $tags);
@@ -53,5 +52,7 @@ function oexchange_content(&$a) {
$_REQUEST = $post;
require_once('mod/item.php');
item_post($a);
+
}
-}
+
+
diff --git a/mod/openid.php b/mod/openid.php
index a92a124c0..5d5539f00 100644
--- a/mod/openid.php
+++ b/mod/openid.php
@@ -1,8 +1,9 @@
$a->get_baseurl(),
'$nodename' => $a->get_hostname(),
));
-
+
echo $o;
-
+
killme();
+
}
-}
-?>
+?>
\ No newline at end of file
diff --git a/mod/ostatus_subscribe.php b/mod/ostatus_subscribe.php
index a21436db4..6cca0bf67 100644
--- a/mod/ostatus_subscribe.php
+++ b/mod/ostatus_subscribe.php
@@ -3,7 +3,6 @@
require_once('include/Scrape.php');
require_once('include/follow.php');
-if(! function_exists('ostatus_subscribe_content')) {
function ostatus_subscribe_content(&$a) {
if(! local_user()) {
@@ -77,4 +76,3 @@ function ostatus_subscribe_content(&$a) {
return $o;
}
-}
diff --git a/mod/p.php b/mod/p.php
index 225b831fe..92b72dc1c 100644
--- a/mod/p.php
+++ b/mod/p.php
@@ -4,8 +4,7 @@ This file is part of the Diaspora protocol. It is used for fetching single publi
*/
require_once("include/diaspora.php");
-if(! function_exists('p_init')) {
-function p_init($a) {
+function p_init($a){
if ($a->argc != 2) {
header($_SERVER["SERVER_PROTOCOL"].' 510 '.t('Not Extended'));
killme();
@@ -80,4 +79,3 @@ function p_init($a) {
killme();
}
-}
diff --git a/mod/parse_url.php b/mod/parse_url.php
index 481cb8936..a1ca5a3db 100644
--- a/mod/parse_url.php
+++ b/mod/parse_url.php
@@ -1,14 +1,14 @@
*
*
- *
+ *
*
*