From ada8bee70e89c34afa53eff9ad70315cfcd34c6d Mon Sep 17 00:00:00 2001 From: Friendika Date: Sat, 27 Aug 2011 18:09:43 -0700 Subject: remove public disclosure risk --- mod/network.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mod') diff --git a/mod/network.php b/mod/network.php index 05b74b50a..54fb2a0a4 100644 --- a/mod/network.php +++ b/mod/network.php @@ -188,7 +188,7 @@ function network_content(&$a, $update = 0) { if(count($r)) { $sql_extra = " AND `item`.`parent` IN ( SELECT `parent` FROM `item` WHERE `id` = `parent` $star_sql AND `contact-id` IN ( " . intval($cid) . " )) "; $o = '

' . t('Contact: ') . $r[0]['name'] . '

' . $o; - if($r[0]['network'] !== NETWORK_MAIL && $r[0]['network'] !== NETWORK_DFRN && $r[0]['network'] !== NETWORK_FACEBOOK && $r[0]['writable'] && (! get_pconfig(local_user(),'system','nowarn_insecure'))) { + if($r[0]['network'] !== NETWORK_MAIL && $r[0]['network'] !== NETWORK_DFRN && $r[0]['network'] !== NETWORK_FACEBOOK && $r[0]['network'] !== NETWORK_DIASPORA && $r[0]['writable'] && (! get_pconfig(local_user(),'system','nowarn_insecure'))) { notice( t('Private messages to this person are at risk of public disclosure.') . EOL); } -- cgit v1.2.3 From f29f228463d35f574d6d285be0cf337b7d39c541 Mon Sep 17 00:00:00 2001 From: Friendika Date: Sun, 28 Aug 2011 19:22:27 -0700 Subject: bring Diaspora message signing back to the source author - whether they like it or not. --- mod/item.php | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'mod') diff --git a/mod/item.php b/mod/item.php index ef0b232d5..dd42014eb 100644 --- a/mod/item.php +++ b/mod/item.php @@ -15,6 +15,8 @@ * */ +require_once('include/crypto.php'); + function item_post(&$a) { if((! local_user()) && (! remote_user())) @@ -674,6 +676,27 @@ function item_post(&$a) { pop_lang(); } + + // We won't be able to sign Diaspora comments for authenticated visitors - we don't have their private key + + if($self) { + require_once('include/bb2diaspora.php'); + $signed_body = html_entity_decode(bb2diaspora($datarray['body'])); + $myaddr = $a->user['nickname'] . '@' . substr($a->get_baseurl(), strpos($a->get_baseurl(),'://') + 3); + if($datarray['verb'] === ACTIVITY_LIKE) + $signed_text = $datarray['guid'] . ';' . 'Post' . ';' . $parent_item['guid'] . ';' . 'true' . ';' . $myaddr; + else + $signed_text = $datarray['guid'] . ';' . $parent_item['guid'] . ';' . $signed_body . ';' . $myaddr; + + $authorsig = base64_encode(rsa_sign($signed_text,$a->user['prvkey'],'sha')); + + q("insert into sign (`iid`,`signed_text`,`signature`,`signer`) values (%d,'%s','%s','%s') ", + intval($post_id), + dbesc($signed_text), + dbesc(base64_encode($authorsig)), + dbesc($myaddr) + ); + } } else { $parent = $post_id; @@ -799,6 +822,12 @@ function item_post(&$a) { } } + + + + + + logger('post_complete'); // figure out how to return, depending on from whence we came -- cgit v1.2.3 From 22d9d97d71a94fcfc057c350c4dfad5e36fb6dd0 Mon Sep 17 00:00:00 2001 From: Friendika Date: Mon, 29 Aug 2011 19:18:59 -0700 Subject: remove "online reputation" section on contact editing - nobody ever uses it, and there is no interface to query it. --- mod/contacts.php | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) (limited to 'mod') diff --git a/mod/contacts.php b/mod/contacts.php index 5d72cff88..307e9b15b 100644 --- a/mod/contacts.php +++ b/mod/contacts.php @@ -87,25 +87,15 @@ function contacts_post(&$a) { $priority = intval($_POST['poll']); - if($priority == (-1)) - if($priority > 5 || $priority < 0) $priority = 0; - $rating = intval($_POST['reputation']); - if($rating > 5 || $rating < 0) - $rating = 0; - - $reason = notags(trim($_POST['reason'])); - $info = escape_tags(trim($_POST['info'])); - $r = q("UPDATE `contact` SET `profile-id` = %d, `priority` = %d , `rating` = %d, `reason` = '%s', `info` = '%s' + $r = q("UPDATE `contact` SET `profile-id` = %d, `priority` = %d , `info` = '%s' WHERE `id` = %d AND `uid` = %d LIMIT 1", intval($profile_id), intval($priority), - intval($rating), - dbesc($reason), dbesc($info), intval($contact_id), intval(local_user()) @@ -277,8 +267,6 @@ function contacts_content(&$a) { $sparkle = ''; } - $grps = ''; - $insecure = '

