From d72f248b3c0279cf8b8b525012fbf1572815e99e Mon Sep 17 00:00:00 2001 From: Fabio Comuni Date: Fri, 4 Feb 2011 10:18:28 +0100 Subject: [PATCH 1/7] Allow to set a photo from albums as profile photo --- mod/photos.php | 3 +- mod/profile_photo.php | 126 ++++++++++++++++++++++++++++++------------ 2 files changed, 92 insertions(+), 37 deletions(-) diff --git a/mod/photos.php b/mod/photos.php index 52cc66eae1..1a1ebaac19 100644 --- a/mod/photos.php +++ b/mod/photos.php @@ -915,6 +915,7 @@ function photos_content(&$a) { if($can_post && ($ph[0]['uid'] == $owner_uid)) { $o .= ' - \ No newline at end of file + + + \ No newline at end of file diff --git a/view/fr/profile_photo.tpl b/view/fr/profile_photo.tpl index d518e73312..30e51210a8 100644 --- a/view/fr/profile_photo.tpl +++ b/view/fr/profile_photo.tpl @@ -11,4 +11,8 @@ - \ No newline at end of file + + + \ No newline at end of file diff --git a/view/it/profile_photo.tpl b/view/it/profile_photo.tpl index d941743d4e..375197a925 100644 --- a/view/it/profile_photo.tpl +++ b/view/it/profile_photo.tpl @@ -12,3 +12,7 @@ + + \ No newline at end of file diff --git a/view/theme/default/style.css b/view/theme/default/style.css index 61782f6e37..5dd0b87121 100644 --- a/view/theme/default/style.css +++ b/view/theme/default/style.css @@ -734,6 +734,10 @@ input#dfrn-url { margin-bottom: 20px; } +#profile-photo-link-select-wrapper { + margin-top: 2em; +} + #profile-edit-profile-name-label, #profile-edit-name-label, #profile-edit-pdesc-label, diff --git a/view/theme/duepuntozero/style.css b/view/theme/duepuntozero/style.css index a1098f6a46..c7eb56fb13 100644 --- a/view/theme/duepuntozero/style.css +++ b/view/theme/duepuntozero/style.css @@ -602,6 +602,10 @@ input#dfrn-url { margin-bottom: 20px; } +#profile-photo-link-select-wrapper { + margin-top: 2em; +} + #profile-edit-profile-name-label, #profile-edit-name-label, #profile-edit-pdesc-label, @@ -1853,8 +1857,6 @@ a.mail-list-link { margin-bottom: 25px; } - - /* end from defautlt */ From acd5f49d437e5d399dbf907031f2b50d9257e18e Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Fri, 4 Feb 2011 21:56:43 +0100 Subject: [PATCH 3/7] wording --- view/de/strings.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/view/de/strings.php b/view/de/strings.php index f59dcf63b9..bc31fab78a 100644 --- a/view/de/strings.php +++ b/view/de/strings.php @@ -227,8 +227,8 @@ $a->strings['Please contact the sender by replying to this post if you do not wi $a->strings['posted an update.'] = 'posted an update.'; $a->strings['photo'] = 'Foto'; $a->strings['status'] = 'Status'; -$a->strings['likes'] = 'mag es'; -$a->strings['doesn\'t like'] = 'mag es nicht'; +$a->strings['likes'] = 'mag das'; +$a->strings['doesn\'t like'] = 'mag das nicht'; $a->strings['\'s'] = '\'s'; $a->strings['Remote privacy information not available.'] = 'Entfernte Privatsphäreneinstellungen nicht verfügbar.'; $a->strings['Visible to:'] = 'Sichtbar für:'; From 4e913d59eabbddfc5428c4b0f91d1cd612f0dd5e Mon Sep 17 00:00:00 2001 From: olivierm Date: Sat, 5 Feb 2011 15:19:28 +0100 Subject: [PATCH 4/7] Fixed some typo (prevented Friendika to load with french locale) --- view/fr/strings.php | 1 + 1 file changed, 1 insertion(+) diff --git a/view/fr/strings.php b/view/fr/strings.php index c64bba1b7a..8bac6347f9 100644 --- a/view/fr/strings.php +++ b/view/fr/strings.php @@ -293,6 +293,7 @@ $a->strings['Edit Album'] = 'Éditer l\'album'; $a->strings['View Photo'] = 'Voir la photo'; $a->strings['Photo not available'] = 'Photo indisponible'; $a->strings['Edit photo'] = 'Éditer la photo'; +$a->strings['New album name'] = 'Nom du nouvel album'; $a->strings['View Full Size'] = 'Voir en taille réelle'; $a->strings['Tags: '] = 'Étiquettes: '; $a->strings['[Remove any tag]'] = '[Retirer toutes les étiquettes]'; From 09af200bcc15e37a7c788a840abaee5c1860e24a Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Sun, 6 Feb 2011 08:51:10 +0100 Subject: [PATCH 5/7] german choose existing pic for the avatar --- view/de/profile_photo.tpl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/view/de/profile_photo.tpl b/view/de/profile_photo.tpl index fe74b47465..10d7d7b973 100644 --- a/view/de/profile_photo.tpl +++ b/view/de/profile_photo.tpl @@ -14,5 +14,5 @@ \ No newline at end of file +oder wähle ein Bild aus einem Album + From 4e63b0acb94b5db67dd1b054d9484bff70107bb2 Mon Sep 17 00:00:00 2001 From: Friendika Date: Sun, 6 Feb 2011 01:08:12 -0800 Subject: [PATCH 6/7] ensure that jot_plugins inherit '$visitor' correctly --- mod/network.php | 9 +++++---- mod/profile.php | 11 ++++++----- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/mod/network.php b/mod/network.php index 2ec06fe614..b0196f92a4 100644 --- a/mod/network.php +++ b/mod/network.php @@ -79,8 +79,10 @@ function network_content(&$a, $update = 0) { $celeb = ((($a->user['page-flags'] == PAGE_SOAPBOX) || ($a->user['page-flags'] == PAGE_COMMUNITY)) ? true : false); - $jotplugins = ""; - call_hooks('jot_tool', $jotplugins); + $jotplugins = ""; + call_hooks('jot_tool', $jotplugins); + + $tpl = replace_macros($tpl,array('$jotplugins' => $jotplugins)); $o .= replace_macros($tpl,array( '$return_path' => $a->cmd, @@ -92,8 +94,7 @@ function network_content(&$a, $update = 0) { '$lockstate' => $lockstate, '$acl' => populate_acl((($group) ? $group_acl : $a->user), $celeb), '$bang' => (($group) ? '!' : ''), - '$profile_uid' => $_SESSION['uid'], - '$jotplugins' => $jotplugins + '$profile_uid' => $_SESSION['uid'] )); diff --git a/mod/profile.php b/mod/profile.php index 91c1ba6d85..3b4616a34f 100644 --- a/mod/profile.php +++ b/mod/profile.php @@ -135,9 +135,11 @@ function profile_content(&$a, $update = 0) { else $lockstate = 'unlock'; - $jotplugins = ""; - call_hooks('jot_tool', $jotplugins); - + $jotplugins = ""; + call_hooks('jot_tool', $jotplugins); + + $tpl = replace_macros($tpl,array('$jotplugins' => $jotplugins)); + $o .= replace_macros($tpl,array( '$baseurl' => $a->get_baseurl(), '$defloc' => (($is_owner) ? $a->user['default-location'] : ''), @@ -148,8 +150,7 @@ function profile_content(&$a, $update = 0) { '$emtitle' => t('Example: bob@example.com, mary@example.com'), '$bang' => '', '$acl' => (($is_owner) ? populate_acl($a->user, $celeb) : ''), - '$profile_uid' => $a->profile['profile_uid'], - '$jotplugins' => $jotplugins + '$profile_uid' => $a->profile['profile_uid'] )); } From ac3f3a6e9fb46ab608f26d4dfc12ee631e0e453a Mon Sep 17 00:00:00 2001 From: Friendika Date: Sun, 6 Feb 2011 02:33:02 -0800 Subject: [PATCH 7/7] kill orphans --- boot.php | 4 ++-- include/items.php | 2 +- update.php | 14 ++++++++++++++ 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/boot.php b/boot.php index 4fc05f81a3..4fc35be9bb 100644 --- a/boot.php +++ b/boot.php @@ -2,8 +2,8 @@ set_time_limit(0); -define ( 'BUILD_ID', 1034 ); -define ( 'FRIENDIKA_VERSION', '2.10.0904' ); +define ( 'BUILD_ID', 1035 ); +define ( 'FRIENDIKA_VERSION', '2.10.0905' ); define ( 'DFRN_PROTOCOL_VERSION', '2.1' ); define ( 'EOL', "
\r\n" ); diff --git a/include/items.php b/include/items.php index 359378ff7d..15fd262f4c 100644 --- a/include/items.php +++ b/include/items.php @@ -144,7 +144,7 @@ function get_feed_for(&$a, $dfrn_id, $owner_nick, $last_update, $direction = 0) `contact`.`thumb`, `contact`.`dfrn-id`, `contact`.`self`, `contact`.`id` AS `contact-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 + WHERE `item`.`uid` = %d AND `item`.`visible` = 1 AND `item`.`parent` != 0 AND `item`.`wall` = 1 AND `contact`.`blocked` = 0 AND `contact`.`pending` = 0 AND ( `item`.`edited` > '%s' OR `item`.`changed` > '%s' ) $sql_extra diff --git a/update.php b/update.php index f7bf9da1ed..f909837470 100644 --- a/update.php +++ b/update.php @@ -328,3 +328,17 @@ function update_1033() { `updated` DATETIME NOT NULL ) ENGINE = MYISAM DEFAULT CHARSET=utf8;"); } + + +function update_1034() { + + // If you have any of these parent-less posts they can cause problems, and + // we need to delete them. You can't see them anyway. + // Legitimate items will usually get re-created on the next + // pull from the hub. + // But don't get rid of a post that may have just come in + // and may not yet have the parent id set. + + q("DELETE FROM `item` WHERE `parent` = 0 AND `created` < UTC_TIMESTAMP() - INTERVAL 2 MINUTE"); + +}