From eebb2d2120b91c09238e970b2292059a04960aa7 Mon Sep 17 00:00:00 2001 From: friendica Date: Mon, 25 Jun 2012 15:34:23 -0700 Subject: [PATCH 01/17] rev update --- boot.php | 2 +- util/messages.po | 524 +++++++++++++++++++++++++---------------------- 2 files changed, 282 insertions(+), 244 deletions(-) diff --git a/boot.php b/boot.php index 2c8723d26..024ef0c05 100644 --- a/boot.php +++ b/boot.php @@ -10,7 +10,7 @@ require_once('include/nav.php'); require_once('include/cache.php'); define ( 'FRIENDICA_PLATFORM', 'Friendica'); -define ( 'FRIENDICA_VERSION', '3.0.1384' ); +define ( 'FRIENDICA_VERSION', '3.0.1385' ); define ( 'DFRN_PROTOCOL_VERSION', '2.23' ); define ( 'DB_UPDATE_VERSION', 1150 ); diff --git a/util/messages.po b/util/messages.po index 87e2e0ac6..d9a462446 100644 --- a/util/messages.po +++ b/util/messages.po @@ -6,9 +6,9 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: 3.0.1384\n" +"Project-Id-Version: 3.0.1385\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2012-06-24 10:00-0700\n" +"POT-Creation-Date: 2012-06-25 10:00-0700\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -36,7 +36,7 @@ msgstr "" #: ../../mod/crepair.php:115 ../../mod/wall_attach.php:44 #: ../../mod/fsuggest.php:78 ../../mod/events.php:138 ../../mod/api.php:26 -#: ../../mod/api.php:31 ../../mod/photos.php:133 ../../mod/photos.php:931 +#: ../../mod/api.php:31 ../../mod/photos.php:135 ../../mod/photos.php:951 #: ../../mod/editpost.php:10 ../../mod/install.php:151 #: ../../mod/notifications.php:66 ../../mod/contacts.php:145 #: ../../mod/settings.php:106 ../../mod/settings.php:537 @@ -52,11 +52,11 @@ msgstr "" #: ../../mod/message.php:97 ../../mod/allfriends.php:9 #: ../../mod/nogroup.php:25 ../../mod/wall_upload.php:53 #: ../../mod/follow.php:9 ../../mod/display.php:138 ../../mod/profiles.php:7 -#: ../../mod/profiles.php:385 ../../mod/delegate.php:6 +#: ../../mod/profiles.php:400 ../../mod/delegate.php:6 #: ../../mod/suggest.php:28 ../../mod/invite.php:13 ../../mod/invite.php:81 #: ../../mod/dfrn_confirm.php:53 ../../addon/facebook/facebook.php:508 -#: ../../addon/dav/layout.fnk.php:353 ../../include/items.php:3411 -#: ../../index.php:309 +#: ../../addon/facebook/facebook.php:514 ../../addon/dav/layout.fnk.php:353 +#: ../../include/items.php:3411 ../../index.php:309 msgid "Permission denied." msgstr "" @@ -123,18 +123,18 @@ msgid "New photo from this URL" msgstr "" #: ../../mod/crepair.php:166 ../../mod/fsuggest.php:107 -#: ../../mod/events.php:428 ../../mod/photos.php:966 ../../mod/photos.php:1024 -#: ../../mod/photos.php:1270 ../../mod/photos.php:1310 -#: ../../mod/photos.php:1350 ../../mod/photos.php:1381 +#: ../../mod/events.php:428 ../../mod/photos.php:986 ../../mod/photos.php:1057 +#: ../../mod/photos.php:1303 ../../mod/photos.php:1343 +#: ../../mod/photos.php:1383 ../../mod/photos.php:1414 #: ../../mod/install.php:246 ../../mod/install.php:284 #: ../../mod/localtime.php:45 ../../mod/contacts.php:343 #: ../../mod/settings.php:555 ../../mod/settings.php:701 #: ../../mod/settings.php:762 ../../mod/settings.php:969 #: ../../mod/group.php:85 ../../mod/message.php:216 ../../mod/message.php:410 #: ../../mod/admin.php:420 ../../mod/admin.php:656 ../../mod/admin.php:792 -#: ../../mod/admin.php:991 ../../mod/admin.php:1078 ../../mod/profiles.php:554 +#: ../../mod/admin.php:991 ../../mod/admin.php:1078 ../../mod/profiles.php:569 #: ../../mod/invite.php:119 ../../addon/fromgplus/fromgplus.php:40 -#: ../../addon/facebook/facebook.php:610 +#: ../../addon/facebook/facebook.php:617 #: ../../addon/snautofollow/snautofollow.php:64 #: ../../addon/yourls/yourls.php:76 ../../addon/ljpost/ljpost.php:93 #: ../../addon/nsfw/nsfw.php:57 ../../addon/page/page.php:164 @@ -340,7 +340,7 @@ msgstr "" #: ../../mod/settings.php:956 ../../mod/settings.php:957 #: ../../mod/settings.php:958 ../../mod/settings.php:959 #: ../../mod/settings.php:960 ../../mod/register.php:234 -#: ../../mod/profiles.php:531 +#: ../../mod/profiles.php:546 msgid "Yes" msgstr "" @@ -352,36 +352,36 @@ msgstr "" #: ../../mod/settings.php:956 ../../mod/settings.php:957 #: ../../mod/settings.php:958 ../../mod/settings.php:959 #: ../../mod/settings.php:960 ../../mod/register.php:235 -#: ../../mod/profiles.php:532 +#: ../../mod/profiles.php:547 msgid "No" msgstr "" -#: ../../mod/photos.php:44 ../../boot.php:1540 +#: ../../mod/photos.php:46 ../../boot.php:1540 msgid "Photo Albums" msgstr "" -#: ../../mod/photos.php:52 ../../mod/photos.php:154 ../../mod/photos.php:945 -#: ../../mod/photos.php:1016 ../../mod/photos.php:1031 -#: ../../mod/photos.php:1459 ../../mod/photos.php:1471 +#: ../../mod/photos.php:54 ../../mod/photos.php:156 ../../mod/photos.php:965 +#: ../../mod/photos.php:1049 ../../mod/photos.php:1064 +#: ../../mod/photos.php:1492 ../../mod/photos.php:1504 #: ../../addon/communityhome/communityhome.php:110 #: ../../view/theme/diabook/theme.php:598 msgid "Contact Photos" msgstr "" -#: ../../mod/photos.php:59 ../../mod/photos.php:1041 ../../mod/photos.php:1509 +#: ../../mod/photos.php:61 ../../mod/photos.php:1074 ../../mod/photos.php:1542 msgid "Upload New Photos" msgstr "" -#: ../../mod/photos.php:70 ../../mod/settings.php:21 +#: ../../mod/photos.php:72 ../../mod/settings.php:21 msgid "everybody" msgstr "" -#: ../../mod/photos.php:143 +#: ../../mod/photos.php:145 msgid "Contact information unavailable" msgstr "" -#: ../../mod/photos.php:154 ../../mod/photos.php:658 ../../mod/photos.php:1016 -#: ../../mod/photos.php:1031 ../../mod/profile_photo.php:60 +#: ../../mod/photos.php:156 ../../mod/photos.php:660 ../../mod/photos.php:1049 +#: ../../mod/photos.php:1064 ../../mod/profile_photo.php:60 #: ../../mod/profile_photo.php:67 ../../mod/profile_photo.php:74 #: ../../mod/profile_photo.php:176 ../../mod/profile_photo.php:254 #: ../../mod/profile_photo.php:263 @@ -391,23 +391,23 @@ msgstr "" msgid "Profile Photos" msgstr "" -#: ../../mod/photos.php:164 +#: ../../mod/photos.php:166 msgid "Album not found." msgstr "" -#: ../../mod/photos.php:182 ../../mod/photos.php:1025 +#: ../../mod/photos.php:184 ../../mod/photos.php:1058 msgid "Delete Album" msgstr "" -#: ../../mod/photos.php:245 ../../mod/photos.php:1271 +#: ../../mod/photos.php:247 ../../mod/photos.php:1304 msgid "Delete Photo" msgstr "" -#: ../../mod/photos.php:589 +#: ../../mod/photos.php:591 msgid "was tagged in a" msgstr "" -#: ../../mod/photos.php:589 ../../mod/like.php:185 ../../mod/tagger.php:70 +#: ../../mod/photos.php:591 ../../mod/like.php:185 ../../mod/tagger.php:70 #: ../../addon/communityhome/communityhome.php:163 #: ../../view/theme/diabook/theme.php:570 ../../include/text.php:1316 #: ../../include/diaspora.php:1710 ../../include/conversation.php:53 @@ -415,176 +415,186 @@ msgstr "" msgid "photo" msgstr "" -#: ../../mod/photos.php:589 +#: ../../mod/photos.php:591 msgid "by" msgstr "" -#: ../../mod/photos.php:694 ../../addon/js_upload/js_upload.php:315 +#: ../../mod/photos.php:696 ../../addon/js_upload/js_upload.php:315 msgid "Image exceeds size limit of " msgstr "" -#: ../../mod/photos.php:702 +#: ../../mod/photos.php:704 msgid "Image file is empty." msgstr "" -#: ../../mod/photos.php:716 ../../mod/profile_photo.php:126 +#: ../../mod/photos.php:736 ../../mod/profile_photo.php:126 #: ../../mod/wall_upload.php:86 msgid "Unable to process image." msgstr "" -#: ../../mod/photos.php:737 ../../mod/profile_photo.php:259 +#: ../../mod/photos.php:757 ../../mod/profile_photo.php:259 #: ../../mod/wall_upload.php:105 msgid "Image upload failed." msgstr "" -#: ../../mod/photos.php:823 ../../mod/community.php:16 +#: ../../mod/photos.php:843 ../../mod/community.php:16 #: ../../mod/dfrn_request.php:759 ../../mod/viewcontacts.php:17 #: ../../mod/display.php:7 ../../mod/search.php:71 ../../mod/directory.php:29 msgid "Public access denied." msgstr "" -#: ../../mod/photos.php:833 +#: ../../mod/photos.php:853 msgid "No photos selected" msgstr "" -#: ../../mod/photos.php:912 +#: ../../mod/photos.php:932 msgid "Access to this item is restricted." msgstr "" -#: ../../mod/photos.php:973 +#: ../../mod/photos.php:996 +#, php-format +msgid "You have used %1$.2f Mbytes of %2$.2f Mbytes photo storage." +msgstr "" + +#: ../../mod/photos.php:999 +#, php-format +msgid "You have used %1$.2f Mbytes of photo storage." +msgstr "" + +#: ../../mod/photos.php:1005 msgid "Upload Photos" msgstr "" -#: ../../mod/photos.php:976 ../../mod/photos.php:1020 +#: ../../mod/photos.php:1009 ../../mod/photos.php:1053 msgid "New album name: " msgstr "" -#: ../../mod/photos.php:977 +#: ../../mod/photos.php:1010 msgid "or existing album name: " msgstr "" -#: ../../mod/photos.php:978 +#: ../../mod/photos.php:1011 msgid "Do not show a status post for this upload" msgstr "" -#: ../../mod/photos.php:980 ../../mod/photos.php:1266 +#: ../../mod/photos.php:1013 ../../mod/photos.php:1299 msgid "Permissions" msgstr "" -#: ../../mod/photos.php:1035 +#: ../../mod/photos.php:1068 msgid "Edit Album" msgstr "" -#: ../../mod/photos.php:1059 ../../mod/photos.php:1492 +#: ../../mod/photos.php:1092 ../../mod/photos.php:1525 msgid "View Photo" msgstr "" -#: ../../mod/photos.php:1094 +#: ../../mod/photos.php:1127 msgid "Permission denied. Access to this item may be restricted." msgstr "" -#: ../../mod/photos.php:1096 +#: ../../mod/photos.php:1129 msgid "Photo not available" msgstr "" -#: ../../mod/photos.php:1146 +#: ../../mod/photos.php:1179 msgid "View photo" msgstr "" -#: ../../mod/photos.php:1146 +#: ../../mod/photos.php:1179 msgid "Edit photo" msgstr "" -#: ../../mod/photos.php:1147 +#: ../../mod/photos.php:1180 msgid "Use as profile photo" msgstr "" -#: ../../mod/photos.php:1153 ../../include/conversation.php:490 +#: ../../mod/photos.php:1186 ../../include/conversation.php:490 msgid "Private Message" msgstr "" -#: ../../mod/photos.php:1175 +#: ../../mod/photos.php:1208 msgid "View Full Size" msgstr "" -#: ../../mod/photos.php:1243 +#: ../../mod/photos.php:1276 msgid "Tags: " msgstr "" -#: ../../mod/photos.php:1246 +#: ../../mod/photos.php:1279 msgid "[Remove any tag]" msgstr "" -#: ../../mod/photos.php:1256 +#: ../../mod/photos.php:1289 msgid "Rotate CW (right)" msgstr "" -#: ../../mod/photos.php:1257 +#: ../../mod/photos.php:1290 msgid "Rotate CCW (left)" msgstr "" -#: ../../mod/photos.php:1259 +#: ../../mod/photos.php:1292 msgid "New album name" msgstr "" -#: ../../mod/photos.php:1262 +#: ../../mod/photos.php:1295 msgid "Caption" msgstr "" -#: ../../mod/photos.php:1264 +#: ../../mod/photos.php:1297 msgid "Add a Tag" msgstr "" -#: ../../mod/photos.php:1268 +#: ../../mod/photos.php:1301 msgid "Example: @bob, @Barbara_Jensen, @jim@example.com, #California, #camping" msgstr "" -#: ../../mod/photos.php:1288 ../../include/conversation.php:554 +#: ../../mod/photos.php:1321 ../../include/conversation.php:554 msgid "I like this (toggle)" msgstr "" -#: ../../mod/photos.php:1289 ../../include/conversation.php:555 +#: ../../mod/photos.php:1322 ../../include/conversation.php:555 msgid "I don't like this (toggle)" msgstr "" -#: ../../mod/photos.php:1290 ../../include/conversation.php:993 +#: ../../mod/photos.php:1323 ../../include/conversation.php:993 msgid "Share" msgstr "" -#: ../../mod/photos.php:1291 ../../mod/editpost.php:104 +#: ../../mod/photos.php:1324 ../../mod/editpost.php:104 #: ../../mod/wallmessage.php:145 ../../mod/message.php:215 #: ../../mod/message.php:411 ../../include/conversation.php:371 #: ../../include/conversation.php:731 ../../include/conversation.php:1012 msgid "Please wait" msgstr "" -#: ../../mod/photos.php:1307 ../../mod/photos.php:1347 -#: ../../mod/photos.php:1378 ../../include/conversation.php:577 +#: ../../mod/photos.php:1340 ../../mod/photos.php:1380 +#: ../../mod/photos.php:1411 ../../include/conversation.php:577 msgid "This is you" msgstr "" -#: ../../mod/photos.php:1309 ../../mod/photos.php:1349 -#: ../../mod/photos.php:1380 ../../include/conversation.php:579 +#: ../../mod/photos.php:1342 ../../mod/photos.php:1382 +#: ../../mod/photos.php:1413 ../../include/conversation.php:579 #: ../../boot.php:518 msgid "Comment" msgstr "" -#: ../../mod/photos.php:1311 ../../mod/editpost.php:125 +#: ../../mod/photos.php:1344 ../../mod/editpost.php:125 #: ../../include/conversation.php:589 ../../include/conversation.php:1030 msgid "Preview" msgstr "" -#: ../../mod/photos.php:1408 ../../mod/settings.php:618 +#: ../../mod/photos.php:1441 ../../mod/settings.php:618 #: ../../mod/settings.php:699 ../../mod/group.php:168 ../../mod/admin.php:663 #: ../../include/conversation.php:328 ../../include/conversation.php:609 msgid "Delete" msgstr "" -#: ../../mod/photos.php:1498 +#: ../../mod/photos.php:1531 msgid "View Album" msgstr "" -#: ../../mod/photos.php:1507 +#: ../../mod/photos.php:1540 msgid "Recent Photos" msgstr "" @@ -1726,8 +1736,8 @@ msgstr "" #: ../../mod/lostpass.php:45 ../../mod/lostpass.php:107 #: ../../mod/register.php:90 ../../mod/register.php:144 #: ../../mod/regmod.php:54 ../../mod/dfrn_confirm.php:752 -#: ../../addon/facebook/facebook.php:693 -#: ../../addon/facebook/facebook.php:1183 +#: ../../addon/facebook/facebook.php:700 +#: ../../addon/facebook/facebook.php:1190 #: ../../addon/public_server/public_server.php:62 #: ../../addon/testdrive/testdrive.php:67 ../../include/items.php:2814 #: ../../boot.php:720 @@ -2420,7 +2430,7 @@ msgid "Personal Notes" msgstr "" #: ../../mod/notes.php:63 ../../mod/filer.php:30 -#: ../../addon/facebook/facebook.php:761 +#: ../../addon/facebook/facebook.php:768 #: ../../addon/privacy_image_cache/privacy_image_cache.php:187 #: ../../addon/dav/layout.fnk.php:384 ../../include/text.php:652 msgid "Save" @@ -2665,7 +2675,7 @@ msgid "Profile Visibility Editor" msgstr "" #: ../../mod/profperm.php:103 ../../view/theme/diabook/theme.php:128 -#: ../../include/profile_advanced.php:7 ../../include/profile_advanced.php:79 +#: ../../include/profile_advanced.php:7 ../../include/profile_advanced.php:84 #: ../../include/nav.php:50 ../../boot.php:1531 msgid "Profile" msgstr "" @@ -2779,7 +2789,7 @@ msgid "People Search" msgstr "" #: ../../mod/like.php:185 ../../mod/like.php:260 ../../mod/tagger.php:70 -#: ../../addon/facebook/facebook.php:1577 +#: ../../addon/facebook/facebook.php:1584 #: ../../addon/communityhome/communityhome.php:158 #: ../../addon/communityhome/communityhome.php:167 #: ../../view/theme/diabook/theme.php:565 @@ -2789,7 +2799,7 @@ msgstr "" msgid "status" msgstr "" -#: ../../mod/like.php:202 ../../addon/facebook/facebook.php:1581 +#: ../../mod/like.php:202 ../../addon/facebook/facebook.php:1588 #: ../../addon/communityhome/communityhome.php:172 #: ../../view/theme/diabook/theme.php:579 ../../include/diaspora.php:1726 #: ../../include/conversation.php:65 @@ -3720,8 +3730,8 @@ msgstr "" msgid "Search" msgstr "" -#: ../../mod/profiles.php:21 ../../mod/profiles.php:395 -#: ../../mod/profiles.php:509 ../../mod/dfrn_confirm.php:62 +#: ../../mod/profiles.php:21 ../../mod/profiles.php:410 +#: ../../mod/profiles.php:524 ../../mod/dfrn_confirm.php:62 msgid "Profile not found." msgstr "" @@ -3729,285 +3739,301 @@ msgstr "" msgid "Profile Name is required." msgstr "" -#: ../../mod/profiles.php:152 +#: ../../mod/profiles.php:155 msgid "Marital Status" msgstr "" -#: ../../mod/profiles.php:156 +#: ../../mod/profiles.php:159 msgid "Romantic Partner" msgstr "" -#: ../../mod/profiles.php:160 -msgid "Work/Employment" -msgstr "" - #: ../../mod/profiles.php:163 -msgid "Religion" +msgid "Likes" msgstr "" #: ../../mod/profiles.php:167 -msgid "Political Views" +msgid "Dislikes" msgstr "" #: ../../mod/profiles.php:171 +msgid "Work/Employment" +msgstr "" + +#: ../../mod/profiles.php:174 +msgid "Religion" +msgstr "" + +#: ../../mod/profiles.php:178 +msgid "Political Views" +msgstr "" + +#: ../../mod/profiles.php:182 msgid "Gender" msgstr "" -#: ../../mod/profiles.php:175 +#: ../../mod/profiles.php:186 msgid "Sexual Preference" msgstr "" -#: ../../mod/profiles.php:179 +#: ../../mod/profiles.php:190 msgid "Homepage" msgstr "" -#: ../../mod/profiles.php:183 +#: ../../mod/profiles.php:194 msgid "Interests" msgstr "" -#: ../../mod/profiles.php:187 +#: ../../mod/profiles.php:198 msgid "Address" msgstr "" -#: ../../mod/profiles.php:194 ../../addon/dav/layout.fnk.php:310 +#: ../../mod/profiles.php:205 ../../addon/dav/layout.fnk.php:310 msgid "Location" msgstr "" -#: ../../mod/profiles.php:273 +#: ../../mod/profiles.php:288 msgid "Profile updated." msgstr "" -#: ../../mod/profiles.php:340 +#: ../../mod/profiles.php:355 msgid " and " msgstr "" -#: ../../mod/profiles.php:348 +#: ../../mod/profiles.php:363 msgid "public profile" msgstr "" -#: ../../mod/profiles.php:351 +#: ../../mod/profiles.php:366 #, php-format msgid "%1$s changed %2$s to “%3$s”" msgstr "" -#: ../../mod/profiles.php:352 +#: ../../mod/profiles.php:367 #, php-format msgid " - Visit %1$s's %2$s" msgstr "" -#: ../../mod/profiles.php:355 +#: ../../mod/profiles.php:370 #, php-format msgid "%1$s has an updated %2$s, changing %3$s." msgstr "" -#: ../../mod/profiles.php:414 +#: ../../mod/profiles.php:429 msgid "Profile deleted." msgstr "" -#: ../../mod/profiles.php:432 ../../mod/profiles.php:466 +#: ../../mod/profiles.php:447 ../../mod/profiles.php:481 msgid "Profile-" msgstr "" -#: ../../mod/profiles.php:451 ../../mod/profiles.php:493 +#: ../../mod/profiles.php:466 ../../mod/profiles.php:508 msgid "New profile created." msgstr "" -#: ../../mod/profiles.php:472 +#: ../../mod/profiles.php:487 msgid "Profile unavailable to clone." msgstr "" -#: ../../mod/profiles.php:530 +#: ../../mod/profiles.php:545 msgid "Hide your contact/friend list from viewers of this profile?" msgstr "" -#: ../../mod/profiles.php:553 +#: ../../mod/profiles.php:568 msgid "Edit Profile Details" msgstr "" -#: ../../mod/profiles.php:555 +#: ../../mod/profiles.php:570 msgid "View this profile" msgstr "" -#: ../../mod/profiles.php:556 +#: ../../mod/profiles.php:571 msgid "Create a new profile using these settings" msgstr "" -#: ../../mod/profiles.php:557 +#: ../../mod/profiles.php:572 msgid "Clone this profile" msgstr "" -#: ../../mod/profiles.php:558 +#: ../../mod/profiles.php:573 msgid "Delete this profile" msgstr "" -#: ../../mod/profiles.php:559 +#: ../../mod/profiles.php:574 msgid "Profile Name:" msgstr "" -#: ../../mod/profiles.php:560 +#: ../../mod/profiles.php:575 msgid "Your Full Name:" msgstr "" -#: ../../mod/profiles.php:561 +#: ../../mod/profiles.php:576 msgid "Title/Description:" msgstr "" -#: ../../mod/profiles.php:562 +#: ../../mod/profiles.php:577 msgid "Your Gender:" msgstr "" -#: ../../mod/profiles.php:563 +#: ../../mod/profiles.php:578 #, php-format msgid "Birthday (%s):" msgstr "" -#: ../../mod/profiles.php:564 +#: ../../mod/profiles.php:579 msgid "Street Address:" msgstr "" -#: ../../mod/profiles.php:565 +#: ../../mod/profiles.php:580 msgid "Locality/City:" msgstr "" -#: ../../mod/profiles.php:566 +#: ../../mod/profiles.php:581 msgid "Postal/Zip Code:" msgstr "" -#: ../../mod/profiles.php:567 +#: ../../mod/profiles.php:582 msgid "Country:" msgstr "" -#: ../../mod/profiles.php:568 +#: ../../mod/profiles.php:583 msgid "Region/State:" msgstr "" -#: ../../mod/profiles.php:569 +#: ../../mod/profiles.php:584 msgid " Marital Status:" msgstr "" -#: ../../mod/profiles.php:570 +#: ../../mod/profiles.php:585 msgid "Who: (if applicable)" msgstr "" -#: ../../mod/profiles.php:571 +#: ../../mod/profiles.php:586 msgid "Examples: cathy123, Cathy Williams, cathy@example.com" msgstr "" -#: ../../mod/profiles.php:572 +#: ../../mod/profiles.php:587 msgid "Since [date]:" msgstr "" -#: ../../mod/profiles.php:573 ../../include/profile_advanced.php:46 +#: ../../mod/profiles.php:588 ../../include/profile_advanced.php:46 msgid "Sexual Preference:" msgstr "" -#: ../../mod/profiles.php:574 +#: ../../mod/profiles.php:589 msgid "Homepage URL:" msgstr "" -#: ../../mod/profiles.php:575 ../../include/profile_advanced.php:50 +#: ../../mod/profiles.php:590 ../../include/profile_advanced.php:50 msgid "Hometown:" msgstr "" -#: ../../mod/profiles.php:576 ../../include/profile_advanced.php:54 +#: ../../mod/profiles.php:591 ../../include/profile_advanced.php:54 msgid "Political Views:" msgstr "" -#: ../../mod/profiles.php:577 +#: ../../mod/profiles.php:592 msgid "Religious Views:" msgstr "" -#: ../../mod/profiles.php:578 +#: ../../mod/profiles.php:593 msgid "Public Keywords:" msgstr "" -#: ../../mod/profiles.php:579 +#: ../../mod/profiles.php:594 msgid "Private Keywords:" msgstr "" -#: ../../mod/profiles.php:580 -msgid "Example: fishing photography software" +#: ../../mod/profiles.php:595 ../../include/profile_advanced.php:62 +msgid "Likes:" msgstr "" -#: ../../mod/profiles.php:581 -msgid "(Used for suggesting potential friends, can be seen by others)" -msgstr "" - -#: ../../mod/profiles.php:582 -msgid "(Used for searching profiles, never shown to others)" -msgstr "" - -#: ../../mod/profiles.php:583 -msgid "Tell us about yourself..." -msgstr "" - -#: ../../mod/profiles.php:584 -msgid "Hobbies/Interests" -msgstr "" - -#: ../../mod/profiles.php:585 -msgid "Contact information and Social Networks" -msgstr "" - -#: ../../mod/profiles.php:586 -msgid "Musical interests" -msgstr "" - -#: ../../mod/profiles.php:587 -msgid "Books, literature" -msgstr "" - -#: ../../mod/profiles.php:588 -msgid "Television" -msgstr "" - -#: ../../mod/profiles.php:589 -msgid "Film/dance/culture/entertainment" -msgstr "" - -#: ../../mod/profiles.php:590 -msgid "Love/romance" -msgstr "" - -#: ../../mod/profiles.php:591 -msgid "Work/employment" -msgstr "" - -#: ../../mod/profiles.php:592 -msgid "School/education" +#: ../../mod/profiles.php:596 ../../include/profile_advanced.php:64 +msgid "Dislikes:" msgstr "" #: ../../mod/profiles.php:597 +msgid "Example: fishing photography software" +msgstr "" + +#: ../../mod/profiles.php:598 +msgid "(Used for suggesting potential friends, can be seen by others)" +msgstr "" + +#: ../../mod/profiles.php:599 +msgid "(Used for searching profiles, never shown to others)" +msgstr "" + +#: ../../mod/profiles.php:600 +msgid "Tell us about yourself..." +msgstr "" + +#: ../../mod/profiles.php:601 +msgid "Hobbies/Interests" +msgstr "" + +#: ../../mod/profiles.php:602 +msgid "Contact information and Social Networks" +msgstr "" + +#: ../../mod/profiles.php:603 +msgid "Musical interests" +msgstr "" + +#: ../../mod/profiles.php:604 +msgid "Books, literature" +msgstr "" + +#: ../../mod/profiles.php:605 +msgid "Television" +msgstr "" + +#: ../../mod/profiles.php:606 +msgid "Film/dance/culture/entertainment" +msgstr "" + +#: ../../mod/profiles.php:607 +msgid "Love/romance" +msgstr "" + +#: ../../mod/profiles.php:608 +msgid "Work/employment" +msgstr "" + +#: ../../mod/profiles.php:609 +msgid "School/education" +msgstr "" + +#: ../../mod/profiles.php:614 msgid "" "This is your public profile.
It may " "be visible to anybody using the internet." msgstr "" -#: ../../mod/profiles.php:607 ../../mod/directory.php:111 +#: ../../mod/profiles.php:624 ../../mod/directory.php:111 msgid "Age: " msgstr "" -#: ../../mod/profiles.php:644 +#: ../../mod/profiles.php:663 msgid "Edit/Manage Profiles" msgstr "" -#: ../../mod/profiles.php:645 ../../boot.php:1092 +#: ../../mod/profiles.php:664 ../../boot.php:1092 msgid "Change profile photo" msgstr "" -#: ../../mod/profiles.php:646 ../../boot.php:1093 +#: ../../mod/profiles.php:665 ../../boot.php:1093 msgid "Create New Profile" msgstr "" -#: ../../mod/profiles.php:657 ../../boot.php:1103 +#: ../../mod/profiles.php:676 ../../boot.php:1103 msgid "Profile Image" msgstr "" -#: ../../mod/profiles.php:659 ../../boot.php:1106 +#: ../../mod/profiles.php:678 ../../boot.php:1106 msgid "visible to everybody" msgstr "" -#: ../../mod/profiles.php:660 ../../boot.php:1107 +#: ../../mod/profiles.php:679 ../../boot.php:1107 msgid "Edit visibility" msgstr "" @@ -4281,83 +4307,83 @@ msgstr "" msgid "Google+ Import Settings saved." msgstr "" -#: ../../addon/facebook/facebook.php:514 +#: ../../addon/facebook/facebook.php:521 msgid "Facebook disabled" msgstr "" -#: ../../addon/facebook/facebook.php:519 +#: ../../addon/facebook/facebook.php:526 msgid "Updating contacts" msgstr "" -#: ../../addon/facebook/facebook.php:542 +#: ../../addon/facebook/facebook.php:549 msgid "Facebook API key is missing." msgstr "" -#: ../../addon/facebook/facebook.php:549 +#: ../../addon/facebook/facebook.php:556 msgid "Facebook Connect" msgstr "" -#: ../../addon/facebook/facebook.php:555 +#: ../../addon/facebook/facebook.php:562 msgid "Install Facebook connector for this account." msgstr "" -#: ../../addon/facebook/facebook.php:562 +#: ../../addon/facebook/facebook.php:569 msgid "Remove Facebook connector" msgstr "" -#: ../../addon/facebook/facebook.php:567 +#: ../../addon/facebook/facebook.php:574 msgid "" "Re-authenticate [This is necessary whenever your Facebook password is " "changed.]" msgstr "" -#: ../../addon/facebook/facebook.php:574 +#: ../../addon/facebook/facebook.php:581 msgid "Post to Facebook by default" msgstr "" -#: ../../addon/facebook/facebook.php:580 +#: ../../addon/facebook/facebook.php:587 msgid "" "Facebook friend linking has been disabled on this site. The following " "settings will have no effect." msgstr "" -#: ../../addon/facebook/facebook.php:584 +#: ../../addon/facebook/facebook.php:591 msgid "" "Facebook friend linking has been disabled on this site. If you disable it, " "you will be unable to re-enable it." msgstr "" -#: ../../addon/facebook/facebook.php:587 +#: ../../addon/facebook/facebook.php:594 msgid "Link all your Facebook friends and conversations on this website" msgstr "" -#: ../../addon/facebook/facebook.php:589 +#: ../../addon/facebook/facebook.php:596 msgid "" "Facebook conversations consist of your profile wall and your friend " "stream." msgstr "" -#: ../../addon/facebook/facebook.php:590 +#: ../../addon/facebook/facebook.php:597 msgid "On this website, your Facebook friend stream is only visible to you." msgstr "" -#: ../../addon/facebook/facebook.php:591 +#: ../../addon/facebook/facebook.php:598 msgid "" "The following settings determine the privacy of your Facebook profile wall " "on this website." msgstr "" -#: ../../addon/facebook/facebook.php:595 +#: ../../addon/facebook/facebook.php:602 msgid "" "On this website your Facebook profile wall conversations will only be " "visible to you" msgstr "" -#: ../../addon/facebook/facebook.php:600 +#: ../../addon/facebook/facebook.php:607 msgid "Do not import your Facebook profile wall conversations" msgstr "" -#: ../../addon/facebook/facebook.php:602 +#: ../../addon/facebook/facebook.php:609 msgid "" "If you choose to link conversations and leave both of these boxes unchecked, " "your Facebook profile wall will be merged with your profile wall on this " @@ -4365,120 +4391,120 @@ msgid "" "who may see the conversations." msgstr "" -#: ../../addon/facebook/facebook.php:607 +#: ../../addon/facebook/facebook.php:614 msgid "Comma separated applications to ignore" msgstr "" -#: ../../addon/facebook/facebook.php:691 +#: ../../addon/facebook/facebook.php:698 msgid "Problems with Facebook Real-Time Updates" msgstr "" -#: ../../addon/facebook/facebook.php:719 +#: ../../addon/facebook/facebook.php:726 #: ../../include/contact_selectors.php:81 msgid "Facebook" msgstr "" -#: ../../addon/facebook/facebook.php:720 +#: ../../addon/facebook/facebook.php:727 msgid "Facebook Connector Settings" msgstr "" -#: ../../addon/facebook/facebook.php:735 +#: ../../addon/facebook/facebook.php:742 msgid "Facebook API Key" msgstr "" -#: ../../addon/facebook/facebook.php:745 +#: ../../addon/facebook/facebook.php:752 msgid "" "Error: it appears that you have specified the App-ID and -Secret in your ." "htconfig.php file. As long as they are specified there, they cannot be set " "using this form.

