From 60c57704c6fef12784e37ac9e9060c51420f6db3 Mon Sep 17 00:00:00 2001 From: friendica Date: Wed, 4 Apr 2012 02:02:23 -0700 Subject: better handling of reshares containing embeds --- mod/share.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'mod') diff --git a/mod/share.php b/mod/share.php index 47bb851a4..6c6098c83 100755 --- a/mod/share.php +++ b/mod/share.php @@ -16,18 +16,18 @@ function share_init(&$a) { $o = ''; - if(local_user() && intval(get_pconfig(local_user(),'system','plaintext'))) { +// if(local_user() && intval(get_pconfig(local_user(),'system','plaintext'))) { $o .= "\xE2\x99\xb2" . ' [url=' . $r[0]['author-link'] . ']' . $r[0]['author-name'] . '[/url]' . "\n"; if($r[0]['title']) $o .= '[b]' . $r[0]['title'] . '[/b]' . "\n"; $o .= $r[0]['body'] . "\n"; - } - else { - $o .= '♲ ' . $r[0]['author-name'] . '
'; - if($r[0]['title']) - $o .= '' . $r[0]['title'] . '
'; - $o .= bbcode($r[0]['body'], true) . '
'; - } +// } +// else { +// $o .= '♲ ' . $r[0]['author-name'] . '
'; +// if($r[0]['title']) +// $o .= '' . $r[0]['title'] . '
'; +// $o .= $r[0]['body'] . "\n"; +// } echo $o; killme(); } -- cgit v1.2.3 From f63636ed14ccd0e88f6e01153029ff6b79c91027 Mon Sep 17 00:00:00 2001 From: friendica Date: Wed, 4 Apr 2012 17:19:46 -0700 Subject: well that was a stupid mistake... --- mod/dfrn_poll.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mod') diff --git a/mod/dfrn_poll.php b/mod/dfrn_poll.php index 6030587ce..5c2788983 100755 --- a/mod/dfrn_poll.php +++ b/mod/dfrn_poll.php @@ -33,7 +33,7 @@ function dfrn_poll_init(&$a) { $user = ''; if($a->argc > 1) { - $r = q("SELECT `hidewall` FROM `user` WHERE `user`.`nickname` = '%s' LIMIT 1", + $r = q("SELECT `hidewall`,`nickname` FROM `user` WHERE `user`.`nickname` = '%s' LIMIT 1", dbesc($a->argv[1]) ); if((! count($r)) || (count($r) && $r[0]['hidewall'])) -- cgit v1.2.3 From da0eb2d4c9bfad5eb329e9da7d0443f3f6327095 Mon Sep 17 00:00:00 2001 From: Michael Johnston Date: Wed, 4 Apr 2012 23:08:16 -0400 Subject: correct some filer dialog weirdness caused by introduction of categories --- mod/filer.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'mod') diff --git a/mod/filer.php b/mod/filer.php index 3cd1bfe22..c0cca9e6d 100755 --- a/mod/filer.php +++ b/mod/filer.php @@ -22,7 +22,8 @@ function filer_content(&$a) { } else { // return filer dialog $filetags = get_pconfig(local_user(),'system','filetags'); - $filetags = explode("][", trim($filetags,"[]")); + $filetags = file_tag_file_to_list($filetags,'file'); + $filetags = explode(",", $filetags); $tpl = get_markup_template("filer_dialog.tpl"); $o = replace_macros($tpl, array( '$field' => array('term', t("Save to Folder:"), '', '', $filetags, t('- select -')), -- cgit v1.2.3 From b45327b856a3ce116931c6b554e23fc1bef20b7c Mon Sep 17 00:00:00 2001 From: friendica Date: Wed, 4 Apr 2012 20:45:48 -0700 Subject: let's catch d* disabled at a higher level and not waste any resources on it. --- mod/receive.php | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'mod') diff --git a/mod/receive.php b/mod/receive.php index 950bf0bd3..2bd3cc65b 100755 --- a/mod/receive.php +++ b/mod/receive.php @@ -12,6 +12,13 @@ require_once('include/diaspora.php'); function receive_post(&$a) { + + $enabled = intval(get_config('system','diaspora_enabled')); + if(! $enabled) { + logger('mod-diaspora: disabled'); + http_status_exit(500); + } + $public = false; if(($a->argc == 2) && ($a->argv[1] === 'public')) { -- cgit v1.2.3 From 9b6e91086b29554fd04362f6c87ea148718e8b1c Mon Sep 17 00:00:00 2001 From: friendica Date: Thu, 5 Apr 2012 02:15:03 -0700 Subject: make 'PHP "register_argc_argv"' easier to translate, may require fix for po2php --- mod/install.php | 2 +- mod/poco.php | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'mod') diff --git a/mod/install.php b/mod/install.php index 003d81c6a..d1142248a 100755 --- a/mod/install.php +++ b/mod/install.php @@ -340,7 +340,7 @@ function check_php(&$phpath, &$checks) { $help .= t('The command line version of PHP on your system does not have "register_argc_argv" enabled.'). EOL; $help .= t('This is required for message delivery to work.'); } - check_add($checks, t('PHP "register_argc_argv"'), $passed, true, $help); + check_add($checks, t('PHP register_argc_argv'), $passed, true, $help); } diff --git a/mod/poco.php b/mod/poco.php index 79cf820bc..acfa3ffaa 100755 --- a/mod/poco.php +++ b/mod/poco.php @@ -45,6 +45,8 @@ function poco_init(&$a) { if($justme) $sql_extra = " and `contact`.`self` = 1 "; + else + $sql_extra = " and `contact`.`self` = 0 "; if($cid) $sql_extra = sprintf(" and `contact`.`id` = %d ",intval($cid)); -- cgit v1.2.3 From 6bc7e6e09f2f21c5e75be3ef4dc70a6e84a7df09 Mon Sep 17 00:00:00 2001 From: friendica Date: Thu, 5 Apr 2012 21:42:47 -0700 Subject: add network_tabs hook --- mod/network.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'mod') diff --git a/mod/network.php b/mod/network.php index d27945a86..b12bd16da 100755 --- a/mod/network.php +++ b/mod/network.php @@ -206,8 +206,12 @@ function network_content(&$a, $update = 0) { ); - $tpl = get_markup_template('common_tabs.tpl'); - $o .= replace_macros($tpl, array('$tabs'=>$tabs)); + + $arr = array('tabs' => $tabs); + call_hooks('network_tabs', $arr); + + $o .= replace_macros(get_markup_template('common_tabs.tpl'), array('$tabs'=> $arr['tabs'])); + // --- end item filter tabs -- cgit v1.2.3 From 3a1c78bd75213e5ed3ad5f5ed4a1349fcf7ce4d5 Mon Sep 17 00:00:00 2001 From: friendica Date: Sat, 7 Apr 2012 01:04:45 -0700 Subject: some work on tests --- mod/item.php | 1 + 1 file changed, 1 insertion(+) (limited to 'mod') diff --git a/mod/item.php b/mod/item.php index 72e63865b..6b0a7996c 100644 --- a/mod/item.php +++ b/mod/item.php @@ -959,6 +959,7 @@ function handle_tag($a, &$body, &$inform, &$str_tags, $profile_uid, $tag) { else $newname = $r[0]['name']; //add person's id to $inform + $inform_id = 'cid:' . $r[0]['id']; if(strlen($inform)) $inform .= ','; $inform .= 'cid:' . $r[0]['id']; -- cgit v1.2.3 From cf2d8ef7a6ebbaefd0210396eeaa6686480a02ac Mon Sep 17 00:00:00 2001 From: friendica Date: Sat, 7 Apr 2012 02:11:56 -0700 Subject: tag tests cont. --- mod/item.php | 1 - 1 file changed, 1 deletion(-) (limited to 'mod') diff --git a/mod/item.php b/mod/item.php index 6b0a7996c..72e63865b 100644 --- a/mod/item.php +++ b/mod/item.php @@ -959,7 +959,6 @@ function handle_tag($a, &$body, &$inform, &$str_tags, $profile_uid, $tag) { else $newname = $r[0]['name']; //add person's id to $inform - $inform_id = 'cid:' . $r[0]['id']; if(strlen($inform)) $inform .= ','; $inform .= 'cid:' . $r[0]['id']; -- cgit v1.2.3