From bb22464165daed42826d7e11c47006a9cf4094d5 Mon Sep 17 00:00:00 2001 From: friendica Date: Wed, 8 Feb 2012 03:40:49 -0800 Subject: browser being sent to update_community --- mod/community.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'mod') diff --git a/mod/community.php b/mod/community.php index d578b469f..a98999942 100755 --- a/mod/community.php +++ b/mod/community.php @@ -80,12 +80,10 @@ function community_content(&$a, $update = 0) { // we behave the same in message lists as the search module - $o .= conversation($a,$r,'community',false); + $o .= conversation($a,$r,'community',$update); $o .= paginate($a); -// $o .= '
' . t('Shared content is covered by the Creative Commons Attribution 3.0 license.') . '
'; - return $o; } -- cgit v1.2.3 From b0ee8dd409f28f19ac0f9d0c4e2aa28afeab561d Mon Sep 17 00:00:00 2001 From: friendica Date: Wed, 8 Feb 2012 17:56:23 -0800 Subject: begin cmin, cmax --- mod/network.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'mod') diff --git a/mod/network.php b/mod/network.php index 497e8a115..8f10ace77 100755 --- a/mod/network.php +++ b/mod/network.php @@ -56,7 +56,9 @@ function saved_searches($search) { . ((x($_GET,'star')) ? '?star=' . $_GET['star'] : '') . ((x($_GET,'bmark')) ? '?bmark=' . $_GET['bmark'] : '') . ((x($_GET,'conv')) ? '?conv=' . $_GET['conv'] : '') - . ((x($_GET,'nets')) ? '?nets=' . $_GET['nets'] : ''); + . ((x($_GET,'nets')) ? '?nets=' . $_GET['nets'] : '') + . ((x($_GET,'cmin')) ? '?cmin=' . $_GET['cmin'] : '') + . ((x($_GET,'cmax')) ? '?cmax=' . $_GET['cmax'] : ''); $o = ''; @@ -222,6 +224,8 @@ function network_content(&$a, $update = 0) { $conv = ((x($_GET,'conv')) ? intval($_GET['conv']) : 0); $spam = ((x($_GET,'spam')) ? intval($_GET['spam']) : 0); $nets = ((x($_GET,'nets')) ? $_GET['nets'] : ''); + $cmin = ((x($_GET,'cmin')) ? intval($_GET['cmin']) : 0); + $cmax = ((x($_GET,'cmax')) ? intval($_GET['cmax']) : 99); if(($a->argc > 2) && $a->argv[2] === 'new') $nouveau = true; @@ -358,6 +362,8 @@ function network_content(&$a, $update = 0) { . ((x($_GET,'conv')) ? '&conv=' . $_GET['conv'] : '') . ((x($_GET,'spam')) ? '&spam=' . $_GET['spam'] : '') . ((x($_GET,'nets')) ? '&nets=' . $_GET['nets'] : '') + . ((x($_GET,'cmin')) ? '&cmin=' . $_GET['cmin'] : '') + . ((x($_GET,'cmax')) ? '&cmax=' . $_GET['cmax'] : '') . "'; var profile_page = " . $a->pager['page'] . "; \r\n"; } -- cgit v1.2.3 From 11517a027b3778c56aabb4df20af46dcb24a93d0 Mon Sep 17 00:00:00 2001 From: friendica Date: Wed, 8 Feb 2012 21:15:26 -0800 Subject: if removing a contact after viewing the third page of contacts, go back to page 3 --- mod/contacts.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'mod') diff --git a/mod/contacts.php b/mod/contacts.php index 51c6920d3..206128f9d 100755 --- a/mod/contacts.php +++ b/mod/contacts.php @@ -111,7 +111,6 @@ function contacts_content(&$a) { $o = ''; nav_set_selected('contacts'); - $_SESSION['return_url'] = $a->get_baseurl() . '/' . $a->cmd; if(! local_user()) { notice( t('Permission denied.') . EOL); @@ -211,7 +210,10 @@ function contacts_content(&$a) { contact_remove($orig_record[0]['id']); info( t('Contact has been removed.') . EOL ); - goaway($a->get_baseurl() . '/contacts'); + if(x($_SESSION,'return_url')) + goaway($a->get_baseurl() . '/' . $_SESSION['return_url']); + else + goaway($a->get_baseurl() . '/contacts'); return; // NOTREACHED } } @@ -354,6 +356,7 @@ function contacts_content(&$a) { } + $_SESSION['return_url'] = $a->query_string; if(($a->argc == 2) && ($a->argv[1] === 'all')) $sql_extra = ''; -- cgit v1.2.3 From 795e02aa1490f6238e6ed719a0bf3604931eec3d Mon Sep 17 00:00:00 2001 From: friendica Date: Thu, 9 Feb 2012 15:13:34 -0800 Subject: bug #273 - no $baseurl variable expansion in install template --- mod/install.php | 1 + 1 file changed, 1 insertion(+) (limited to 'mod') diff --git a/mod/install.php b/mod/install.php index f7820fc80..33502938a 100755 --- a/mod/install.php +++ b/mod/install.php @@ -210,6 +210,7 @@ function install_content(&$a) { '$next' => t('Next'), '$reload' => t('Check again'), '$phpath' => $phpath, + '$baseurl' => $a->get_baseurl(), )); return $o; }; break; -- cgit v1.2.3 From 7b0a005441a6abc3d4c327965e86ac82d2ec4db3 Mon Sep 17 00:00:00 2001 From: friendica Date: Thu, 9 Feb 2012 15:58:26 -0800 Subject: edit post not working after plaintext editor fixes, missing some recent editor template changes --- mod/editpost.php | 4 ++++ mod/item.php | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'mod') diff --git a/mod/editpost.php b/mod/editpost.php index bceb9250a..f23b305f0 100755 --- a/mod/editpost.php +++ b/mod/editpost.php @@ -35,6 +35,7 @@ function editpost_content(&$a) { $a->page['htmlhead'] .= replace_macros($tpl, array( '$baseurl' => $a->get_baseurl(), + '$editselect' => (($plaintext) ? 'none' : '/(profile-jot-text|prvmail-text)/'), '$ispublic' => ' ', // t('Visible to everybody'), '$geotag' => $geotag, '$nickname' => $a->user['nickname'] @@ -108,11 +109,14 @@ function editpost_content(&$a) { '$emailcc' => t('CC: email addresses'), '$public' => t('Public post'), '$jotnets' => $jotnets, + '$title' => $itm[0]['title'], + '$placeholdertitle' => t('Set title'), '$emtitle' => t('Example: bob@example.com, mary@example.com'), '$lockstate' => $lockstate, '$acl' => '', // populate_acl((($group) ? $group_acl : $a->user), $celeb), '$bang' => (($group) ? '!' : ''), '$profile_uid' => $_SESSION['uid'], + '$preview' => t('Preview'), '$jotplugins' => $jotplugins, )); diff --git a/mod/item.php b/mod/item.php index 217f13c49..d5dcfccbd 100755 --- a/mod/item.php +++ b/mod/item.php @@ -649,7 +649,8 @@ function item_post(&$a) { if($orig_post) { - $r = q("UPDATE `item` SET `body` = '%s', `edited` = '%s' WHERE `id` = %d AND `uid` = %d LIMIT 1", + $r = q("UPDATE `item` SET `title` = '%s', `body` = '%s', `edited` = '%s' WHERE `id` = %d AND `uid` = %d LIMIT 1", + dbesc($title), dbesc($body), dbesc(datetime_convert()), intval($post_id), -- cgit v1.2.3 From ffe7d8b1e9964e28b50ccce49d74836067c099c1 Mon Sep 17 00:00:00 2001 From: friendica Date: Thu, 9 Feb 2012 21:18:50 -0800 Subject: item tag notifications --- mod/settings.php | 1 + 1 file changed, 1 insertion(+) (limited to 'mod') diff --git a/mod/settings.php b/mod/settings.php index e75272539..b4cd2e608 100755 --- a/mod/settings.php +++ b/mod/settings.php @@ -818,6 +818,7 @@ function settings_content(&$a) { '$notify4' => array('notify4', t('Someone writes a followup comment'), ($notify & NOTIFY_COMMENT), NOTIFY_COMMENT, ''), '$notify5' => array('notify5', t('You receive a private message'), ($notify & NOTIFY_MAIL), NOTIFY_MAIL, ''), '$notify6' => array('notify6', t('You receive a friend suggestion'), ($notify & NOTIFY_SUGGEST), NOTIFY_SUGGEST, ''), + '$notify7' => array('notify7', t('You are tagged in a post'), ($notify & NOTIFY_TAGSELF), NOTIFY_TAGSELF, ''), '$h_advn' => t('Advanced Page Settings'), -- cgit v1.2.3 From 2984b8d5d2c0ed1c034235fe281f0279872603e4 Mon Sep 17 00:00:00 2001 From: "Abinoam P. Marques Jr" Date: Fri, 10 Feb 2012 14:03:43 -0800 Subject: bug #270 - solved --- mod/install.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'mod') diff --git a/mod/install.php b/mod/install.php index 33502938a..003d81c6a 100755 --- a/mod/install.php +++ b/mod/install.php @@ -186,8 +186,8 @@ function install_content(&$a) { check_keys($checks); - if(x($_POST,'phppath')) - $phpath = notags(trim($_POST['phppath'])); + if(x($_POST,'phpath')) + $phpath = notags(trim($_POST['phpath'])); check_php($phpath, $checks); @@ -221,7 +221,7 @@ function install_content(&$a) { $dbuser = notags(trim($_POST['dbuser'])); $dbpass = notags(trim($_POST['dbpass'])); $dbdata = notags(trim($_POST['dbdata'])); - $phpath = notags(trim($_POST['phppath'])); + $phpath = notags(trim($_POST['phpath'])); $tpl = get_markup_template('install_db.tpl'); @@ -259,7 +259,7 @@ function install_content(&$a) { $dbuser = notags(trim($_POST['dbuser'])); $dbpass = notags(trim($_POST['dbpass'])); $dbdata = notags(trim($_POST['dbdata'])); - $phpath = notags(trim($_POST['phppath'])); + $phpath = notags(trim($_POST['phpath'])); $adminmail = notags(trim($_POST['adminmail'])); $timezone = ((x($_POST,'timezone')) ? ($_POST['timezone']) : 'America/Los_Angeles'); @@ -323,7 +323,7 @@ function check_php(&$phpath, &$checks) { $help .= t('Could not find a command line version of PHP in the web server PATH.'). EOL; $tpl = get_markup_template('field_input.tpl'); $help .= replace_macros($tpl, array( - '$field' => array('phppath', t('PHP executable path'), $phpath, t('Enter full path to php executable')), + '$field' => array('phpath', t('PHP executable path'), $phpath, t('Enter full path to php executable')), )); $phpath=""; } -- cgit v1.2.3 From da946bb9b0905a2126e7234c6c85157bd7978102 Mon Sep 17 00:00:00 2001 From: friendica Date: Sat, 11 Feb 2012 03:07:15 -0800 Subject: bug #278 show only blocked contacts --- mod/contacts.php | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) (limited to 'mod') diff --git a/mod/contacts.php b/mod/contacts.php index 206128f9d..aaa2ff961 100755 --- a/mod/contacts.php +++ b/mod/contacts.php @@ -356,20 +356,29 @@ function contacts_content(&$a) { } + $blocked = false; + $_SESSION['return_url'] = $a->query_string; if(($a->argc == 2) && ($a->argv[1] === 'all')) $sql_extra = ''; - else - $sql_extra = " AND `blocked` = 0 "; - + else { + if(($a->argc == 2) && ($a->argv[1] === 'blocked')) { + $sql_extra = " AND `blocked` = 1 "; + $blocked = true; + } + else + $sql_extra = " AND `blocked` = 0 "; + } $search = ((x($_GET,'search')) ? notags(trim($_GET['search'])) : ''); $tpl = get_markup_template("contacts-top.tpl"); $o .= replace_macros($tpl,array( '$header' => t('Contacts'), - '$hide_url' => ((strlen($sql_extra)) ? 'contacts/all' : 'contacts' ), - '$hide_text' => ((strlen($sql_extra)) ? t('Show Blocked Connections') : t('Hide Blocked Connections')), + '$hide_url' => (($blocked) ? 'contacts' : 'contacts/blocked'), + '$hide_text' => (($blocked) ? t('Show Unblocked Contacts') : t('Show Blocked Contacts')), + '$all_url' => 'contacts/all', + '$all_text' => t('Show All Contacts'), '$search' => $search, '$desc' => t('Search your contacts'), '$finding' => (strlen($search) ? '

' . t('Finding: ') . "'" . $search . "'" . '

' : ""), -- cgit v1.2.3 From 0c4606682ff0463c7d07e5215bb3d0881f94701c Mon Sep 17 00:00:00 2001 From: friendica Date: Sat, 11 Feb 2012 19:21:41 -0800 Subject: fix link/bookmark reshares --- mod/oembed.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'mod') diff --git a/mod/oembed.php b/mod/oembed.php index 25995813a..236625f68 100755 --- a/mod/oembed.php +++ b/mod/oembed.php @@ -2,11 +2,26 @@ require_once("include/oembed.php"); function oembed_content(&$a){ + // logger('mod_oembed ' . $a->query_string, LOGGER_ALL); + + if ($a->argv[1]=='b2h'){ + $url = array( "", trim(hex2bin($_REQUEST['url']))); + echo oembed_replacecb($url); + killme(); + } + + if ($a->argv[1]=='h2b'){ + $text = trim(hex2bin($_REQUEST['text'])); + echo oembed_html2bbcode($text); + killme(); + } + if ($a->argc == 2){ echo ""; $url = base64url_decode($a->argv[1]); $j = oembed_fetch_url($url); echo $j->html; +// logger('mod-oembed ' . $j->html, LOGGER_ALL); echo ""; } killme(); -- cgit v1.2.3 From d856ae1fa527772ebc9194f25a1e55df614b8f3e Mon Sep 17 00:00:00 2001 From: friendica Date: Sat, 11 Feb 2012 21:39:51 -0800 Subject: bug #279, add network selector widget to contacts page --- mod/contacts.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'mod') diff --git a/mod/contacts.php b/mod/contacts.php index aaa2ff961..32af29c15 100755 --- a/mod/contacts.php +++ b/mod/contacts.php @@ -42,6 +42,7 @@ function contacts_init(&$a) { $a->page['aside'] .= findpeople_widget(); + $a->page['aside'] .= networks_widget('contacts',$_GET['nets']); } function contacts_post(&$a) { @@ -371,10 +372,11 @@ function contacts_content(&$a) { $sql_extra = " AND `blocked` = 0 "; } $search = ((x($_GET,'search')) ? notags(trim($_GET['search'])) : ''); + $nets = ((x($_GET,'nets')) ? notags(trim($_GET['nets'])) : ''); $tpl = get_markup_template("contacts-top.tpl"); $o .= replace_macros($tpl,array( - '$header' => t('Contacts'), + '$header' => t('Contacts') . (($nets) ? ' - ' . network_to_name($nets) : ''), '$hide_url' => (($blocked) ? 'contacts' : 'contacts/blocked'), '$hide_text' => (($blocked) ? t('Show Unblocked Contacts') : t('Show Blocked Contacts')), '$all_url' => 'contacts/all', @@ -392,6 +394,9 @@ function contacts_content(&$a) { $search = dbesc($search.'*'); $sql_extra .= ((strlen($search)) ? " AND MATCH `name` AGAINST ('$search' IN BOOLEAN MODE) " : ""); + if($nets) + $sql_extra .= sprintf(" AND network = '%s' ", dbesc($nets)); + $sql_extra2 = ((($sort_type > 0) && ($sort_type <= CONTACT_IS_FRIEND)) ? sprintf(" AND `rel` = %d ",intval($sort_type)) : ''); -- cgit v1.2.3 From 4cfb1fe0cfb0520f4d6be88c1bf09cd9a03bc88a Mon Sep 17 00:00:00 2001 From: friendica Date: Sat, 11 Feb 2012 23:17:55 -0800 Subject: refresh contact record after setting change --- mod/contacts.php | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'mod') diff --git a/mod/contacts.php b/mod/contacts.php index 32af29c15..ef77366da 100755 --- a/mod/contacts.php +++ b/mod/contacts.php @@ -100,6 +100,14 @@ function contacts_post(&$a) { info( t('Contact updated.') . EOL); else notice( t('Failed to update contact record.') . EOL); + + $r = q("select * from contact where id = %d and uid = %d limit 1", + intval($contact_id), + intval(local_user()) + ); + if($r && count($r)) + $a->data['contact'] = $r[0]; + return; } -- cgit v1.2.3