" msgstr "" -#: ../../addon/facebook/facebook.php:750 +#: ../../addon/facebook/facebook.php:757 msgid "" "Error: the given API Key seems to be incorrect (the application access token " "could not be retrieved)." msgstr "" -#: ../../addon/facebook/facebook.php:752 +#: ../../addon/facebook/facebook.php:759 msgid "The given API Key seems to work correctly." msgstr "" -#: ../../addon/facebook/facebook.php:754 +#: ../../addon/facebook/facebook.php:761 msgid "" "The correctness of the API Key could not be detected. Somthing strange's " "going on." msgstr "" -#: ../../addon/facebook/facebook.php:757 +#: ../../addon/facebook/facebook.php:764 msgid "App-ID / API-Key" msgstr "" -#: ../../addon/facebook/facebook.php:758 +#: ../../addon/facebook/facebook.php:765 msgid "Application secret" msgstr "" -#: ../../addon/facebook/facebook.php:759 +#: ../../addon/facebook/facebook.php:766 #, php-format msgid "Polling Interval in minutes (minimum %1$s minutes)" msgstr "" -#: ../../addon/facebook/facebook.php:760 +#: ../../addon/facebook/facebook.php:767 msgid "" "Synchronize comments (no comments on Facebook are missed, at the cost of " "increased system load)" msgstr "" -#: ../../addon/facebook/facebook.php:764 +#: ../../addon/facebook/facebook.php:771 msgid "Real-Time Updates" msgstr "" -#: ../../addon/facebook/facebook.php:768 +#: ../../addon/facebook/facebook.php:775 msgid "Real-Time Updates are activated." msgstr "" -#: ../../addon/facebook/facebook.php:769 +#: ../../addon/facebook/facebook.php:776 msgid "Deactivate Real-Time Updates" msgstr "" -#: ../../addon/facebook/facebook.php:771 +#: ../../addon/facebook/facebook.php:778 msgid "Real-Time Updates not activated." msgstr "" -#: ../../addon/facebook/facebook.php:771 +#: ../../addon/facebook/facebook.php:778 msgid "Activate Real-Time Updates" msgstr "" -#: ../../addon/facebook/facebook.php:790 ../../addon/dav/layout.fnk.php:360 +#: ../../addon/facebook/facebook.php:797 ../../addon/dav/layout.fnk.php:360 msgid "The new values have been saved." msgstr "" -#: ../../addon/facebook/facebook.php:814 +#: ../../addon/facebook/facebook.php:821 msgid "Post to Facebook" msgstr "" -#: ../../addon/facebook/facebook.php:912 +#: ../../addon/facebook/facebook.php:919 msgid "" "Post to Facebook cancelled because of multi-network access permission " "conflict." msgstr "" -#: ../../addon/facebook/facebook.php:1132 +#: ../../addon/facebook/facebook.php:1139 msgid "View on Friendica" msgstr "" -#: ../../addon/facebook/facebook.php:1165 +#: ../../addon/facebook/facebook.php:1172 msgid "Facebook post failed. Queued for retry." msgstr "" -#: ../../addon/facebook/facebook.php:1205 +#: ../../addon/facebook/facebook.php:1212 msgid "Your Facebook connection became invalid. Please Re-authenticate." msgstr "" -#: ../../addon/facebook/facebook.php:1206 +#: ../../addon/facebook/facebook.php:1213 msgid "Facebook connection became invalid" msgstr "" -#: ../../addon/facebook/facebook.php:1207 +#: ../../addon/facebook/facebook.php:1214 #, php-format msgid "" "Hi %1$s,\n" @@ -6139,35 +6165,35 @@ msgstr "" msgid "Hobbies/Interests:" msgstr "" -#: ../../include/profile_advanced.php:62 +#: ../../include/profile_advanced.php:67 msgid "Contact information and Social Networks:" msgstr "" -#: ../../include/profile_advanced.php:64 +#: ../../include/profile_advanced.php:69 msgid "Musical interests:" msgstr "" -#: ../../include/profile_advanced.php:66 +#: ../../include/profile_advanced.php:71 msgid "Books, literature:" msgstr "" -#: ../../include/profile_advanced.php:68 +#: ../../include/profile_advanced.php:73 msgid "Television:" msgstr "" -#: ../../include/profile_advanced.php:70 +#: ../../include/profile_advanced.php:75 msgid "Film/dance/culture/entertainment:" msgstr "" -#: ../../include/profile_advanced.php:72 +#: ../../include/profile_advanced.php:77 msgid "Love/Romance:" msgstr "" -#: ../../include/profile_advanced.php:74 +#: ../../include/profile_advanced.php:79 msgid "Work/employment:" msgstr "" -#: ../../include/profile_advanced.php:76 +#: ../../include/profile_advanced.php:81 msgid "School/education:" msgstr "" @@ -7159,49 +7185,49 @@ msgid "" "This site is not configured to allow communications with other networks." msgstr "" -#: ../../include/follow.php:60 ../../include/follow.php:75 +#: ../../include/follow.php:60 ../../include/follow.php:80 msgid "No compatible communication protocols or feeds were discovered." msgstr "" -#: ../../include/follow.php:73 +#: ../../include/follow.php:78 msgid "The profile address specified does not provide adequate information." msgstr "" -#: ../../include/follow.php:77 +#: ../../include/follow.php:82 msgid "An author or name was not found." msgstr "" -#: ../../include/follow.php:79 +#: ../../include/follow.php:84 msgid "No browser URL could be matched to this address." msgstr "" -#: ../../include/follow.php:81 +#: ../../include/follow.php:86 msgid "" "Unable to match @-style Identity Address with a known protocol or email " "contact." msgstr "" -#: ../../include/follow.php:82 +#: ../../include/follow.php:87 msgid "Use mailto: in front of address to force email check." msgstr "" -#: ../../include/follow.php:88 +#: ../../include/follow.php:93 msgid "" "The profile address specified belongs to a network which has been disabled " "on this site." msgstr "" -#: ../../include/follow.php:93 +#: ../../include/follow.php:103 msgid "" "Limited profile. This person will be unable to receive direct/personal " "notifications from you." msgstr "" -#: ../../include/follow.php:169 +#: ../../include/follow.php:205 msgid "Unable to retrieve contact information." msgstr "" -#: ../../include/follow.php:223 +#: ../../include/follow.php:259 msgid "following" msgstr "" @@ -7556,6 +7582,18 @@ msgstr "" msgid "permissions" msgstr "" +#: ../../include/plugin.php:385 +msgid "Click here to upgrade." +msgstr "" + +#: ../../include/plugin.php:393 +msgid "This action exceeds the limits set by your subscription plan." +msgstr "" + +#: ../../include/plugin.php:398 +msgid "This action is not available under your subscription plan." +msgstr "" + #: ../../boot.php:517 msgid "Delete this item?" msgstr "" From b044cd922d389b5bb9367ce1004d00a711562cf9 Mon Sep 17 00:00:00 2001 From: friendica Date: Mon, 25 Jun 2012 16:03:46 -0700 Subject: [PATCH 02/17] typos in bbcode, add service class restrictions to jot uploads --- include/bb2diaspora.php | 2 +- include/bbcode.php | 2 +- include/plugin.php | 21 ++++++++++++--------- mod/wall_attach.php | 13 +++++++++++++ mod/wall_upload.php | 13 +++++++++++++ 5 files changed, 40 insertions(+), 11 deletions(-) diff --git a/include/bb2diaspora.php b/include/bb2diaspora.php index a0d114a37..25edb28d7 100644 --- a/include/bb2diaspora.php +++ b/include/bb2diaspora.php @@ -113,7 +113,7 @@ function bb2diaspora($Text,$preserve_nl = false) { // to define the closing tag for the list elements. So nested lists // are going to be flattened out in Diaspora for now $endlessloop = 0; - while ((strpos($Text, "[/list]") !== false) && (strpos($Text, "[list") !== false) + while ((strpos($Text, "[/list]") !== false) && (strpos($Text, "[list") !== false) && (strpos($Text, "[/ol]") !== false) && (strpos($Text, "[ol]") !== false) && (strpos($Text, "[/ul]") !== false) && (strpos($Text, "[ul]") !== false) && (++$endlessloop < 20)) { $Text = preg_replace_callback("/\[list\](.*?)\[\/list\]/is", 'diaspora_ul', $Text); diff --git a/include/bbcode.php b/include/bbcode.php index 38d1e658f..2c1c2378f 100644 --- a/include/bbcode.php +++ b/include/bbcode.php @@ -162,7 +162,7 @@ function bbcode($Text,$preserve_nl = false, $tryoembed = true) { // handle nested lists $endlessloop = 0; - while ((strpos($Text, "[/list]") !== false) && (strpos($Text, "[list") !== false) + while ((strpos($Text, "[/list]") !== false) && (strpos($Text, "[list") !== false) && (strpos($Text, "[/ol]") !== false) && (strpos($Text, "[ol]") !== false) && (strpos($Text, "[/ul]") !== false) && (strpos($Text, "[ul]") !== false) && (++$endlessloop < 20)) { $Text = preg_replace("/\[list\](.*?)\[\/list\]/ism", '
    $1
