From fafd41f4bfcebdc0560f6b458df2cb089fce63ff Mon Sep 17 00:00:00 2001 From: friendica Date: Fri, 25 May 2012 14:36:17 -0700 Subject: [PATCH 1/5] keep private FB stuff out of personal notes --- boot.php | 2 +- mod/notes.php | 6 ++-- util/messages.po | 81 +++++++++++++++++++++++++++--------------------- 3 files changed, 50 insertions(+), 39 deletions(-) diff --git a/boot.php b/boot.php index 634cf28c92..64420f4341 100644 --- a/boot.php +++ b/boot.php @@ -9,7 +9,7 @@ require_once('include/nav.php'); require_once('include/cache.php'); define ( 'FRIENDICA_PLATFORM', 'Friendica'); -define ( 'FRIENDICA_VERSION', '3.0.1353' ); +define ( 'FRIENDICA_VERSION', '3.0.1354' ); define ( 'DFRN_PROTOCOL_VERSION', '2.23' ); define ( 'DB_UPDATE_VERSION', 1144 ); diff --git a/mod/notes.php b/mod/notes.php index 0072ce447f..64cc17a653 100644 --- a/mod/notes.php +++ b/mod/notes.php @@ -80,7 +80,8 @@ function notes_content(&$a,$update = false) { $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 AND `item`.`deleted` = 0 + WHERE `item`.`uid` = %d AND `item`.`visible` = 1 and `item`.`moderated` = 0 + AND `item`.`deleted` = 0 AND `item`.`origin` = 1 AND `contact`.`blocked` = 0 AND `contact`.`pending` = 0 AND `contact`.`self` = 1 AND `item`.`id` = `item`.`parent` AND `item`.`wall` = 0 $sql_extra ", @@ -95,7 +96,8 @@ 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 and `item`.`moderated` = 0 + WHERE `item`.`uid` = %d AND `item`.`visible` = 1 AND `item`.`deleted` = 0 + and `item`.`moderated` = 0 AND `item`.`origin` = 1 AND `contact`.`blocked` = 0 AND `contact`.`pending` = 0 AND `contact`.`self` = 1 AND `item`.`id` = `item`.`parent` AND `item`.`wall` = 0 $sql_extra diff --git a/util/messages.po b/util/messages.po index 7aefd8f67d..1fd6628b82 100644 --- a/util/messages.po +++ b/util/messages.po @@ -6,9 +6,9 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: 3.0.1353\n" +"Project-Id-Version: 3.0.1354\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2012-05-24 16:51-0700\n" +"POT-Creation-Date: 2012-05-25 10:00-0700\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -904,7 +904,7 @@ msgid "" msgstr "" #: ../../mod/install.php:139 ../../mod/install.php:203 -#: ../../mod/install.php:480 +#: ../../mod/install.php:482 msgid "Please see the file \"INSTALL.txt\"." msgstr "" @@ -976,151 +976,160 @@ msgstr "" msgid "Could not find a command line version of PHP in the web server PATH." msgstr "" -#: ../../mod/install.php:320 +#: ../../mod/install.php:318 +msgid "" +"If you don't have a command line version of PHP installed on server, you " +"will not be able to run background polling via cron. See 'Activating scheduled tasks'" +msgstr "" + +#: ../../mod/install.php:322 msgid "PHP executable path" msgstr "" -#: ../../mod/install.php:320 -msgid "Enter full path to php executable" +#: ../../mod/install.php:322 +msgid "" +"Enter full path to php executable. You can leave this blank to continue the " +"installation." msgstr "" -#: ../../mod/install.php:325 +#: ../../mod/install.php:327 msgid "Command line PHP" msgstr "" -#: ../../mod/install.php:334 +#: ../../mod/install.php:336 msgid "" "The command line version of PHP on your system does not have " "\"register_argc_argv\" enabled." msgstr "" -#: ../../mod/install.php:335 +#: ../../mod/install.php:337 msgid "This is required for message delivery to work." msgstr "" -#: ../../mod/install.php:337 +#: ../../mod/install.php:339 msgid "PHP register_argc_argv" msgstr "" -#: ../../mod/install.php:358 +#: ../../mod/install.php:360 msgid "" "Error: the \"openssl_pkey_new\" function on this system is not able to " "generate encryption keys" msgstr "" -#: ../../mod/install.php:359 +#: ../../mod/install.php:361 msgid "" "If running under Windows, please see \"http://www.php.net/manual/en/openssl." "installation.php\"." msgstr "" -#: ../../mod/install.php:361 +#: ../../mod/install.php:363 msgid "Generate encryption keys" msgstr "" -#: ../../mod/install.php:368 +#: ../../mod/install.php:370 msgid "libCurl PHP module" msgstr "" -#: ../../mod/install.php:369 +#: ../../mod/install.php:371 msgid "GD graphics PHP module" msgstr "" -#: ../../mod/install.php:370 +#: ../../mod/install.php:372 msgid "OpenSSL PHP module" msgstr "" -#: ../../mod/install.php:371 +#: ../../mod/install.php:373 msgid "mysqli PHP module" msgstr "" -#: ../../mod/install.php:372 +#: ../../mod/install.php:374 msgid "mb_string PHP module" msgstr "" -#: ../../mod/install.php:377 ../../mod/install.php:379 +#: ../../mod/install.php:379 ../../mod/install.php:381 msgid "Apache mod_rewrite module" msgstr "" -#: ../../mod/install.php:377 +#: ../../mod/install.php:379 msgid "" "Error: Apache webserver mod-rewrite module is required but not installed." msgstr "" -#: ../../mod/install.php:384 +#: ../../mod/install.php:386 msgid "Error: libCURL PHP module required but not installed." msgstr "" -#: ../../mod/install.php:388 +#: ../../mod/install.php:390 msgid "" "Error: GD graphics PHP module with JPEG support required but not installed." msgstr "" -#: ../../mod/install.php:392 +#: ../../mod/install.php:394 msgid "Error: openssl PHP module required but not installed." msgstr "" -#: ../../mod/install.php:396 +#: ../../mod/install.php:398 msgid "Error: mysqli PHP module required but not installed." msgstr "" -#: ../../mod/install.php:400 +#: ../../mod/install.php:402 msgid "Error: mb_string PHP module required but not installed." msgstr "" -#: ../../mod/install.php:417 +#: ../../mod/install.php:419 msgid "" "The web installer needs to be able to create a file called \".htconfig.php\" " "in the top folder of your web server and it is unable to do so." msgstr "" -#: ../../mod/install.php:418 +#: ../../mod/install.php:420 msgid "" "This is most often a permission setting, as the web server may not be able " "to write files in your folder - even if you can." msgstr "" -#: ../../mod/install.php:419 +#: ../../mod/install.php:421 msgid "" "At the end of this procedure, we will give you a text to save in a file " "named .htconfig.php in your Friendica top folder." msgstr "" -#: ../../mod/install.php:420 +#: ../../mod/install.php:422 msgid "" "You can alternatively skip this procedure and perform a manual installation. " "Please see the file \"INSTALL.txt\" for instructions." msgstr "" -#: ../../mod/install.php:423 +#: ../../mod/install.php:425 msgid ".htconfig.php is writable" msgstr "" -#: ../../mod/install.php:434 +#: ../../mod/install.php:436 msgid "" "Url rewrite in .htconfig is not working. Check your server configuration." msgstr "" -#: ../../mod/install.php:436 +#: ../../mod/install.php:438 msgid "Url rewrite is working" msgstr "" -#: ../../mod/install.php:442 +#: ../../mod/install.php:444 msgid "" "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." msgstr "" -#: ../../mod/install.php:467 +#: ../../mod/install.php:469 msgid "Errors encountered creating database tables." msgstr "" -#: ../../mod/install.php:478 +#: ../../mod/install.php:480 msgid "

What next

" msgstr "" -#: ../../mod/install.php:479 +#: ../../mod/install.php:481 msgid "" "IMPORTANT: You will need to [manually] setup a scheduled task for the poller." msgstr "" From 27c903a8d0d9e8eeca31a21356256593da683da6 Mon Sep 17 00:00:00 2001 From: friendica Date: Fri, 25 May 2012 15:56:18 -0700 Subject: [PATCH 2/5] improve location change notifications --- mod/profiles.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/mod/profiles.php b/mod/profiles.php index 8e4fba74e0..ca3890eb94 100644 --- a/mod/profiles.php +++ b/mod/profiles.php @@ -176,9 +176,18 @@ function profiles_post(&$a) { $changes[] = t('Interests'); $value = $interest; } - if($address != $orig[0]['address'] || $locality != $orig[0]['locality'] || $region != $orig[0]['region'] + if($address != $orig[0]['address']) { + $changes[] = t('Address'); + // New address not sent in notifications, potential privacy issues + // in case this leaks to unintended recipients. Yes, it's in the public + // profile but that doesn't mean we have to broadcast it to everybody. + } + if($locality != $orig[0]['locality'] || $region != $orig[0]['region'] || $country_name != $orig[0]['country-name']) { $changes[] = t('Location'); + $comma1 = ((($locality) && ($region || $country_name)) ? ', ' : ' '); + $comma2 = (($region && $country_name) ? ', ' : ''); + $value = $locality . $comma1 . $region . $comma2 . $country_name; } profile_activity($changes,$value); From 0ef8ccf11bbc6f353610b0a67c203a7f8438387b Mon Sep 17 00:00:00 2001 From: friendica Date: Fri, 25 May 2012 17:42:35 -0700 Subject: [PATCH 3/5] fix wall_uploaded photo permissions on group post by member --- mod/item.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mod/item.php b/mod/item.php index 81dd553cdb..df242d6f7c 100644 --- a/mod/item.php +++ b/mod/item.php @@ -355,13 +355,15 @@ function item_post(&$a) { $image_uri = substr($image_uri,0, strpos($image_uri,'-')); if(! strlen($image_uri)) continue; - $srch = '<' . intval($contact_record['id']) . '>'; + $srch = '<' . intval($contact_id) . '>'; + $r = q("SELECT `id` FROM `photo` WHERE `allow_cid` = '%s' AND `allow_gid` = '' AND `deny_cid` = '' AND `deny_gid` = '' AND `resource-id` = '%s' AND `uid` = %d LIMIT 1", dbesc($srch), dbesc($image_uri), intval($profile_uid) ); + if(! count($r)) continue; From bb4712b171f1c5ee02a49afc9ebff9bb8af3b052 Mon Sep 17 00:00:00 2001 From: friendica Date: Fri, 25 May 2012 18:06:51 -0700 Subject: [PATCH 4/5] bug #434 - default group placement not working after accepting dfrn friend request --- mod/dfrn_confirm.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mod/dfrn_confirm.php b/mod/dfrn_confirm.php index 093993bbc4..564ae5ca23 100644 --- a/mod/dfrn_confirm.php +++ b/mod/dfrn_confirm.php @@ -500,7 +500,7 @@ function dfrn_confirm_post(&$a,$handsfree = null) { ); if($contact && $g && intval($g[0]['def_gid'])) { require_once('include/group.php'); - group_add_member($uid,'',$contact[0]['id'],$g[0]['def_gid']); + group_add_member($uid,'',$contact['id'],$g[0]['def_gid']); } // Let's send our user to the contact editor in case they want to From f5290a5a107ef2d6c309c4a3205319c9b0d13994 Mon Sep 17 00:00:00 2001 From: friendica Date: Fri, 25 May 2012 18:29:06 -0700 Subject: [PATCH 5/5] missing entries on personal tab after sql text search optimise --- mod/network.php | 9 ++++----- mod/wallmessage.php | 4 ++-- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/mod/network.php b/mod/network.php index f43eeb67e6..fbfe2de4fd 100644 --- a/mod/network.php +++ b/mod/network.php @@ -414,16 +414,15 @@ function network_content(&$a, $update = 0) { if($conv) { $myurl = $a->get_baseurl() . '/profile/'. $a->user['nickname']; $myurl = substr($myurl,strpos($myurl,'://')+3); - $myurl = str_replace(array('www.','.'),array('','\\.'),$myurl); + $myurl = str_replace('www.','',$myurl); $diasp_url = str_replace('/profile/','/u/',$myurl); $sql_extra .= sprintf(" AND `item`.`parent` IN (SELECT distinct(`parent`) from item where ( `author-link` like '%s' or `tag` like '%s' or tag like '%s' )) ", - dbesc(protect_sprintf('%s' . $myurl)), - dbesc(protect_sprintf('%' . $myurl . '\\]%')), - dbesc(protect_sprintf('%' . $diasp_url . '\\]%')) + dbesc(protect_sprintf('%' . $myurl)), + dbesc(protect_sprintf('%' . $myurl . ']%')), + dbesc(protect_sprintf('%' . $diasp_url . ']%')) ); } - if($update) { // only setup pagination on initial page view diff --git a/mod/wallmessage.php b/mod/wallmessage.php index 1a4882b643..cf349775c6 100644 --- a/mod/wallmessage.php +++ b/mod/wallmessage.php @@ -44,7 +44,7 @@ function wallmessage_post(&$a) { } // Work around doubled linefeeds in Tinymce 3.5b2 -dbg(1); + $body = str_replace("\r\n","\n",$body); $body = str_replace("\n\n","\n",$body); @@ -67,7 +67,7 @@ dbg(1); default: info( t('Message sent.') . EOL ); } -dbg(0); + // goaway($a->get_baseurl() . '/profile/' . $user['nickname']); }