' . t('Privacy Unavailable') . ' ' . t('Private communications are not available for this contact.') . '

'; @@ -313,7 +301,6 @@ function contacts_content(&$a) { '$lblcrepair' => t("Repair contact URL settings \x28WARNING: Advanced\x29"), '$lblrecent' => t('View conversations'), '$lblsuggest' => $lblsuggest, - '$grps' => $grps, '$delete' => t('Delete contact'), '$nettype' => $nettype, '$poll_interval' => contact_poll_interval($r[0]['priority'],(! $poll_enabled)), @@ -330,9 +317,6 @@ function contacts_content(&$a) { '$info' => $r[0]['info'], '$blocked' => (($r[0]['blocked']) ? '
' . t('Currently blocked') . '
' : ''), '$ignored' => (($r[0]['readonly']) ? '
' . t('Currently ignored') . '
' : ''), - '$rating' => contact_reputation($r[0]['rating']), - '$reason' => $r[0]['reason'], - '$groups' => '', // group_selector(), '$photo' => $r[0]['photo'], '$name' => $r[0]['name'], '$dir_icon' => $dir_icon, -- cgit v1.2.3 From f8da48a880f8b01e2284610e74fe3b2b6ec2dc39 Mon Sep 17 00:00:00 2001 From: Friendika Date: Tue, 30 Aug 2011 18:46:34 -0700 Subject: unsafe chars in admin, add img to diaspora markdown processor --- mod/admin.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mod') diff --git a/mod/admin.php b/mod/admin.php index 7799e64ab..72544ee70 100644 --- a/mod/admin.php +++ b/mod/admin.php @@ -344,7 +344,7 @@ function admin_page_site(&$a) { * Users admin page */ function admin_page_users_post(&$a){ - $pending = ( x(£_POST, 'pending') ? $_POST['pending'] : Array() ); + $pending = ( x($_POST, 'pending') ? $_POST['pending'] : Array() ); $users = ( x($_POST, 'user') ? $_POST['user'] : Array() ); if (x($_POST,'page_users_block')){ -- cgit v1.2.3 From f0c3a75ff38dcd208710fa24596c34290faf110e Mon Sep 17 00:00:00 2001 From: Friendika Date: Tue, 30 Aug 2011 23:09:39 -0700 Subject: youtube redirect fixes --- mod/item.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mod') diff --git a/mod/item.php b/mod/item.php index dd42014eb..b6ea8ff08 100644 --- a/mod/item.php +++ b/mod/item.php @@ -353,7 +353,7 @@ function item_post(&$a) { * and we are replying, and there isn't one already */ - if(($parent_contact) && ($parent_contact['network'] === 'stat') + if(($parent_contact) && ($parent_contact['network'] === NETWORK_OSTATUS) && ($parent_contact['nick']) && (! in_array('@' . $parent_contact['nick'],$tags))) { $body = '@' . $parent_contact['nick'] . ' ' . $body; $tags[] = '@' . $parent_contact['nick']; -- cgit v1.2.3 From 71d44d78ec5b16a53b82f4e631b86cd8247a9b0f Mon Sep 17 00:00:00 2001 From: Fabio Comuni Date: Wed, 31 Aug 2011 16:17:32 +0200 Subject: Installed apps as array instead of string --- mod/apps.php | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'mod') diff --git a/mod/apps.php b/mod/apps.php index 7a0a3f59e..8049b45fb 100644 --- a/mod/apps.php +++ b/mod/apps.php @@ -1,15 +1,18 @@ ' . t('Applications') . ''; - - if($a->apps) - $o .= $a->apps; - else + if(count($a->apps)==0) notice( t('No installed applications.') . EOL); - return $o; -} \ No newline at end of file + $tpl = get_markup_template("apps.tpl"); + return replace_macros($tpl, array( + '$title' => $title, + '$apps' => $a->apps, + )); + + + +} -- cgit v1.2.3 From b38d6d97c3746203241c5ef50a8dd9f0bb0a0de0 Mon Sep 17 00:00:00 2001 From: Fabio Comuni Date: Wed, 31 Aug 2011 16:18:37 +0200 Subject: Avoid a small error in admin --- mod/admin.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mod') diff --git a/mod/admin.php b/mod/admin.php index 7799e64ab..bbf786acb 100644 --- a/mod/admin.php +++ b/mod/admin.php @@ -540,7 +540,7 @@ function admin_page_plugins(&$a){ } $admin_form=""; - if (in_array($plugin, $a->plugins_admin)){ + if (is_array($a->plugins_admin) && in_array($plugin, $a->plugins_admin)){ @require_once("addon/$plugin/$plugin.php"); $func = $plugin.'_plugin_admin'; $func($a, $admin_form); -- cgit v1.2.3 From a33edb00424882258a90b138c634a466c92faf61 Mon Sep 17 00:00:00 2001 From: Friendika Date: Thu, 1 Sep 2011 18:02:08 -0700 Subject: infrastructure for personalised @ tags (no UI/settings form yet), allow own comments through statusnet connector --- mod/item.php | 3 ++- mod/photos.php | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'mod') diff --git a/mod/item.php b/mod/item.php index b6ea8ff08..6ecca8f4a 100644 --- a/mod/item.php +++ b/mod/item.php @@ -404,7 +404,8 @@ function item_post(&$a) { ); } else { - $r = q("SELECT * FROM `contact` WHERE `nick` = '%s' AND `uid` = %d LIMIT 1", + $r = q("SELECT * FROM `contact` WHERE `attag` = '%s' OR `nick` = '%s' AND `uid` = %d ORDER BY `attag` DESC LIMIT 1", + dbesc($name), dbesc($name), intval($profile_uid) ); diff --git a/mod/photos.php b/mod/photos.php index cb13b7603..b74ca85d7 100644 --- a/mod/photos.php +++ b/mod/photos.php @@ -414,7 +414,8 @@ function photos_post(&$a) { ); } else { - $r = q("SELECT * FROM `contact` WHERE `nick` = '%s' AND `uid` = %d LIMIT 1", + $r = q("SELECT * FROM `contact` WHERE `attag` = '%s' OR `nick` = '%s' AND `uid` = %d ORDER BY `attag` DESC LIMIT 1", + dbesc($name), dbesc($name), intval($page_owner_uid) ); -- cgit v1.2.3 From 71f71ecf46c9dfc522685d171fbaf9bc7d73b708 Mon Sep 17 00:00:00 2001 From: Friendika Date: Thu, 1 Sep 2011 21:54:04 -0700 Subject: error viewing logfiles over 2Gb --- mod/admin.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mod') diff --git a/mod/admin.php b/mod/admin.php index 72544ee70..e42fe93f6 100644 --- a/mod/admin.php +++ b/mod/admin.php @@ -632,7 +632,7 @@ function admin_page_logs(&$a){ $f = get_config('system','logfile'); $size = filesize($f); - if($size > 5000000) + if($size > 5000000 || $size < 0) $size = 5000000; $data = ''; -- cgit v1.2.3 From 9ff1a3444e9029c94541a7c84f0ed5ba764adef3 Mon Sep 17 00:00:00 2001 From: Friendika Date: Sun, 4 Sep 2011 00:48:45 -0700 Subject: add timezone convert module, several other minor or in progress fixes --- mod/localtime.php | 44 ++++++++++++++++++++++++++++++++++++++++++++ mod/parse_url.php | 2 ++ 2 files changed, 46 insertions(+) create mode 100644 mod/localtime.php (limited to 'mod') diff --git a/mod/localtime.php b/mod/localtime.php new file mode 100644 index 000000000..f5ecf3a96 --- /dev/null +++ b/mod/localtime.php @@ -0,0 +1,44 @@ +data['mod-localtime'] = datetime_convert('UTC',$_POST['timezone'],$t,$bd_format); + +} + +function localtime_content(&$a) { + $t = $_REQUEST['time']; + if(! $t) + $t = 'now'; + + $o .= '

' . t('Time Conversion') . '

'; + + $o .= '

' . t('Friendika provides this service for sharing events with other networks and friends in unknown timezones.') . '

'; + + + if(x($a->data,'mod-localtime')) + $o .= '

' . sprintf( t('Converted localtime: %s'),$a->data['mod-localtime']) . '

'; + + $o .= '

' . sprintf( t('UTC time: %s'), $t) . '

'; + + $o .= '
'; + + $o .= '

' . t('Please select your timezone:') . '

'; + + $o .= select_timezone(); + + $o .= '
'; + + return $o; + +} \ No newline at end of file diff --git a/mod/parse_url.php b/mod/parse_url.php index 9bb0bc464..b10d11c4b 100644 --- a/mod/parse_url.php +++ b/mod/parse_url.php @@ -119,6 +119,8 @@ function parse_url_content(&$a) { $text = '

' . $text . '

'; } + $title = str_replace("\n",'',$title); + echo sprintf($template,$url,($title) ? $title : $url,$text); killme(); } -- cgit v1.2.3 From 481853d2cc44a4bf6c540e72c741ff453305a925 Mon Sep 17 00:00:00 2001 From: Friendika Date: Sun, 4 Sep 2011 17:35:06 -0700 Subject: saved searches on network page --- mod/network.php | 46 +++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 45 insertions(+), 1 deletion(-) (limited to 'mod') diff --git a/mod/network.php b/mod/network.php index 54fb2a0a4..663814ab7 100644 --- a/mod/network.php +++ b/mod/network.php @@ -16,8 +16,26 @@ function network_init(&$a) { $search = ((x($_GET,'search')) ? escape_tags($_GET['search']) : ''); $srchurl = '/network' . ((x($_GET,'cid')) ? '?cid=' . $_GET['cid'] : '') . ((x($_GET,'star')) ? '?star=' . $_GET['star'] : ''); + if(x($_GET,'save')) { + $r = q("select * from `search` where `uid` = %d and `term` = '%s' limit 1", + intval(local_user()), + dbesc($search) + ); + if(! count($r)) { + q("insert into `search` ( `uid`,`term` ) values ( %d, '%s') ", + intval(local_user()), + dbesc($search) + ); + } + } + if(x($_GET,'remove')) { + q("delete from `search` where `uid` = %d and `term` = '%s' limit 1", + intval(local_user()), + dbesc($search) + ); + } - $a->page['aside'] .= search($search,'netsearch-box',$srchurl); + $a->page['aside'] .= search($search,'netsearch-box',$srchurl,true); $a->page['aside'] .= ''; $a->page['aside'] .= group_side('network','network',true,$group_id); + + $a->page['aside'] .= saved_searches(); + +} + +function saved_searches() { + + $o = ''; + + $r = q("select `term` from `search` WHERE `uid` = %d", + intval(local_user()) + ); + + if(count($r)) { + $o .= '

' . t('Saved Searches') . '

' . "\r\n"; + $o .= '
' . "\r\n"; + } + + return $o; + } + + function network_content(&$a, $update = 0) { require_once('include/conversation.php'); -- cgit v1.2.3 From 82f7f33cf58774ac6b07acd64fe0b49cd5b0aa30 Mon Sep 17 00:00:00 2001 From: Friendika Date: Sun, 4 Sep 2011 19:58:03 -0700 Subject: bookmarks + bug #140 --- mod/item.php | 17 ++++++++++++++--- mod/network.php | 10 +++++++++- mod/parse_url.php | 8 ++++++-- 3 files changed, 29 insertions(+), 6 deletions(-) (limited to 'mod') diff --git a/mod/item.php b/mod/item.php index 6ecca8f4a..b4ec7666f 100644 --- a/mod/item.php +++ b/mod/item.php @@ -332,6 +332,15 @@ function item_post(&$a) { } } + // embedded bookmark in post? convert to regular url and set bookmark flag + + $bookmark = 0; + if(preg_match_all("/\[bookmark\=([^\]]*)\](.*?)\[\/bookmark\]/m",$body,$match)) { + $bookmark = 1; + $body = preg_replace("/\[bookmark\=([^\]]*)\](.*?)\[\/bookmark\]/m",'[url=$1]$2[/url]',$body); + } + + /** * Fold multi-line [code] sequences */ @@ -509,6 +518,7 @@ function item_post(&$a) { $datarray['private'] = $private; $datarray['pubmail'] = $pubmail_enable; $datarray['attach'] = $attachments; + $datarray['bookmark'] = intval($bookmark); $datarray['thr-parent'] = $thr_parent; /** @@ -551,8 +561,8 @@ function item_post(&$a) { $r = q("INSERT INTO `item` (`guid`, `uid`,`type`,`wall`,`gravity`,`contact-id`,`owner-name`,`owner-link`,`owner-avatar`, `author-name`, `author-link`, `author-avatar`, `created`, `edited`, `received`, `changed`, `uri`, `thr-parent`, `title`, `body`, `app`, `location`, `coord`, - `tag`, `inform`, `verb`, `allow_cid`, `allow_gid`, `deny_cid`, `deny_gid`, `private`, `pubmail`, `attach` ) - VALUES( '%s', %d, '%s', %d, %d, %d, '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', %d, %d, '%s' )", + `tag`, `inform`, `verb`, `allow_cid`, `allow_gid`, `deny_cid`, `deny_gid`, `private`, `pubmail`, `attach`, `bookmark` ) + VALUES( '%s', %d, '%s', %d, %d, %d, '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', %d, %d, '%s', %d )", dbesc($datarray['guid']), intval($datarray['uid']), dbesc($datarray['type']), @@ -585,7 +595,8 @@ function item_post(&$a) { dbesc($datarray['deny_gid']), intval($datarray['private']), intval($datarray['pubmail']), - dbesc($datarray['attach']) + dbesc($datarray['attach']), + intval($datarray['bookmark']) ); $r = q("SELECT `id` FROM `item` WHERE `uri` = '%s' LIMIT 1", diff --git a/mod/network.php b/mod/network.php index 663814ab7..1434f5d31 100644 --- a/mod/network.php +++ b/mod/network.php @@ -14,7 +14,10 @@ function network_init(&$a) { $a->page['aside'] = ''; $search = ((x($_GET,'search')) ? escape_tags($_GET['search']) : ''); - $srchurl = '/network' . ((x($_GET,'cid')) ? '?cid=' . $_GET['cid'] : '') . ((x($_GET,'star')) ? '?star=' . $_GET['star'] : ''); + $srchurl = '/network' + . ((x($_GET,'cid')) ? '?cid=' . $_GET['cid'] : '') + . ((x($_GET,'star')) ? '?star=' . $_GET['star'] : '') + . ((x($_GET,'bmark')) ? '?bmark=' . $_GET['bmark'] : ''); if(x($_GET,'save')) { $r = q("select * from `search` where `uid` = %d and `term` = '%s' limit 1", @@ -114,6 +117,7 @@ function network_content(&$a, $update = 0) { $cid = ((x($_GET['cid'])) ? intval($_GET['cid']) : 0); $star = ((x($_GET['star'])) ? intval($_GET['star']) : 0); + $bmark = ((x($_GET['bmark'])) ? intval($_GET['bmark']) : 0); if(($a->argc > 2) && $a->argv[2] === 'new') $nouveau = true; @@ -174,6 +178,7 @@ function network_content(&$a, $update = 0) { . ((x($_GET,'cid')) ? '&cid=' . $_GET['cid'] : '') . ((x($_GET,'search')) ? '&search=' . $_GET['search'] : '') . ((x($_GET,'star')) ? '&star=' . $_GET['star'] : '') + . ((x($_GET,'bmark')) ? '&bmark=' . $_GET['bmark'] : '') . "'; var profile_page = " . $a->pager['page'] . "; \r\n"; } @@ -195,6 +200,9 @@ function network_content(&$a, $update = 0) { $star_sql = (($star) ? " AND `starred` = 1 " : ''); + if($bmark) + $star_sql .= " AND `bookmark` = 1 "; + $sql_extra = " AND `item`.`parent` IN ( SELECT `parent` FROM `item` WHERE `id` = `parent` $star_sql ) "; if($group) { diff --git a/mod/parse_url.php b/mod/parse_url.php index b10d11c4b..79c336ddc 100644 --- a/mod/parse_url.php +++ b/mod/parse_url.php @@ -13,7 +13,7 @@ function parse_url_content(&$a) { $text = null; - $template = "
%s%s
"; + $template = "
%s%s
"; $arr = array('url' => $url, 'text' => ''); @@ -121,6 +121,10 @@ function parse_url_content(&$a) { $title = str_replace("\n",'',$title); - echo sprintf($template,$url,($title) ? $title : $url,$text); + $result = sprintf($template,$url,($title) ? $title : $url,$text); + + logger('parse_url: returns: ' . $result); + + echo $result; killme(); } -- cgit v1.2.3 From 7e8100d2cd27227435ba6ff421dd3c3d8689930f Mon Sep 17 00:00:00 2001 From: Friendika Date: Sun, 4 Sep 2011 22:40:36 -0700 Subject: custom attags --- mod/crepair.php | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'mod') diff --git a/mod/crepair.php b/mod/crepair.php index 4babd6bf7..afa45e881 100644 --- a/mod/crepair.php +++ b/mod/crepair.php @@ -18,15 +18,16 @@ function crepair_post(&$a) { $contact = $r[0]; - $nick = ((x($_POST,'nick')) ? $_POST['nick'] : null); - $url = ((x($_POST,'url')) ? $_POST['url'] : null); - $request = ((x($_POST,'request')) ? $_POST['request'] : null); - $confirm = ((x($_POST,'confirm')) ? $_POST['confirm'] : null); - $notify = ((x($_POST,'notify')) ? $_POST['notify'] : null); - $poll = ((x($_POST,'poll')) ? $_POST['poll'] : null); + $nick = ((x($_POST,'nick')) ? $_POST['nick'] : ''); + $url = ((x($_POST,'url')) ? $_POST['url'] : ''); + $request = ((x($_POST,'request')) ? $_POST['request'] : ''); + $confirm = ((x($_POST,'confirm')) ? $_POST['confirm'] : ''); + $notify = ((x($_POST,'notify')) ? $_POST['notify'] : ''); + $poll = ((x($_POST,'poll')) ? $_POST['poll'] : ''); + $attag = ((x($_POST,'attag')) ? $_POST['attag'] : ''); - $r = q("UPDATE `contact` SET `nick` = '%s', `url` = '%s', `request` = '%s', `confirm` = '%s', `notify` = '%s', `poll` = '%s' + $r = q("UPDATE `contact` SET `nick` = '%s', `url` = '%s', `request` = '%s', `confirm` = '%s', `notify` = '%s', `poll` = '%s', `attag` = '%s' WHERE `id` = %d AND `uid` = %d LIMIT 1", dbesc($nick), dbesc($url), @@ -34,6 +35,7 @@ function crepair_post(&$a) { dbesc($confirm), dbesc($notify), dbesc($poll), + dbesc($attag), intval($contact['id']), local_user() ); @@ -84,6 +86,7 @@ function crepair_content(&$a) { $o .= replace_macros($tpl, array( '$label_name' => t('Name'), '$label_nick' => t('Account Nickname'), + '$label_attag' => t('@Tagname - overrides Name/Nickname'), '$label_url' => t('Account URL'), '$label_request' => t('Friend Request URL'), '$label_confirm' => t('Friend Confirm URL'), @@ -97,6 +100,7 @@ function crepair_content(&$a) { '$confirm' => $contact['confirm'], '$notify' => $contact['notify'], '$poll' => $contact['poll'], + '$contact_attag' => $contact['attag'], '$lbl_submit' => t('Submit') )); -- cgit v1.2.3 From abd65e00aba5a2581665a689e01fe9330046f001 Mon Sep 17 00:00:00 2001 From: Fabio Comuni Date: Mon, 5 Sep 2011 14:01:21 +0200 Subject: Load infos and notices via ping and show them with js popup --- mod/ping.php | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) (limited to 'mod') diff --git a/mod/ping.php b/mod/ping.php index 8a3d284af..38a32744d 100644 --- a/mod/ping.php +++ b/mod/ping.php @@ -159,8 +159,26 @@ function ping_init(&$a) { } - echo " - + echo " "; + + echo " "; + if(x($_SESSION,'sysmsg')){ + foreach ($_SESSION['sysmsg'] as $m){ + echo "".($m).""; + } + $_SESSION['sysmsg']=array(); + unset($_SESSION['sysmsg']); + } + if(x($_SESSION,'sysmsg_info')){ + foreach ($_SESSION['sysmsg_info'] as $m){ + echo "".($m).""; + } + $_SESSION['sysmsg_info']=array(); + unset($_SESSION['sysmsg_info']); + } + + echo " "; + echo" "; killme(); -- cgit v1.2.3