' ,$Text); diff --git a/include/plugin.php b/include/plugin.php index d762e8717..ffa562273 100644 --- a/include/plugin.php +++ b/include/plugin.php @@ -380,20 +380,23 @@ function service_class_fetch($uid,$property) { } -function upgrade_link() { +function upgrade_link($bbcode = false) { $l = get_config('service_class','upgrade_link'); - $t = sprintf('' . t('Click here to upgrade.') . '', $l); - if($l) - return $t; - return ''; + if(! $l) + return ''; + if($bbcode) + $t = sprintf('[url=%s]' . t('Click here to upgrade.') . '[/url]', $l); + else + $t = sprintf('' . t('Click here to upgrade.') . '', $l); + return $t; } -function upgrade_message() { - $x = upgrade_link(); +function upgrade_message($bbcode = false) { + $x = upgrade_link($bbcode); return t('This action exceeds the limits set by your subscription plan.') . (($x) ? ' ' . $x : '') ; } -function upgrade_bool_message() { - $x = upgrade_link(); +function upgrade_bool_message($bbcode = false) { + $x = upgrade_link($bbcode); return t('This action is not available under your subscription plan.') . (($x) ? ' ' . $x : '') ; } diff --git a/mod/wall_attach.php b/mod/wall_attach.php index 03d9f5105..f179b3ca5 100644 --- a/mod/wall_attach.php +++ b/mod/wall_attach.php @@ -60,6 +60,19 @@ function wall_attach_post(&$a) { return; } + $r = q("select sum(octet_length(data)) as total from attach where uid = %d ", + intval($page_owner_uid) + ); + + $limit = service_class_fetch($page_owner_uid,'attach_upload_limit'); + + if(($limit !== false) && (($r[0]['total'] + strlen($imagedata)) > $limit)) { + echo upgrade_message(true) . EOL ; + @unlink($src); + killme(); + } + + $filedata = @file_get_contents($src); $mimetype = z_mime_content_type($filename); $hash = random_string(); diff --git a/mod/wall_upload.php b/mod/wall_upload.php index 4b81f8d1c..5990f2834 100644 --- a/mod/wall_upload.php +++ b/mod/wall_upload.php @@ -79,6 +79,19 @@ function wall_upload_post(&$a) { killme(); } + $r = q("select sum(octet_length(data)) as total from photo where uid = %d and scale = 0 and album != 'Contact Photos' ", + intval($page_owner_uid) + ); + + $limit = service_class_fetch($page_owner_uid,'photo_upload_limit'); + + if(($limit !== false) && (($r[0]['total'] + strlen($imagedata)) > $limit)) { + echo upgrade_message(true) . EOL ; + @unlink($src); + killme(); + } + + $imagedata = @file_get_contents($src); $ph = new Photo($imagedata, $filetype); From f0b41709eb40237334de5d9a0ae7adbcd95fb841 Mon Sep 17 00:00:00 2001 From: friendica Date: Mon, 25 Jun 2012 17:45:33 -0700 Subject: [PATCH 03/17] improve remote delete forwarding --- include/api.php | 2 +- include/items.php | 64 ++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 64 insertions(+), 2 deletions(-) diff --git a/include/api.php b/include/api.php index cee1fde23..09cca8d8d 100644 --- a/include/api.php +++ b/include/api.php @@ -565,7 +565,7 @@ if(requestdata('lat') && requestdata('long')) $_REQUEST['coord'] = sprintf("%s %s",requestdata('lat'),requestdata('long')); $_REQUEST['profile_uid'] = local_user(); -// if(requestdata('parent')) + if($parent) $_REQUEST['type'] = 'net-comment'; else { diff --git a/include/items.php b/include/items.php index e495393fa..b90b5434f 100755 --- a/include/items.php +++ b/include/items.php @@ -2148,6 +2148,66 @@ function local_delivery($importer,$data) { } if($deleted) { + + $is_reply = false; + $r = q("select * from item where uri = '%s' and id = parent limit 1", + dbesc($uri) + ); + if(count($r)) { + $parent_uri = $r[0]['parent-uri']; + if($r[0]['parent-uri'] != $uri && $r[0]['thr-parent'] != $uri) + $is_reply = true; + } + + + if($is_reply) { + $community = false; + + if($importer['page-flags'] == PAGE_COMMUNITY || $importer['page-flags'] == PAGE_PRVGROUP ) { + $sql_extra = ''; + $community = true; + logger('local_delivery: possible community delete'); + } + else + $sql_extra = " and contact.self = 1 and item.wall = 1 "; + + // was the top-level post for this reply written by somebody on this site? + // Specifically, the recipient? + + $is_a_remote_delete = false; + + $r = q("select `item`.`id`, `item`.`uri`, `item`.`tag`, `item`.`forum_mode`,`item`.`origin`,`item`.`wall`, + `contact`.`name`, `contact`.`url`, `contact`.`thumb` from `item` + LEFT JOIN `contact` ON `contact`.`id` = `item`.`contact-id` + WHERE `item`.`uri` = '%s' AND (`item`.`parent-uri` = '%s' or `item`.`thr-parent` = '%s') + AND `item`.`uid` = %d + $sql_extra + LIMIT 1", + dbesc($parent_uri), + dbesc($parent_uri), + dbesc($parent_uri), + intval($importer['importer_uid']) + ); + if($r && count($r)) + $is_a_remote_delete = true; + + // Does this have the characteristics of a community or private group comment? + // If it's a reply to a wall post on a community/prvgroup page it's a + // valid community comment. Also forum_mode makes it valid for sure. + // If neither, it's not. + + if($is_a_remote_delete && $community) { + if((! $r[0]['forum_mode']) && (! $r[0]['wall'])) { + $is_a_remote_delete = false; + logger('local_delivery: not a community delete'); + } + } + + if($is_a_remote_delete) { + logger('local_delivery: received remote delete'); + } + } + $r = q("SELECT `item`.*, `contact`.`self` FROM `item` left join contact on `item`.`contact-id` = `contact`.`id` WHERE `uri` = '%s' AND `item`.`uid` = %d AND `contact-id` = %d AND NOT `item`.`file` LIKE '%%[%%' LIMIT 1", dbesc($uri), @@ -2235,7 +2295,9 @@ function local_delivery($importer,$data) { ); } } - } + if($is_a_remote_delete) + proc_run('php',"include/notifier.php","delete",$item['id']); + } } } } From 8bb7ab88fb8a1bfef198f6a2aff53a15e667aa59 Mon Sep 17 00:00:00 2001 From: Zach Prezkuta Date: Sat, 9 Jun 2012 18:39:21 -0600 Subject: [PATCH 04/17] Clean up the Diaspora connectivity: - Move Diaspora code into separate functions to make it more modular - Create more checks for whether Diaspora connectivity has been enabled --- include/delivery.php | 6 +- include/items.php | 133 +++++++++++++++++++++++++---------------- include/notifier.php | 10 +++- mod/item.php | 58 ++++++++++++------ mod/like.php | 138 ++++++++++++++++++++++++++----------------- 5 files changed, 216 insertions(+), 129 deletions(-) diff --git a/include/delivery.php b/include/delivery.php index e6cfc8155..b60fef3bf 100644 --- a/include/delivery.php +++ b/include/delivery.php @@ -492,6 +492,9 @@ function delivery_run($argv, $argc){ break; case NETWORK_DIASPORA : + if(get_config('system','dfrn_only') || (! get_config('system','diaspora_enabled')) || (! $normal_mode)) + break; + if($public_message) $loc = 'public batch ' . $contact['batch']; else @@ -499,9 +502,6 @@ function delivery_run($argv, $argc){ logger('delivery: diaspora batch deliver: ' . $loc); - if(get_config('system','dfrn_only') || (! get_config('system','diaspora_enabled')) || (! $normal_mode)) - break; - if((! $contact['pubkey']) && (! $public_message)) break; diff --git a/include/items.php b/include/items.php index e495393fa..af46eaaa1 100755 --- a/include/items.php +++ b/include/items.php @@ -383,16 +383,21 @@ function get_atom_elements($feed,$item) { $res['app'] = 'OStatus'; } - // base64 encoded json structure representing Diaspora signature - $dsig = $item->get_item_tags(NAMESPACE_DFRN,'diaspora_signature'); - if($dsig) { - $res['dsprsig'] = unxmlify($dsig[0]['data']); + // base64 encoded json structure representing Diaspora signature + $dspr_enabled = intval(get_config('system','diaspora_enabled')); + + if( $dspr_enabled) { + $dsig = $item->get_item_tags(NAMESPACE_DFRN,'diaspora_signature'); + if($dsig) { + $res['dsprsig'] = unxmlify($dsig[0]['data']); + } + + $dguid = $item->get_item_tags(NAMESPACE_DFRN,'diaspora_guid'); + if($dguid) + $res['guid'] = unxmlify($dguid[0]['data']); } - $dguid = $item->get_item_tags(NAMESPACE_DFRN,'diaspora_guid'); - if($dguid) - $res['guid'] = unxmlify($dguid[0]['data']); $bm = $item->get_item_tags(NAMESPACE_DFRN,'bookmark'); if($bm) @@ -699,13 +704,17 @@ function item_store($arr,$force_parent = false) { // If a Diaspora signature structure was passed in, pull it out of the // item array and set it aside for later storage. + $dspr_enabled = intval(get_config('system','diaspora_enabled')); $dsprsig = null; + if(x($arr,'dsprsig')) { - $dsprsig = json_decode(base64_decode($arr['dsprsig'])); + if($dspr_enabled) + $dsprsig = json_decode(base64_decode($arr['dsprsig'])); unset($arr['dsprsig']); } + if(x($arr, 'gravity')) $arr['gravity'] = intval($arr['gravity']); elseif($arr['parent-uri'] === $arr['uri']) @@ -934,7 +943,9 @@ function item_store($arr,$force_parent = false) { intval($parent_id) ); - if($dsprsig) { + + // Store the Diaspora signature if there is one + if($dspr_enabled && $dsprsig) { q("insert into sign (`iid`,`signed_text`,`signature`,`signer`) values (%d,'%s','%s','%s') ", intval($current_post), dbesc($dsprsig->signed_text), @@ -1008,6 +1019,7 @@ function tag_deliver($uid,$item_id) { $dlink = normalise_link($a->get_baseurl() . '/u/' . $u[0]['nickname']); + $cnt = preg_match_all('/[\@\!]\[url\=(.*?)\](.*?)\[\/url\]/ism',$item['body'],$matches,PREG_SET_ORDER); if($cnt) { foreach($matches as $mtch) { @@ -2973,12 +2985,15 @@ function atom_entry($item,$type,$author,$owner,$comment = false,$cid = 0) { if($item['app']) $o .= '' . "\r\n"; - if($item['guid']) - $o .= '' . $item['guid'] . '' . "\r\n"; + $dspr_enabled = intval(get_config('system','diaspora_enabled')); + if( $dspr_enabled) { + if($item['guid']) + $o .= '' . $item['guid'] . '' . "\r\n"; - if($item['signed_text']) { - $sign = base64_encode(json_encode(array('signed_text' => $item['signed_text'],'signature' => $item['signature'],'signer' => $item['signer']))); - $o .= '' . xmlify($sign) . '' . "\r\n"; + if($item['signed_text']) { + $sign = base64_encode(json_encode(array('signed_text' => $item['signed_text'],'signature' => $item['signature'],'signer' => $item['signer']))); + $o .= '' . xmlify($sign) . '' . "\r\n"; + } } $verb = construct_verb($item); @@ -3317,7 +3332,9 @@ function drop_item($id,$interactive = true) { // ignore the result } - // clean up item_id and sign meta-data tables + // clean up item_id and sign (Diaspora signature) meta-data tables + // Clean up the sign table even if Diaspora support is disabled. We may still need to + // clean it up if Diaspora support had been enabled in the past $r = q("DELETE FROM item_id where iid in (select id from item where parent = %d and uid = %d)", intval($item['id']), @@ -3359,40 +3376,8 @@ function drop_item($id,$interactive = true) { ); } - // Add a relayable_retraction signature for Diaspora. Note that we can't add a target_author_signature - // if the comment was deleted by a remote user. That should be ok, because if a remote user is deleting - // the comment, that means we're the home of the post, and Diaspora will only - // check the parent_author_signature of retractions that it doesn't have to relay further - // - // I don't think this function gets called for an "unlike," but I'll check anyway - $signed_text = $item['guid'] . ';' . ( ($item['verb'] === ACTIVITY_LIKE) ? 'Like' : 'Comment'); - - if(local_user() == $item['uid']) { - - $handle = $a->user['nickname'] . '@' . substr($a->get_baseurl(), strpos($a->get_baseurl(),'://') + 3); - $authorsig = base64_encode(rsa_sign($signed_text,$a->user['prvkey'],'sha256')); - } - else { - $r = q("SELECT `nick`, `url` FROM `contact` WHERE `id` = '%d' LIMIT 1", - $item['contact-id'] - ); - if(count($r)) { - // The below handle only works for NETWORK_DFRN. I think that's ok, because this function - // only handles DFRN deletes - $handle_baseurl_start = strpos($r['url'],'://') + 3; - $handle_baseurl_length = strpos($r['url'],'/profile') - $handle_baseurl_start; - $handle = $r['nick'] . '@' . substr($r['url'], $handle_baseurl_start, $handle_baseurl_length); - $authorsig = ''; - } - } - - if(isset($handle)) - q("insert into sign (`retract_iid`,`signed_text`,`signature`,`signer`) values (%d,'%s','%s','%s') ", - intval($item['id']), - dbesc($signed_text), - dbesc($authorsig), - dbesc($handle) - ); + // Add a relayable_retraction signature for Diaspora. + store_diaspora_retract_sig($item, $a->user, $a->get_baseurl()); } $drop_id = intval($item['id']); @@ -3479,4 +3464,52 @@ function posted_date_widget($url,$uid,$wall) { '$dates' => $ret )); return $o; -} \ No newline at end of file +} + + +function store_diaspora_retract_sig($item, $user, $baseurl) { + // Note that we can't add a target_author_signature + // if the comment was deleted by a remote user. That should be ok, because if a remote user is deleting + // the comment, that means we're the home of the post, and Diaspora will only + // check the parent_author_signature of retractions that it doesn't have to relay further + // + // I don't think this function gets called for an "unlike," but I'll check anyway + + $enabled = intval(get_config('system','diaspora_enabled')); + if(! $enabled) { + return; + } + + logger('drop_item: storing diaspora retraction signature'); + + $signed_text = $item['guid'] . ';' . ( ($item['verb'] === ACTIVITY_LIKE) ? 'Like' : 'Comment'); + + if(local_user() == $item['uid']) { + + $handle = $user['nickname'] . '@' . substr($baseurl, strpos($baseurl,'://') + 3); + $authorsig = base64_encode(rsa_sign($signed_text,$user['prvkey'],'sha256')); + } + else { + $r = q("SELECT `nick`, `url` FROM `contact` WHERE `id` = '%d' LIMIT 1", + $item['contact-id'] + ); + if(count($r)) { + // The below handle only works for NETWORK_DFRN. I think that's ok, because this function + // only handles DFRN deletes + $handle_baseurl_start = strpos($r['url'],'://') + 3; + $handle_baseurl_length = strpos($r['url'],'/profile') - $handle_baseurl_start; + $handle = $r['nick'] . '@' . substr($r['url'], $handle_baseurl_start, $handle_baseurl_length); + $authorsig = ''; + } + } + + if(isset($handle)) + q("insert into sign (`retract_iid`,`signed_text`,`signature`,`signer`) values (%d,'%s','%s','%s') ", + intval($item['id']), + dbesc($signed_text), + dbesc($authorsig), + dbesc($handle) + ); + + return; +} diff --git a/include/notifier.php b/include/notifier.php index f0a1940d4..fe6cc394e 100644 --- a/include/notifier.php +++ b/include/notifier.php @@ -709,11 +709,11 @@ function notifier_run($argv, $argc){ } break; case NETWORK_DIASPORA: - require_once('include/diaspora.php'); - if(get_config('system','dfrn_only') || (! get_config('system','diaspora_enabled'))) break; + require_once('include/diaspora.php'); + if($mail) { diaspora_send_mail($item,$owner,$contact); break; @@ -860,13 +860,17 @@ function notifier_run($argv, $argc){ } - // If the item was deleted, clean up the `sign` table + + // If the item was deleted, clean up the `sign` table (for Diaspora signatures) + // Do this even if Diaspora support is disabled, as it may have been enabled in + // the past if($target_item['deleted']) { $r = q("DELETE FROM sign where `retract_iid` = %d", intval($target_item['id']) ); } + logger('notifier: calling hooks', LOGGER_DEBUG); if($normal_mode) diff --git a/mod/item.php b/mod/item.php index 54f9fc06a..5c179bc7a 100644 --- a/mod/item.php +++ b/mod/item.php @@ -728,26 +728,13 @@ function item_post(&$a) { } - // 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; + // Store the comment signature information in case we need to relay to Diaspora + // May want to have this run for remote users too, in which case the function needs to be + // expanded + if($self) + store_diaspora_comment_sig($datarray, $a->user, $a->get_baseurl(), $parent_item, $post_id); - $authorsig = base64_encode(rsa_sign($signed_text,$a->user['prvkey'],'sha256')); - - 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; @@ -1038,3 +1025,38 @@ function handle_tag($a, &$body, &$inform, &$str_tags, $profile_uid, $tag) { return array('replaced' => $replaced, 'contact' => $r[0]); } + + +function store_diaspora_comment_sig($datarray, $user, $baseurl, $parent_item, $post_id) { + // We won't be able to sign Diaspora comments for authenticated visitors - we don't have their private key + + // May want to have this run for remote users too, in which case the function needs to be + // expanded + + $enabled = intval(get_config('system','diaspora_enabled')); + if(! $enabled) { + return; + } + + + logger('mod_item: storing diaspora comment signature'); + + require_once('include/bb2diaspora.php'); + $signed_body = html_entity_decode(bb2diaspora($datarray['body'])); + $myaddr = $user['nickname'] . '@' . substr($baseurl, strpos($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,$user['prvkey'],'sha256')); + + 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) + ); + + return; +} diff --git a/mod/like.php b/mod/like.php index 642e948fd..29a77aa13 100755 --- a/mod/like.php +++ b/mod/like.php @@ -121,57 +121,16 @@ function like_content(&$a) { intval($like_item['id']) ); - // Clean up the `sign` table + + // Clean up the Diaspora signatures for this like + // Go ahead and do it even if Diaspora support is disabled. We still want to clean up + // if it had been enabled in the past $r = q("DELETE FROM `sign` WHERE `iid` = %d", intval($like_item['id']) ); // Save the author information for the unlike in case we need to relay to Diaspora - // Note that we can only create a signature for a user of the local server. We don't have - // a key for remote users. That is ok, because if a remote user is "unlike"ing a post, it - // means we are the relay, and for relayable_retractions, Diaspora - // only checks the parent_author_signature if it doesn't have to relay further - // - // If $item['resource-id'] exists, it means the item is a photo. Diaspora doesn't support - // likes on photos, so don't bother. - - if(($activity === ACTIVITY_LIKE) && (! $item['resource-id'])) { - $signed_text = $like_item['guid'] . ';' . 'Like'; - - if( $contact['network'] === NETWORK_DIASPORA) - $diaspora_handle = $contact['addr']; - else { // Only works for NETWORK_DFRN - $contact_baseurl_start = strpos($contact['url'],'://') + 3; - $contact_baseurl_length = strpos($contact['url'],'/profile') - $contact_baseurl_start; - $contact_baseurl = substr($contact['url'], $contact_baseurl_start, $contact_baseurl_length); - $diaspora_handle = $contact['nick'] . '@' . $contact_baseurl; - - // Get contact's private key if he's a user of the local Friendica server - $r = q("SELECT `contact`.`uid` FROM `contact` WHERE `url` = '%s' AND `self` = 1 LIMIT 1", - dbesc($contact['url']) - ); - - if( $r) { - $contact_uid = $r['uid']; - $r = q("SELECT prvkey FROM user WHERE uid = %d LIMIT 1", - intval($contact_uid) - ); - - if( $r) - $authorsig = base64_encode(rsa_sign($signed_text,$r['prvkey'],'sha256')); - } - } - - if(! isset($authorsig)) - $authorsig = ''; - - q("insert into sign (`retract_iid`,`signed_text`,`signature`,`signer`) values (%d,'%s','%s','%s') ", - intval($like_item['id']), - dbesc($signed_text), - dbesc($authorsig), - dbesc($diaspora_handle) - ); - } + store_diaspora_like_retract_sig($activity, $item, $like_item, $contact); // proc_run('php',"include/notifier.php","like","$post_id"); // $post_id isn't defined here! @@ -252,10 +211,87 @@ EOT; // Save the author information for the like in case we need to relay to Diaspora + store_diaspora_like_sig($activity, $item, $like_item, $contact); + + + $arr['id'] = $post_id; + + call_hooks('post_local_end', $arr); + + proc_run('php',"include/notifier.php","like","$post_id"); + + killme(); +// return; // NOTREACHED +} + + +function store_diaspora_like_retract_sig($activity, $item, $like_item, $contact) { // Note that we can only create a signature for a user of the local server. We don't have // a key for remote users. That is ok, because if a remote user is "unlike"ing a post, it // means we are the relay, and for relayable_retractions, Diaspora // only checks the parent_author_signature if it doesn't have to relay further + // + // If $item['resource-id'] exists, it means the item is a photo. Diaspora doesn't support + // likes on photos, so don't bother. + + $enabled = intval(get_config('system','diaspora_enabled')); + if(! $enabled) + return; + + logger('mod_like: storing diaspora like retraction signature'); + + if(($activity === ACTIVITY_LIKE) && (! $item['resource-id'])) { + $signed_text = $like_item['guid'] . ';' . 'Like'; + + if( $contact['network'] === NETWORK_DIASPORA) + $diaspora_handle = $contact['addr']; + else { // Only works for NETWORK_DFRN + $contact_baseurl_start = strpos($contact['url'],'://') + 3; + $contact_baseurl_length = strpos($contact['url'],'/profile') - $contact_baseurl_start; + $contact_baseurl = substr($contact['url'], $contact_baseurl_start, $contact_baseurl_length); + $diaspora_handle = $contact['nick'] . '@' . $contact_baseurl; + + // Get contact's private key if he's a user of the local Friendica server + $r = q("SELECT `contact`.`uid` FROM `contact` WHERE `url` = '%s' AND `self` = 1 LIMIT 1", + dbesc($contact['url']) + ); + + if( $r) { + $contact_uid = $r['uid']; + $r = q("SELECT prvkey FROM user WHERE uid = %d LIMIT 1", + intval($contact_uid) + ); + + if( $r) + $authorsig = base64_encode(rsa_sign($signed_text,$r['prvkey'],'sha256')); + } + } + + if(! isset($authorsig)) + $authorsig = ''; + + q("insert into sign (`retract_iid`,`signed_text`,`signature`,`signer`) values (%d,'%s','%s','%s') ", + intval($like_item['id']), + dbesc($signed_text), + dbesc($authorsig), + dbesc($diaspora_handle) + ); + } + + return; +} + +function store_diaspora_like_sig($activity, $post_type, $contact, $post_id) { + // Note that we can only create a signature for a user of the local server. We don't have + // a key for remote users. That is ok, because if a remote user is "unlike"ing a post, it + // means we are the relay, and for relayable_retractions, Diaspora + // only checks the parent_author_signature if it doesn't have to relay further + + $enabled = intval(get_config('system','diaspora_enabled')); + if(! $enabled) + return; + + logger('mod_like: storing diaspora like signature'); if(($activity === ACTIVITY_LIKE) && ($post_type === t('status'))) { if( $contact['network'] === NETWORK_DIASPORA) @@ -308,13 +344,5 @@ EOT; } } - - $arr['id'] = $post_id; - - call_hooks('post_local_end', $arr); - - proc_run('php',"include/notifier.php","like","$post_id"); - - killme(); -// return; // NOTREACHED + return; } From c0c50ece0fa625b9b1c6bd89045b8f16057d8eb2 Mon Sep 17 00:00:00 2001 From: Zach Prezkuta Date: Tue, 12 Jun 2012 18:38:24 -0600 Subject: [PATCH 05/17] revert extra Diaspora disabling changes to try to eliminate Mustard double-posting --- include/delivery.php | 8 ++++---- include/items.php | 46 +++++++++++++++----------------------------- include/notifier.php | 12 ++++-------- 3 files changed, 23 insertions(+), 43 deletions(-) diff --git a/include/delivery.php b/include/delivery.php index b60fef3bf..815287668 100644 --- a/include/delivery.php +++ b/include/delivery.php @@ -113,7 +113,7 @@ function delivery_run($argv, $argc){ $uid = $r[0]['uid']; $updated = $r[0]['edited']; - // The following seems superfluous. We've already checked for "if (! intval($r[0]['parent']))" a few lines up + // POSSIBLE CLEANUP --> The following seems superfluous. We've already checked for "if (! intval($r[0]['parent']))" a few lines up if(! $parent_id) continue; @@ -492,9 +492,6 @@ function delivery_run($argv, $argc){ break; case NETWORK_DIASPORA : - if(get_config('system','dfrn_only') || (! get_config('system','diaspora_enabled')) || (! $normal_mode)) - break; - if($public_message) $loc = 'public batch ' . $contact['batch']; else @@ -502,6 +499,9 @@ function delivery_run($argv, $argc){ logger('delivery: diaspora batch deliver: ' . $loc); + if(get_config('system','dfrn_only') || (! get_config('system','diaspora_enabled')) || (! $normal_mode)) + break; + if((! $contact['pubkey']) && (! $public_message)) break; diff --git a/include/items.php b/include/items.php index af46eaaa1..7e8b8af4c 100755 --- a/include/items.php +++ b/include/items.php @@ -383,21 +383,16 @@ function get_atom_elements($feed,$item) { $res['app'] = 'OStatus'; } - // base64 encoded json structure representing Diaspora signature - $dspr_enabled = intval(get_config('system','diaspora_enabled')); - if( $dspr_enabled) { - $dsig = $item->get_item_tags(NAMESPACE_DFRN,'diaspora_signature'); - if($dsig) { - $res['dsprsig'] = unxmlify($dsig[0]['data']); - } - - $dguid = $item->get_item_tags(NAMESPACE_DFRN,'diaspora_guid'); - if($dguid) - $res['guid'] = unxmlify($dguid[0]['data']); + $dsig = $item->get_item_tags(NAMESPACE_DFRN,'diaspora_signature'); + if($dsig) { + $res['dsprsig'] = unxmlify($dsig[0]['data']); } + $dguid = $item->get_item_tags(NAMESPACE_DFRN,'diaspora_guid'); + if($dguid) + $res['guid'] = unxmlify($dguid[0]['data']); $bm = $item->get_item_tags(NAMESPACE_DFRN,'bookmark'); if($bm) @@ -704,17 +699,13 @@ function item_store($arr,$force_parent = false) { // If a Diaspora signature structure was passed in, pull it out of the // item array and set it aside for later storage. - $dspr_enabled = intval(get_config('system','diaspora_enabled')); $dsprsig = null; - if(x($arr,'dsprsig')) { - if($dspr_enabled) - $dsprsig = json_decode(base64_decode($arr['dsprsig'])); + $dsprsig = json_decode(base64_decode($arr['dsprsig'])); unset($arr['dsprsig']); } - if(x($arr, 'gravity')) $arr['gravity'] = intval($arr['gravity']); elseif($arr['parent-uri'] === $arr['uri']) @@ -943,9 +934,7 @@ function item_store($arr,$force_parent = false) { intval($parent_id) ); - - // Store the Diaspora signature if there is one - if($dspr_enabled && $dsprsig) { + if($dsprsig) { q("insert into sign (`iid`,`signed_text`,`signature`,`signer`) values (%d,'%s','%s','%s') ", intval($current_post), dbesc($dsprsig->signed_text), @@ -1019,7 +1008,6 @@ function tag_deliver($uid,$item_id) { $dlink = normalise_link($a->get_baseurl() . '/u/' . $u[0]['nickname']); - $cnt = preg_match_all('/[\@\!]\[url\=(.*?)\](.*?)\[\/url\]/ism',$item['body'],$matches,PREG_SET_ORDER); if($cnt) { foreach($matches as $mtch) { @@ -2280,6 +2268,7 @@ function local_delivery($importer,$data) { $is_a_remote_comment = false; + // POSSIBLE CLEANUP --> Why select so many fields when only forum_mode and wall are used? $r = q("select `item`.`id`, `item`.`uri`, `item`.`tag`, `item`.`forum_mode`,`item`.`origin`,`item`.`wall`, `contact`.`name`, `contact`.`url`, `contact`.`thumb` from `item` LEFT JOIN `contact` ON `contact`.`id` = `item`.`contact-id` @@ -2985,15 +2974,12 @@ function atom_entry($item,$type,$author,$owner,$comment = false,$cid = 0) { if($item['app']) $o .= '' . "\r\n"; - $dspr_enabled = intval(get_config('system','diaspora_enabled')); - if( $dspr_enabled) { - if($item['guid']) - $o .= '' . $item['guid'] . '' . "\r\n"; + if($item['guid']) + $o .= '' . $item['guid'] . '' . "\r\n"; - if($item['signed_text']) { - $sign = base64_encode(json_encode(array('signed_text' => $item['signed_text'],'signature' => $item['signature'],'signer' => $item['signer']))); - $o .= '' . xmlify($sign) . '' . "\r\n"; - } + if($item['signed_text']) { + $sign = base64_encode(json_encode(array('signed_text' => $item['signed_text'],'signature' => $item['signature'],'signer' => $item['signer']))); + $o .= '' . xmlify($sign) . '' . "\r\n"; } $verb = construct_verb($item); @@ -3332,9 +3318,7 @@ function drop_item($id,$interactive = true) { // ignore the result } - // clean up item_id and sign (Diaspora signature) meta-data tables - // Clean up the sign table even if Diaspora support is disabled. We may still need to - // clean it up if Diaspora support had been enabled in the past + // clean up item_id and sign meta-data tables $r = q("DELETE FROM item_id where iid in (select id from item where parent = %d and uid = %d)", intval($item['id']), diff --git a/include/notifier.php b/include/notifier.php index fe6cc394e..443cc3014 100644 --- a/include/notifier.php +++ b/include/notifier.php @@ -125,7 +125,7 @@ function notifier_run($argv, $argc){ $uid = $r[0]['uid']; $updated = $r[0]['edited']; - // The following seems superfluous. We've already checked for "if (! intval($r[0]['parent']))" a few lines up + // POSSIBLE CLEANUP --> The following seems superfluous. We've already checked for "if (! intval($r[0]['parent']))" a few lines up if(! $parent_id) return; @@ -709,11 +709,11 @@ function notifier_run($argv, $argc){ } break; case NETWORK_DIASPORA: + require_once('include/diaspora.php'); + if(get_config('system','dfrn_only') || (! get_config('system','diaspora_enabled'))) break; - require_once('include/diaspora.php'); - if($mail) { diaspora_send_mail($item,$owner,$contact); break; @@ -860,17 +860,13 @@ function notifier_run($argv, $argc){ } - - // If the item was deleted, clean up the `sign` table (for Diaspora signatures) - // Do this even if Diaspora support is disabled, as it may have been enabled in - // the past + // If the item was deleted, clean up the `sign` table if($target_item['deleted']) { $r = q("DELETE FROM sign where `retract_iid` = %d", intval($target_item['id']) ); } - logger('notifier: calling hooks', LOGGER_DEBUG); if($normal_mode) From 5773241537b09aa411c48b4d67eefcebb1ea9c84 Mon Sep 17 00:00:00 2001 From: Zach Prezkuta Date: Tue, 12 Jun 2012 19:05:01 -0600 Subject: [PATCH 06/17] add some debug logging --- include/items.php | 1 + mod/item.php | 1 + mod/like.php | 8 ++++++-- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/include/items.php b/include/items.php index 7e8b8af4c..7d51261db 100755 --- a/include/items.php +++ b/include/items.php @@ -3461,6 +3461,7 @@ function store_diaspora_retract_sig($item, $user, $baseurl) { $enabled = intval(get_config('system','diaspora_enabled')); if(! $enabled) { + logger('drop_item: diaspora support disabled, not storing retraction signature', LOGGER_DEBUG); return; } diff --git a/mod/item.php b/mod/item.php index 5c179bc7a..b8afe76d1 100644 --- a/mod/item.php +++ b/mod/item.php @@ -1035,6 +1035,7 @@ function store_diaspora_comment_sig($datarray, $user, $baseurl, $parent_item, $p $enabled = intval(get_config('system','diaspora_enabled')); if(! $enabled) { + logger('mod_item: diaspora support disabled, not storing comment signature', LOGGER_DEBUG); return; } diff --git a/mod/like.php b/mod/like.php index 29a77aa13..3c6dfa59b 100755 --- a/mod/like.php +++ b/mod/like.php @@ -235,8 +235,10 @@ function store_diaspora_like_retract_sig($activity, $item, $like_item, $contact) // likes on photos, so don't bother. $enabled = intval(get_config('system','diaspora_enabled')); - if(! $enabled) + if(! $enabled) { + logger('mod_like: diaspora support disabled, not storing like retraction signature', LOGGER_DEBUG); return; + } logger('mod_like: storing diaspora like retraction signature'); @@ -288,8 +290,10 @@ function store_diaspora_like_sig($activity, $post_type, $contact, $post_id) { // only checks the parent_author_signature if it doesn't have to relay further $enabled = intval(get_config('system','diaspora_enabled')); - if(! $enabled) + if(! $enabled) { + logger('mod_like: diaspora support disabled, not storing like signature', LOGGER_DEBUG); return; + } logger('mod_like: storing diaspora like signature'); From f495ba2bcbf3d80e6919672f0d0e5f375aa1a20d Mon Sep 17 00:00:00 2001 From: Zach Prezkuta Date: Sat, 16 Jun 2012 11:29:56 -0600 Subject: [PATCH 07/17] was passing the wrong arguments to the signature storage function --- mod/like.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mod/like.php b/mod/like.php index 3c6dfa59b..54d63b145 100755 --- a/mod/like.php +++ b/mod/like.php @@ -211,7 +211,7 @@ EOT; // Save the author information for the like in case we need to relay to Diaspora - store_diaspora_like_sig($activity, $item, $like_item, $contact); + store_diaspora_like_sig($activity, $post_type, $contact, $post_id); $arr['id'] = $post_id; From 9e8573507e311d139ac7c83dff496d85408d9b8d Mon Sep 17 00:00:00 2001 From: Zach Prezkuta Date: Sat, 23 Jun 2012 12:09:01 -0600 Subject: [PATCH 08/17] store signature info for remote users too --- mod/item.php | 35 ++++++++++++++++++++--------------- mod/like.php | 6 ++++-- 2 files changed, 24 insertions(+), 17 deletions(-) diff --git a/mod/item.php b/mod/item.php index b8afe76d1..000f46644 100644 --- a/mod/item.php +++ b/mod/item.php @@ -730,10 +730,7 @@ function item_post(&$a) { // Store the comment signature information in case we need to relay to Diaspora - // May want to have this run for remote users too, in which case the function needs to be - // expanded - if($self) - store_diaspora_comment_sig($datarray, $a->user, $a->get_baseurl(), $parent_item, $post_id); + store_diaspora_comment_sig($datarray, $author, ($self ? $a->user['prvkey'] : false), $parent_item, $post_id); } else { @@ -1027,12 +1024,9 @@ function handle_tag($a, &$body, &$inform, &$str_tags, $profile_uid, $tag) { } -function store_diaspora_comment_sig($datarray, $user, $baseurl, $parent_item, $post_id) { +function store_diaspora_comment_sig($datarray, $author, $uprvkey, $parent_item, $post_id) { // We won't be able to sign Diaspora comments for authenticated visitors - we don't have their private key - // May want to have this run for remote users too, in which case the function needs to be - // expanded - $enabled = intval(get_config('system','diaspora_enabled')); if(! $enabled) { logger('mod_item: diaspora support disabled, not storing comment signature', LOGGER_DEBUG); @@ -1044,19 +1038,30 @@ function store_diaspora_comment_sig($datarray, $user, $baseurl, $parent_item, $p require_once('include/bb2diaspora.php'); $signed_body = html_entity_decode(bb2diaspora($datarray['body'])); - $myaddr = $user['nickname'] . '@' . substr($baseurl, strpos($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,$user['prvkey'],'sha256')); +// $myaddr = $user['nickname'] . '@' . substr($baseurl, strpos($baseurl,'://') + 3); + if( $author['network'] === NETWORK_DIASPORA) + $diaspora_handle = $author['addr']; + else { + // Only works for NETWORK_DFRN + $contact_baseurl_start = strpos($author['url'],'://') + 3; + $contact_baseurl_length = strpos($author['url'],'/profile') - $contact_baseurl_start; + $contact_baseurl = substr($author['url'], $contact_baseurl_start, $contact_baseurl_length); + $diaspora_handle = $author['nick'] . '@' . $contact_baseurl; + } + + $signed_text = $datarray['guid'] . ';' . $parent_item['guid'] . ';' . $signed_body . ';' . $diaspora_handle; + + if( $uprvkey !== false ) + $authorsig = base64_encode(rsa_sign($signed_text,$uprvkey,'sha256')); + else + $authorsig = ''; 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) + dbesc($diaspora_handle) ); return; diff --git a/mod/like.php b/mod/like.php index 54d63b145..dce40a68e 100755 --- a/mod/like.php +++ b/mod/like.php @@ -247,7 +247,8 @@ function store_diaspora_like_retract_sig($activity, $item, $like_item, $contact) if( $contact['network'] === NETWORK_DIASPORA) $diaspora_handle = $contact['addr']; - else { // Only works for NETWORK_DFRN + else { + // Only works for NETWORK_DFRN $contact_baseurl_start = strpos($contact['url'],'://') + 3; $contact_baseurl_length = strpos($contact['url'],'/profile') - $contact_baseurl_start; $contact_baseurl = substr($contact['url'], $contact_baseurl_start, $contact_baseurl_length); @@ -300,7 +301,8 @@ function store_diaspora_like_sig($activity, $post_type, $contact, $post_id) { if(($activity === ACTIVITY_LIKE) && ($post_type === t('status'))) { if( $contact['network'] === NETWORK_DIASPORA) $diaspora_handle = $contact['addr']; - else { // Only works for NETWORK_DFRN + else { + // Only works for NETWORK_DFRN $contact_baseurl_start = strpos($contact['url'],'://') + 3; $contact_baseurl_length = strpos($contact['url'],'/profile') - $contact_baseurl_start; $contact_baseurl = substr($contact['url'], $contact_baseurl_start, $contact_baseurl_length); From 28526dbf2179619582bec5ab456b49f6ce3e8bd3 Mon Sep 17 00:00:00 2001 From: Zach Prezkuta Date: Sat, 23 Jun 2012 12:40:53 -0600 Subject: [PATCH 09/17] remove possibly unnecessary checks for likes or comments created by Diaspora users --- mod/item.php | 18 ++++++------ mod/like.php | 80 ++++++++++++++++++++++++++-------------------------- 2 files changed, 49 insertions(+), 49 deletions(-) diff --git a/mod/item.php b/mod/item.php index 000f46644..aa022d37d 100644 --- a/mod/item.php +++ b/mod/item.php @@ -1040,15 +1040,15 @@ function store_diaspora_comment_sig($datarray, $author, $uprvkey, $parent_item, $signed_body = html_entity_decode(bb2diaspora($datarray['body'])); // $myaddr = $user['nickname'] . '@' . substr($baseurl, strpos($baseurl,'://') + 3); - if( $author['network'] === NETWORK_DIASPORA) - $diaspora_handle = $author['addr']; - else { - // Only works for NETWORK_DFRN - $contact_baseurl_start = strpos($author['url'],'://') + 3; - $contact_baseurl_length = strpos($author['url'],'/profile') - $contact_baseurl_start; - $contact_baseurl = substr($author['url'], $contact_baseurl_start, $contact_baseurl_length); - $diaspora_handle = $author['nick'] . '@' . $contact_baseurl; - } +// if( $author['network'] === NETWORK_DIASPORA) +// $diaspora_handle = $author['addr']; +// else { + // Only works for NETWORK_DFRN + $contact_baseurl_start = strpos($author['url'],'://') + 3; + $contact_baseurl_length = strpos($author['url'],'/profile') - $contact_baseurl_start; + $contact_baseurl = substr($author['url'], $contact_baseurl_start, $contact_baseurl_length); + $diaspora_handle = $author['nick'] . '@' . $contact_baseurl; +// } $signed_text = $datarray['guid'] . ';' . $parent_item['guid'] . ';' . $signed_body . ';' . $diaspora_handle; diff --git a/mod/like.php b/mod/like.php index dce40a68e..1176c3110 100755 --- a/mod/like.php +++ b/mod/like.php @@ -245,30 +245,30 @@ function store_diaspora_like_retract_sig($activity, $item, $like_item, $contact) if(($activity === ACTIVITY_LIKE) && (! $item['resource-id'])) { $signed_text = $like_item['guid'] . ';' . 'Like'; - if( $contact['network'] === NETWORK_DIASPORA) - $diaspora_handle = $contact['addr']; - else { - // Only works for NETWORK_DFRN - $contact_baseurl_start = strpos($contact['url'],'://') + 3; - $contact_baseurl_length = strpos($contact['url'],'/profile') - $contact_baseurl_start; - $contact_baseurl = substr($contact['url'], $contact_baseurl_start, $contact_baseurl_length); - $diaspora_handle = $contact['nick'] . '@' . $contact_baseurl; +// if( $contact['network'] === NETWORK_DIASPORA) +// $diaspora_handle = $contact['addr']; +// else { + // Only works for NETWORK_DFRN + $contact_baseurl_start = strpos($contact['url'],'://') + 3; + $contact_baseurl_length = strpos($contact['url'],'/profile') - $contact_baseurl_start; + $contact_baseurl = substr($contact['url'], $contact_baseurl_start, $contact_baseurl_length); + $diaspora_handle = $contact['nick'] . '@' . $contact_baseurl; - // Get contact's private key if he's a user of the local Friendica server - $r = q("SELECT `contact`.`uid` FROM `contact` WHERE `url` = '%s' AND `self` = 1 LIMIT 1", - dbesc($contact['url']) + // Get contact's private key if he's a user of the local Friendica server + $r = q("SELECT `contact`.`uid` FROM `contact` WHERE `url` = '%s' AND `self` = 1 LIMIT 1", + dbesc($contact['url']) + ); + + if( $r) { + $contact_uid = $r['uid']; + $r = q("SELECT prvkey FROM user WHERE uid = %d LIMIT 1", + intval($contact_uid) ); - if( $r) { - $contact_uid = $r['uid']; - $r = q("SELECT prvkey FROM user WHERE uid = %d LIMIT 1", - intval($contact_uid) - ); - - if( $r) - $authorsig = base64_encode(rsa_sign($signed_text,$r['prvkey'],'sha256')); - } + if( $r) + $authorsig = base64_encode(rsa_sign($signed_text,$r['prvkey'],'sha256')); } +// } if(! isset($authorsig)) $authorsig = ''; @@ -299,30 +299,30 @@ function store_diaspora_like_sig($activity, $post_type, $contact, $post_id) { logger('mod_like: storing diaspora like signature'); if(($activity === ACTIVITY_LIKE) && ($post_type === t('status'))) { - if( $contact['network'] === NETWORK_DIASPORA) - $diaspora_handle = $contact['addr']; - else { - // Only works for NETWORK_DFRN - $contact_baseurl_start = strpos($contact['url'],'://') + 3; - $contact_baseurl_length = strpos($contact['url'],'/profile') - $contact_baseurl_start; - $contact_baseurl = substr($contact['url'], $contact_baseurl_start, $contact_baseurl_length); - $diaspora_handle = $contact['nick'] . '@' . $contact_baseurl; +// if( $contact['network'] === NETWORK_DIASPORA) +// $diaspora_handle = $contact['addr']; +// else { + // Only works for NETWORK_DFRN + $contact_baseurl_start = strpos($contact['url'],'://') + 3; + $contact_baseurl_length = strpos($contact['url'],'/profile') - $contact_baseurl_start; + $contact_baseurl = substr($contact['url'], $contact_baseurl_start, $contact_baseurl_length); + $diaspora_handle = $contact['nick'] . '@' . $contact_baseurl; - // Get contact's private key if he's a user of the local Friendica server - $r = q("SELECT `contact`.`uid` FROM `contact` WHERE `url` = '%s' AND `self` = 1 LIMIT 1", - dbesc($contact['url']) + // Get contact's private key if he's a user of the local Friendica server + $r = q("SELECT `contact`.`uid` FROM `contact` WHERE `url` = '%s' AND `self` = 1 LIMIT 1", + dbesc($contact['url']) + ); + + if( $r) { + $contact_uid = $r['uid']; + $r = q("SELECT prvkey FROM user WHERE uid = %d LIMIT 1", + intval($contact_uid) ); - if( $r) { - $contact_uid = $r['uid']; - $r = q("SELECT prvkey FROM user WHERE uid = %d LIMIT 1", - intval($contact_uid) - ); - - if( $r) - $contact_uprvkey = $r['prvkey']; - } + if( $r) + $contact_uprvkey = $r['prvkey']; } +// } $r = q("SELECT guid, parent FROM `item` WHERE id = %d LIMIT 1", intval($post_id) From f1991a59524ce36eea0b982954d90a6c55e59e41 Mon Sep 17 00:00:00 2001 From: friendica Date: Mon, 25 Jun 2012 18:15:56 -0700 Subject: [PATCH 10/17] propagate remote deletes --- include/items.php | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/include/items.php b/include/items.php index b90b5434f..7578bf155 100755 --- a/include/items.php +++ b/include/items.php @@ -2148,18 +2148,19 @@ function local_delivery($importer,$data) { } if($deleted) { + // check for relayed deletes to our conversation $is_reply = false; - $r = q("select * from item where uri = '%s' and id = parent limit 1", - dbesc($uri) + $r = q("select * from item where uri = '%s' and uid = %d limit 1", + dbesc($uri), + intval($importer['importer_uid']) ); if(count($r)) { $parent_uri = $r[0]['parent-uri']; - if($r[0]['parent-uri'] != $uri && $r[0]['thr-parent'] != $uri) + if($r[0]['id'] != $r[0]['parent']) $is_reply = true; } - if($is_reply) { $community = false; @@ -2295,8 +2296,10 @@ function local_delivery($importer,$data) { ); } } + // if this is a relayed delete, propagate it to other recipients + if($is_a_remote_delete) - proc_run('php',"include/notifier.php","delete",$item['id']); + proc_run('php',"include/notifier.php","drop",$item['id']); } } } From fbaca4b74237c80c380d6ccf2bdddeec5ad4f013 Mon Sep 17 00:00:00 2001 From: friendica Date: Mon, 25 Jun 2012 20:55:27 -0700 Subject: [PATCH 11/17] event summary/title --- boot.php | 2 +- database.sql | 10 +++++++++- include/bbcode.php | 1 + include/event.php | 16 ++++++++++++++-- mod/events.php | 14 +++++++++++--- update.php | 11 ++++++++++- view/event_form.tpl | 4 ++++ view/theme/diabook/jot.tpl | 2 +- view/theme/duepuntozero/style.css | 7 +++++++ 9 files changed, 58 insertions(+), 9 deletions(-) diff --git a/boot.php b/boot.php index 024ef0c05..47e5b8600 100644 --- a/boot.php +++ b/boot.php @@ -12,7 +12,7 @@ require_once('include/cache.php'); define ( 'FRIENDICA_PLATFORM', 'Friendica'); define ( 'FRIENDICA_VERSION', '3.0.1385' ); define ( 'DFRN_PROTOCOL_VERSION', '2.23' ); -define ( 'DB_UPDATE_VERSION', 1150 ); +define ( 'DB_UPDATE_VERSION', 1151 ); define ( 'EOL', "
\r\n" ); define ( 'ATOM_TIME', 'Y-m-d\TH:i:s\Z' ); diff --git a/database.sql b/database.sql index 8178ffa86..b3b8c3a06 100644 --- a/database.sql +++ b/database.sql @@ -254,6 +254,7 @@ CREATE TABLE IF NOT EXISTS `event` ( `edited` datetime NOT NULL, `start` datetime NOT NULL, `finish` datetime NOT NULL, + `summary` text NOT NULL, `desc` text NOT NULL, `location` text NOT NULL, `type` char(255) NOT NULL, @@ -263,7 +264,14 @@ CREATE TABLE IF NOT EXISTS `event` ( `allow_gid` mediumtext NOT NULL, `deny_cid` mediumtext NOT NULL, `deny_gid` mediumtext NOT NULL, - PRIMARY KEY (`id`) + PRIMARY KEY (`id`), + KEY `uid` ( `uid` ), + KEY `cid` ( `cid` ), + KEY `uri` ( `uri` ), + KEY `type` ( `type` ), + KEY `start` ( `start` ), + KEY `finish` ( `finish` ), + KEY `adjust` ( `adjust` ) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- -------------------------------------------------------- diff --git a/include/bbcode.php b/include/bbcode.php index e219d5383..effdd0be8 100644 --- a/include/bbcode.php +++ b/include/bbcode.php @@ -301,6 +301,7 @@ function bbcode($Text,$preserve_nl = false, $tryoembed = true) { if(x($ev,'desc') && x($ev,'start')) { $sub = format_event_html($ev); + $Text = preg_replace("/\[event\-summary\](.*?)\[\/event\-summary\]/ism",'',$Text); $Text = preg_replace("/\[event\-description\](.*?)\[\/event\-description\]/ism",$sub,$Text); $Text = preg_replace("/\[event\-start\](.*?)\[\/event\-start\]/ism",'',$Text); $Text = preg_replace("/\[event\-finish\](.*?)\[\/event\-finish\]/ism",'',$Text); diff --git a/include/event.php b/include/event.php index 866ae8c3f..8aef0a263 100644 --- a/include/event.php +++ b/include/event.php @@ -12,6 +12,9 @@ function format_event_html($ev) { $o = '
' . "\r\n"; + + $o .= '

' . bbcode($ev['summary']) . '

' . "\r\n"; + $o .= '

' . bbcode($ev['desc']) . '

' . "\r\n"; $o .= '

' . t('Starts:') . ' get_baseurl().'/events/event/'.$rr['id'],t('Edit event'),'','') : null); - - list($title, $_trash) = explode(" $eid, '$cid' => $cid, '$uri' => $uri, + '$title' => t('Event details'), '$desc' => sprintf( t('Format is %s %s. Starting date and Description are required.'),$dateformat,$timeformat), @@ -422,6 +428,8 @@ function events_content(&$a) { '$d_orig' => $d_orig, '$l_text' => t('Location:'), '$l_orig' => $l_orig, + '$t_text' => t('Title:'), + '$t_orig' => $t_orig, '$sh_text' => t('Share this event'), '$sh_checked' => $sh_checked, '$acl' => (($cid) ? '' : populate_acl(((x($orig_event)) ? $orig_event : $a->user),false)), diff --git a/update.php b/update.php index eeb8b07b1..b8e247f57 100644 --- a/update.php +++ b/update.php @@ -1,6 +1,6 @@

+
$t_text
+ + +
$d_text
diff --git a/view/theme/diabook/jot.tpl b/view/theme/diabook/jot.tpl index 79151aeed..1d94cb6d3 100755 --- a/view/theme/diabook/jot.tpl +++ b/view/theme/diabook/jot.tpl @@ -70,7 +70,7 @@
$acl -
+
$emailcc
$jotnets diff --git a/view/theme/duepuntozero/style.css b/view/theme/duepuntozero/style.css index ea3a2da9c..41c747045 100644 --- a/view/theme/duepuntozero/style.css +++ b/view/theme/duepuntozero/style.css @@ -2424,6 +2424,13 @@ aside input[type='text'] { .vevent { border: 1px solid #CCCCCC; } + +.vevent .event-summary { + margin-left: 10px; + margin-right: 10px; + font-weight: bold; +} + .vevent .event-description, .vevent .event-location { margin-left: 10px; margin-right: 10px; From 359a98cd22318badd9c5bb1115678181b75c9edc Mon Sep 17 00:00:00 2001 From: friendica Date: Mon, 25 Jun 2012 21:20:08 -0700 Subject: [PATCH 12/17] change event behaviour so that title is required but description is not --- include/bbcode.php | 4 ++-- mod/events.php | 12 ++++++------ view/theme/duepuntozero/style.css | 24 ++++++++++++++++++++++++ 3 files changed, 32 insertions(+), 8 deletions(-) diff --git a/include/bbcode.php b/include/bbcode.php index effdd0be8..c64d5d036 100644 --- a/include/bbcode.php +++ b/include/bbcode.php @@ -302,8 +302,8 @@ function bbcode($Text,$preserve_nl = false, $tryoembed = true) { $sub = format_event_html($ev); $Text = preg_replace("/\[event\-summary\](.*?)\[\/event\-summary\]/ism",'',$Text); - $Text = preg_replace("/\[event\-description\](.*?)\[\/event\-description\]/ism",$sub,$Text); - $Text = preg_replace("/\[event\-start\](.*?)\[\/event\-start\]/ism",'',$Text); + $Text = preg_replace("/\[event\-description\](.*?)\[\/event\-description\]/ism",'',$Text); + $Text = preg_replace("/\[event\-start\](.*?)\[\/event\-start\]/ism",$sub,$Text); $Text = preg_replace("/\[event\-finish\](.*?)\[\/event\-finish\]/ism",'',$Text); $Text = preg_replace("/\[event\-location\](.*?)\[\/event\-location\]/ism",'',$Text); $Text = preg_replace("/\[event\-adjust\](.*?)\[\/event\-adjust\]/ism",'',$Text); diff --git a/mod/events.php b/mod/events.php index e7b95d27a..4a6d3f100 100755 --- a/mod/events.php +++ b/mod/events.php @@ -62,8 +62,8 @@ function events_post(&$a) { $location = escape_tags(trim($_POST['location'])); $type = 'event'; - if((! $desc) || (! $start)) { - notice( t('Event description and start time are required.') . EOL); + if((! $summary) || (! $start)) { + notice( t('Event title and start time are required.') . EOL); goaway($a->get_baseurl() . '/events/new'); } @@ -412,9 +412,9 @@ function events_content(&$a) { '$uri' => $uri, '$title' => t('Event details'), - '$desc' => sprintf( t('Format is %s %s. Starting date and Description are required.'),$dateformat,$timeformat), + '$desc' => sprintf( t('Format is %s %s. Starting date and Title are required.'),$dateformat,$timeformat), - '$s_text' => t('Event Starts:') . ' * ', + '$s_text' => t('Event Starts:') . ' *', '$s_dsel' => datesel($f,'start',$syear+5,$syear,false,$syear,$smonth,$sday), '$s_tsel' => timesel('start',$shour,$sminute), '$n_text' => t('Finish date/time is not known or not relevant'), @@ -424,11 +424,11 @@ function events_content(&$a) { '$f_tsel' => timesel('finish',$fhour,$fminute), '$a_text' => t('Adjust for viewer timezone'), '$a_checked' => $a_checked, - '$d_text' => t('Description:') . ' *', + '$d_text' => t('Description:'), '$d_orig' => $d_orig, '$l_text' => t('Location:'), '$l_orig' => $l_orig, - '$t_text' => t('Title:'), + '$t_text' => t('Title:') . ' *', '$t_orig' => $t_orig, '$sh_text' => t('Share this event'), '$sh_checked' => $sh_checked, diff --git a/view/theme/duepuntozero/style.css b/view/theme/duepuntozero/style.css index 41c747045..997c6d315 100644 --- a/view/theme/duepuntozero/style.css +++ b/view/theme/duepuntozero/style.css @@ -2421,6 +2421,30 @@ aside input[type='text'] { font-size: 20px; } +#event-summary-text { + margin-top: 15px; +} + +#event-share-checkbox { + float: left; + margin-top: 10px; +} + +#event-share-text { + float: left; + margin-top: 10px; + margin-left: 5px; +} + +#event-share-break { + clear: both; + margin-bottom: 10px; +} + +#event-summary { + width: 400px; +} + .vevent { border: 1px solid #CCCCCC; } From 0f0ffce1b652897663ec5a8bea9a5c6a4fd37b0d Mon Sep 17 00:00:00 2001 From: friendica Date: Mon, 25 Jun 2012 21:27:34 -0700 Subject: [PATCH 13/17] change required doco --- include/bbcode.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/include/bbcode.php b/include/bbcode.php index c64d5d036..dcffe82c5 100644 --- a/include/bbcode.php +++ b/include/bbcode.php @@ -1,4 +1,4 @@ - Date: Mon, 25 Jun 2012 21:37:38 -0700 Subject: [PATCH 14/17] add event titles to discovered birthday events --- include/datetime.php | 9 ++++++--- include/items.php | 8 +++++--- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/include/datetime.php b/include/datetime.php index 58a618610..e3e9b9dbf 100644 --- a/include/datetime.php +++ b/include/datetime.php @@ -447,11 +447,13 @@ function update_contact_birthdays() { * */ - $bdtext = t('Birthday:') . ' [url=' . $rr['url'] . ']' . $rr['name'] . '[/url]' ; + $bdtext = sprintf( t('%s\'s birthday'), $rr['name']); + $bdtext2 = sprintf( t('Happy Birthday %s'), ' [url=' . $rr['url'] . ']' . $rr['name'] . '[/url]' ; - $r = q("INSERT INTO `event` (`uid`,`cid`,`created`,`edited`,`start`,`finish`,`desc`,`type`,`adjust`) - VALUES ( %d, %d, '%s', '%s', '%s', '%s', '%s', '%s', '%d' ) ", + + $r = q("INSERT INTO `event` (`uid`,`cid`,`created`,`edited`,`start`,`finish`,`summary`,`desc`,`type`,`adjust`) + VALUES ( %d, %d, '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%d' ) ", intval($rr['uid']), intval($rr['id']), dbesc(datetime_convert()), @@ -459,6 +461,7 @@ function update_contact_birthdays() { dbesc(datetime_convert('UTC','UTC', $nextbd)), dbesc(datetime_convert('UTC','UTC', $nextbd . ' + 1 day ')), dbesc($bdtext), + dbesc($bdtext2), dbesc('birthday'), intval(0) ); diff --git a/include/items.php b/include/items.php index e19d729ba..a4faf3adc 100755 --- a/include/items.php +++ b/include/items.php @@ -1457,11 +1457,12 @@ function consume_feed($xml,$importer,&$contact, &$hub, $datedir = 0, $pass = 0) * */ - $bdtext = t('Birthday:') . ' [url=' . $contact['url'] . ']' . $contact['name'] . '[/url]' ; + $bdtext = sprintf( t('%s\'s birthday'), $contact['name']); + $bdtext2 = sprintf( t('Happy Birthday %s'), ' [url=' . $contact['url'] . ']' . $contact['name'] . '[/url]' ; - $r = q("INSERT INTO `event` (`uid`,`cid`,`created`,`edited`,`start`,`finish`,`desc`,`type`) - VALUES ( %d, %d, '%s', '%s', '%s', '%s', '%s', '%s' ) ", + $r = q("INSERT INTO `event` (`uid`,`cid`,`created`,`edited`,`start`,`finish`,`summary`,`desc`,`type`) + VALUES ( %d, %d, '%s', '%s', '%s', '%s', '%s', '%s', '%s' ) ", intval($contact['uid']), intval($contact['id']), dbesc(datetime_convert()), @@ -1469,6 +1470,7 @@ function consume_feed($xml,$importer,&$contact, &$hub, $datedir = 0, $pass = 0) dbesc(datetime_convert('UTC','UTC', $birthday)), dbesc(datetime_convert('UTC','UTC', $birthday . ' + 1 day ')), dbesc($bdtext), + dbesc($bdtext2), dbesc('birthday') ); From d32d0e21544ffc487042f855280f05ba63651e7d Mon Sep 17 00:00:00 2001 From: friendica Date: Mon, 25 Jun 2012 21:39:07 -0700 Subject: [PATCH 15/17] typos --- include/datetime.php | 2 +- include/items.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/datetime.php b/include/datetime.php index e3e9b9dbf..75ae685f3 100644 --- a/include/datetime.php +++ b/include/datetime.php @@ -448,7 +448,7 @@ function update_contact_birthdays() { */ $bdtext = sprintf( t('%s\'s birthday'), $rr['name']); - $bdtext2 = sprintf( t('Happy Birthday %s'), ' [url=' . $rr['url'] . ']' . $rr['name'] . '[/url]' ; + $bdtext2 = sprintf( t('Happy Birthday %s'), ' [url=' . $rr['url'] . ']' . $rr['name'] . '[/url]') ; diff --git a/include/items.php b/include/items.php index a4faf3adc..1f0571968 100755 --- a/include/items.php +++ b/include/items.php @@ -1458,7 +1458,7 @@ function consume_feed($xml,$importer,&$contact, &$hub, $datedir = 0, $pass = 0) */ $bdtext = sprintf( t('%s\'s birthday'), $contact['name']); - $bdtext2 = sprintf( t('Happy Birthday %s'), ' [url=' . $contact['url'] . ']' . $contact['name'] . '[/url]' ; + $bdtext2 = sprintf( t('Happy Birthday %s'), ' [url=' . $contact['url'] . ']' . $contact['name'] . '[/url]' ) ; $r = q("INSERT INTO `event` (`uid`,`cid`,`created`,`edited`,`start`,`finish`,`summary`,`desc`,`type`) From a4b407eb54c67a0c9b8137b44fbd20b43eccb224 Mon Sep 17 00:00:00 2001 From: friendica Date: Mon, 25 Jun 2012 22:01:32 -0700 Subject: [PATCH 16/17] stray s --- include/bbcode.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/bbcode.php b/include/bbcode.php index dcffe82c5..ee31b4a1a 100644 --- a/include/bbcode.php +++ b/include/bbcode.php @@ -1,4 +1,4 @@ -s Date: Tue, 26 Jun 2012 18:30:20 -0700 Subject: [PATCH 17/17] service class restrict the email connector --- boot.php | 2 +- mod/settings.php | 27 ++++------ util/messages.po | 129 +++++++++++++++++++++++++++-------------------- 3 files changed, 83 insertions(+), 75 deletions(-) diff --git a/boot.php b/boot.php index 47e5b8600..3d7e0c488 100644 --- a/boot.php +++ b/boot.php @@ -10,7 +10,7 @@ require_once('include/nav.php'); require_once('include/cache.php'); define ( 'FRIENDICA_PLATFORM', 'Friendica'); -define ( 'FRIENDICA_VERSION', '3.0.1385' ); +define ( 'FRIENDICA_VERSION', '3.0.1386' ); define ( 'DFRN_PROTOCOL_VERSION', '2.23' ); define ( 'DB_UPDATE_VERSION', 1151 ); diff --git a/mod/settings.php b/mod/settings.php index 92593d7a8..b1c3cf7d4 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -677,6 +677,14 @@ function settings_content(&$a) { $tpl = get_markup_template("settings_connectors.tpl"); + + if(! service_class_allows(local_user(),'email_connect')) { + $mail_disabled_message = upgrade_bool_message(); + } + else { + $mail_disabled_message = (($mail_disabled) ? t('Email access is disabled on this site.') : ''); + } + $o .= replace_macros($tpl, array( '$form_security_token' => get_form_security_token("settings_connectors"), @@ -688,7 +696,7 @@ function settings_content(&$a) { '$h_imap' => t('Email/Mailbox Setup'), '$imap_desc' => t("If you wish to communicate with email contacts using this service \x28optional\x29, please specify how to connect to your mailbox."), '$imap_lastcheck' => array('imap_lastcheck', t('Last successful email check:'), $mail_chk,''), - '$mail_disabled' => (($mail_disabled) ? t('Email access is disabled on this site.') : ''), + '$mail_disabled' => $mail_disabled_message, '$mail_server' => array('mail_server', t('IMAP server name:'), $mail_server, ''), '$mail_port' => array('mail_port', t('IMAP port:'), $mail_port, ''), '$mail_ssl' => array('mail_ssl', t('Security:'), strtoupper($mail_ssl), '', array( 'notls'=>t('None'), 'TLS'=>'TLS', 'SSL'=>'SSL')), @@ -921,18 +929,12 @@ function settings_content(&$a) { )); - - - $invisible = (((! $profile['publish']) && (! $profile['net-publish'])) ? true : false); if($invisible) info( t('Profile is not published.') . EOL ); - - - $subdir = ((strlen($a->get_path())) ? '
' . t('or') . ' ' . $a->get_baseurl(true) . '/profile/' . $nickname : ''); @@ -1029,17 +1031,6 @@ function settings_content(&$a) { '$h_descadvn' => t('Change the behaviour of this account for special situations'), '$pagetype' => $pagetype, - - - - - - - - - - - )); call_hooks('settings_form',$o); diff --git a/util/messages.po b/util/messages.po index d9a462446..0ce5eb526 100644 --- a/util/messages.po +++ b/util/messages.po @@ -6,9 +6,9 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: 3.0.1385\n" +"Project-Id-Version: 3.0.1386\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2012-06-25 10:00-0700\n" +"POT-Creation-Date: 2012-06-26 10:00-0700\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -35,7 +35,7 @@ msgid "Contact update failed." msgstr "" #: ../../mod/crepair.php:115 ../../mod/wall_attach.php:44 -#: ../../mod/fsuggest.php:78 ../../mod/events.php:138 ../../mod/api.php:26 +#: ../../mod/fsuggest.php:78 ../../mod/events.php:140 ../../mod/api.php:26 #: ../../mod/api.php:31 ../../mod/photos.php:135 ../../mod/photos.php:951 #: ../../mod/editpost.php:10 ../../mod/install.php:151 #: ../../mod/notifications.php:66 ../../mod/contacts.php:145 @@ -56,7 +56,7 @@ msgstr "" #: ../../mod/suggest.php:28 ../../mod/invite.php:13 ../../mod/invite.php:81 #: ../../mod/dfrn_confirm.php:53 ../../addon/facebook/facebook.php:508 #: ../../addon/facebook/facebook.php:514 ../../addon/dav/layout.fnk.php:353 -#: ../../include/items.php:3411 ../../index.php:309 +#: ../../include/items.php:3447 ../../index.php:309 msgid "Permission denied." msgstr "" @@ -123,7 +123,7 @@ msgid "New photo from this URL" msgstr "" #: ../../mod/crepair.php:166 ../../mod/fsuggest.php:107 -#: ../../mod/events.php:428 ../../mod/photos.php:986 ../../mod/photos.php:1057 +#: ../../mod/events.php:436 ../../mod/photos.php:986 ../../mod/photos.php:1057 #: ../../mod/photos.php:1303 ../../mod/photos.php:1343 #: ../../mod/photos.php:1383 ../../mod/photos.php:1414 #: ../../mod/install.php:246 ../../mod/install.php:284 @@ -194,7 +194,7 @@ msgstr "" msgid "File exceeds size limit of %d" msgstr "" -#: ../../mod/wall_attach.php:86 ../../mod/wall_attach.php:97 +#: ../../mod/wall_attach.php:99 ../../mod/wall_attach.php:110 msgid "File upload failed." msgstr "" @@ -211,79 +211,87 @@ msgstr "" msgid "Suggest a friend for %s" msgstr "" -#: ../../mod/events.php:65 -msgid "Event description and start time are required." +#: ../../mod/events.php:66 +msgid "Event title and start time are required." msgstr "" -#: ../../mod/events.php:258 +#: ../../mod/events.php:260 msgid "l, F j" msgstr "" -#: ../../mod/events.php:280 +#: ../../mod/events.php:282 msgid "Edit event" msgstr "" -#: ../../mod/events.php:300 ../../include/text.php:1065 +#: ../../mod/events.php:304 ../../include/text.php:1065 msgid "link to source" msgstr "" -#: ../../mod/events.php:324 ../../view/theme/diabook/theme.php:131 +#: ../../mod/events.php:328 ../../view/theme/diabook/theme.php:131 #: ../../include/nav.php:52 ../../boot.php:1546 msgid "Events" msgstr "" -#: ../../mod/events.php:325 +#: ../../mod/events.php:329 msgid "Create New Event" msgstr "" -#: ../../mod/events.php:326 ../../addon/dav/layout.fnk.php:154 +#: ../../mod/events.php:330 ../../addon/dav/layout.fnk.php:154 msgid "Previous" msgstr "" -#: ../../mod/events.php:327 ../../mod/install.php:205 +#: ../../mod/events.php:331 ../../mod/install.php:205 #: ../../addon/dav/layout.fnk.php:157 msgid "Next" msgstr "" -#: ../../mod/events.php:399 +#: ../../mod/events.php:404 msgid "hour:minute" msgstr "" -#: ../../mod/events.php:408 +#: ../../mod/events.php:414 msgid "Event details" msgstr "" -#: ../../mod/events.php:409 +#: ../../mod/events.php:415 #, php-format -msgid "Format is %s %s. Starting date and Description are required." +msgid "Format is %s %s. Starting date and Title are required." msgstr "" -#: ../../mod/events.php:411 +#: ../../mod/events.php:417 msgid "Event Starts:" msgstr "" -#: ../../mod/events.php:414 +#: ../../mod/events.php:417 ../../mod/events.php:431 +msgid "Required" +msgstr "" + +#: ../../mod/events.php:420 msgid "Finish date/time is not known or not relevant" msgstr "" -#: ../../mod/events.php:416 +#: ../../mod/events.php:422 msgid "Event Finishes:" msgstr "" -#: ../../mod/events.php:419 +#: ../../mod/events.php:425 msgid "Adjust for viewer timezone" msgstr "" -#: ../../mod/events.php:421 +#: ../../mod/events.php:427 msgid "Description:" msgstr "" -#: ../../mod/events.php:423 ../../include/event.php:37 -#: ../../include/bb2diaspora.php:355 ../../boot.php:1126 +#: ../../mod/events.php:429 ../../include/event.php:40 +#: ../../include/bb2diaspora.php:357 ../../boot.php:1126 msgid "Location:" msgstr "" -#: ../../mod/events.php:425 +#: ../../mod/events.php:431 +msgid "Title:" +msgstr "" + +#: ../../mod/events.php:433 msgid "Share this event" msgstr "" @@ -407,7 +415,7 @@ msgstr "" msgid "was tagged in a" msgstr "" -#: ../../mod/photos.php:591 ../../mod/like.php:185 ../../mod/tagger.php:70 +#: ../../mod/photos.php:591 ../../mod/like.php:144 ../../mod/tagger.php:70 #: ../../addon/communityhome/communityhome.php:163 #: ../../view/theme/diabook/theme.php:570 ../../include/text.php:1316 #: ../../include/diaspora.php:1710 ../../include/conversation.php:53 @@ -428,12 +436,12 @@ msgid "Image file is empty." msgstr "" #: ../../mod/photos.php:736 ../../mod/profile_photo.php:126 -#: ../../mod/wall_upload.php:86 +#: ../../mod/wall_upload.php:99 msgid "Unable to process image." msgstr "" #: ../../mod/photos.php:757 ../../mod/profile_photo.php:259 -#: ../../mod/wall_upload.php:105 +#: ../../mod/wall_upload.php:118 msgid "Image upload failed." msgstr "" @@ -837,7 +845,7 @@ msgstr "" msgid "Confirm" msgstr "" -#: ../../mod/dfrn_request.php:715 ../../include/items.php:2805 +#: ../../mod/dfrn_request.php:715 ../../include/items.php:2873 msgid "[Name Withheld]" msgstr "" @@ -1163,7 +1171,7 @@ msgid "" msgstr "" #: ../../mod/localtime.php:12 ../../include/event.php:11 -#: ../../include/bb2diaspora.php:333 +#: ../../include/bb2diaspora.php:335 msgid "l F d, Y \\@ g:i A" msgstr "" @@ -1739,7 +1747,7 @@ msgstr "" #: ../../addon/facebook/facebook.php:700 #: ../../addon/facebook/facebook.php:1190 #: ../../addon/public_server/public_server.php:62 -#: ../../addon/testdrive/testdrive.php:67 ../../include/items.php:2814 +#: ../../addon/testdrive/testdrive.php:67 ../../include/items.php:2882 #: ../../boot.php:720 msgid "Administrator" msgstr "" @@ -2788,7 +2796,7 @@ msgstr "" msgid "People Search" msgstr "" -#: ../../mod/like.php:185 ../../mod/like.php:260 ../../mod/tagger.php:70 +#: ../../mod/like.php:144 ../../mod/like.php:301 ../../mod/tagger.php:70 #: ../../addon/facebook/facebook.php:1584 #: ../../addon/communityhome/communityhome.php:158 #: ../../addon/communityhome/communityhome.php:167 @@ -2799,7 +2807,7 @@ msgstr "" msgid "status" msgstr "" -#: ../../mod/like.php:202 ../../addon/facebook/facebook.php:1588 +#: ../../mod/like.php:161 ../../addon/facebook/facebook.php:1588 #: ../../addon/communityhome/communityhome.php:172 #: ../../view/theme/diabook/theme.php:579 ../../include/diaspora.php:1726 #: ../../include/conversation.php:65 @@ -2807,14 +2815,14 @@ msgstr "" msgid "%1$s likes %2$s's %3$s" msgstr "" -#: ../../mod/like.php:204 ../../include/conversation.php:68 +#: ../../mod/like.php:163 ../../include/conversation.php:68 #, php-format msgid "%1$s doesn't like %2$s's %3$s" msgstr "" #: ../../mod/notice.php:15 ../../mod/viewsrc.php:15 ../../mod/admin.php:159 #: ../../mod/admin.php:700 ../../mod/admin.php:899 ../../mod/display.php:37 -#: ../../mod/display.php:142 ../../include/items.php:3258 +#: ../../mod/display.php:142 ../../include/items.php:3326 msgid "Item not found." msgstr "" @@ -2852,34 +2860,34 @@ msgstr "" msgid "Empty post discarded." msgstr "" -#: ../../mod/item.php:379 ../../mod/wall_upload.php:102 -#: ../../mod/wall_upload.php:111 ../../mod/wall_upload.php:118 +#: ../../mod/item.php:379 ../../mod/wall_upload.php:115 +#: ../../mod/wall_upload.php:124 ../../mod/wall_upload.php:131 #: ../../include/message.php:144 msgid "Wall Photos" msgstr "" -#: ../../mod/item.php:800 +#: ../../mod/item.php:784 msgid "System error. Post not saved." msgstr "" -#: ../../mod/item.php:825 +#: ../../mod/item.php:809 #, php-format msgid "" "This message was sent to you by %s, a member of the Friendica social network." msgstr "" -#: ../../mod/item.php:827 +#: ../../mod/item.php:811 #, php-format msgid "You may visit them online at %s" msgstr "" -#: ../../mod/item.php:828 +#: ../../mod/item.php:812 msgid "" "Please contact the sender by replying to this post if you do not wish to " "receive these messages." msgstr "" -#: ../../mod/item.php:830 +#: ../../mod/item.php:814 #, php-format msgid "%s posted an update." msgstr "" @@ -6127,8 +6135,7 @@ msgstr "" msgid "j F" msgstr "" -#: ../../include/profile_advanced.php:30 ../../include/datetime.php:450 -#: ../../include/items.php:1460 +#: ../../include/profile_advanced.php:30 msgid "Birthday:" msgstr "" @@ -6501,11 +6508,11 @@ msgstr "" msgid "Ask me" msgstr "" -#: ../../include/event.php:17 ../../include/bb2diaspora.php:339 +#: ../../include/event.php:20 ../../include/bb2diaspora.php:341 msgid "Starts:" msgstr "" -#: ../../include/event.php:27 ../../include/bb2diaspora.php:347 +#: ../../include/event.php:30 ../../include/bb2diaspora.php:349 msgid "Finishes:" msgstr "" @@ -6982,15 +6989,25 @@ msgstr "" msgid "%1$d %2$s ago" msgstr "" +#: ../../include/datetime.php:450 ../../include/items.php:1460 +#, php-format +msgid "%s's birthday" +msgstr "" + +#: ../../include/datetime.php:451 ../../include/items.php:1461 +#, php-format +msgid "Happy Birthday %s" +msgstr "" + #: ../../include/onepoll.php:399 msgid "From: " msgstr "" -#: ../../include/bbcode.php:214 ../../include/bbcode.php:234 +#: ../../include/bbcode.php:216 ../../include/bbcode.php:236 msgid "$1 wrote:" msgstr "" -#: ../../include/bbcode.php:249 ../../include/bbcode.php:322 +#: ../../include/bbcode.php:251 ../../include/bbcode.php:328 msgid "Image/photo" msgstr "" @@ -7231,15 +7248,15 @@ msgstr "" msgid "following" msgstr "" -#: ../../include/items.php:2812 +#: ../../include/items.php:2880 msgid "A new person is sharing with you at " msgstr "" -#: ../../include/items.php:2812 +#: ../../include/items.php:2880 msgid "You have a new follower at " msgstr "" -#: ../../include/items.php:3476 +#: ../../include/items.php:3512 msgid "Archives" msgstr "" @@ -7582,15 +7599,15 @@ msgstr "" msgid "permissions" msgstr "" -#: ../../include/plugin.php:385 +#: ../../include/plugin.php:388 ../../include/plugin.php:390 msgid "Click here to upgrade." msgstr "" -#: ../../include/plugin.php:393 +#: ../../include/plugin.php:396 msgid "This action exceeds the limits set by your subscription plan." msgstr "" -#: ../../include/plugin.php:398 +#: ../../include/plugin.php:401 msgid "This action is not available under your subscription plan." msgstr ""