service class restrict the email connector

This commit is contained in:
friendica 2012-06-26 18:30:20 -07:00
parent a4b407eb54
commit b02c733967
3 changed files with 83 additions and 75 deletions

View File

@ -10,7 +10,7 @@ require_once('include/nav.php');
require_once('include/cache.php'); require_once('include/cache.php');
define ( 'FRIENDICA_PLATFORM', 'Friendica'); define ( 'FRIENDICA_PLATFORM', 'Friendica');
define ( 'FRIENDICA_VERSION', '3.0.1385' ); define ( 'FRIENDICA_VERSION', '3.0.1386' );
define ( 'DFRN_PROTOCOL_VERSION', '2.23' ); define ( 'DFRN_PROTOCOL_VERSION', '2.23' );
define ( 'DB_UPDATE_VERSION', 1151 ); define ( 'DB_UPDATE_VERSION', 1151 );

View File

@ -677,6 +677,14 @@ function settings_content(&$a) {
$tpl = get_markup_template("settings_connectors.tpl"); $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( $o .= replace_macros($tpl, array(
'$form_security_token' => get_form_security_token("settings_connectors"), '$form_security_token' => get_form_security_token("settings_connectors"),
@ -688,7 +696,7 @@ function settings_content(&$a) {
'$h_imap' => t('Email/Mailbox Setup'), '$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_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,''), '$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_server' => array('mail_server', t('IMAP server name:'), $mail_server, ''),
'$mail_port' => array('mail_port', t('IMAP port:'), $mail_port, ''), '$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')), '$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'])) $invisible = (((! $profile['publish']) && (! $profile['net-publish']))
? true : false); ? true : false);
if($invisible) if($invisible)
info( t('Profile is <strong>not published</strong>.') . EOL ); info( t('Profile is <strong>not published</strong>.') . EOL );
$subdir = ((strlen($a->get_path())) ? '<br />' . t('or') . ' ' . $a->get_baseurl(true) . '/profile/' . $nickname : ''); $subdir = ((strlen($a->get_path())) ? '<br />' . 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'), '$h_descadvn' => t('Change the behaviour of this account for special situations'),
'$pagetype' => $pagetype, '$pagetype' => $pagetype,
)); ));
call_hooks('settings_form',$o); call_hooks('settings_form',$o);

View File

@ -6,9 +6,9 @@
#, fuzzy #, fuzzy
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: 3.0.1385\n" "Project-Id-Version: 3.0.1386\n"
"Report-Msgid-Bugs-To: \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" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@ -35,7 +35,7 @@ msgid "Contact update failed."
msgstr "" msgstr ""
#: ../../mod/crepair.php:115 ../../mod/wall_attach.php:44 #: ../../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/api.php:31 ../../mod/photos.php:135 ../../mod/photos.php:951
#: ../../mod/editpost.php:10 ../../mod/install.php:151 #: ../../mod/editpost.php:10 ../../mod/install.php:151
#: ../../mod/notifications.php:66 ../../mod/contacts.php:145 #: ../../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/suggest.php:28 ../../mod/invite.php:13 ../../mod/invite.php:81
#: ../../mod/dfrn_confirm.php:53 ../../addon/facebook/facebook.php:508 #: ../../mod/dfrn_confirm.php:53 ../../addon/facebook/facebook.php:508
#: ../../addon/facebook/facebook.php:514 ../../addon/dav/layout.fnk.php:353 #: ../../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." msgid "Permission denied."
msgstr "" msgstr ""
@ -123,7 +123,7 @@ msgid "New photo from this URL"
msgstr "" msgstr ""
#: ../../mod/crepair.php:166 ../../mod/fsuggest.php:107 #: ../../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:1303 ../../mod/photos.php:1343
#: ../../mod/photos.php:1383 ../../mod/photos.php:1414 #: ../../mod/photos.php:1383 ../../mod/photos.php:1414
#: ../../mod/install.php:246 ../../mod/install.php:284 #: ../../mod/install.php:246 ../../mod/install.php:284
@ -194,7 +194,7 @@ msgstr ""
msgid "File exceeds size limit of %d" msgid "File exceeds size limit of %d"
msgstr "" 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." msgid "File upload failed."
msgstr "" msgstr ""
@ -211,79 +211,87 @@ msgstr ""
msgid "Suggest a friend for %s" msgid "Suggest a friend for %s"
msgstr "" msgstr ""
#: ../../mod/events.php:65 #: ../../mod/events.php:66
msgid "Event description and start time are required." msgid "Event title and start time are required."
msgstr "" msgstr ""
#: ../../mod/events.php:258 #: ../../mod/events.php:260
msgid "l, F j" msgid "l, F j"
msgstr "" msgstr ""
#: ../../mod/events.php:280 #: ../../mod/events.php:282
msgid "Edit event" msgid "Edit event"
msgstr "" msgstr ""
#: ../../mod/events.php:300 ../../include/text.php:1065 #: ../../mod/events.php:304 ../../include/text.php:1065
msgid "link to source" msgid "link to source"
msgstr "" 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 #: ../../include/nav.php:52 ../../boot.php:1546
msgid "Events" msgid "Events"
msgstr "" msgstr ""
#: ../../mod/events.php:325 #: ../../mod/events.php:329
msgid "Create New Event" msgid "Create New Event"
msgstr "" msgstr ""
#: ../../mod/events.php:326 ../../addon/dav/layout.fnk.php:154 #: ../../mod/events.php:330 ../../addon/dav/layout.fnk.php:154
msgid "Previous" msgid "Previous"
msgstr "" msgstr ""
#: ../../mod/events.php:327 ../../mod/install.php:205 #: ../../mod/events.php:331 ../../mod/install.php:205
#: ../../addon/dav/layout.fnk.php:157 #: ../../addon/dav/layout.fnk.php:157
msgid "Next" msgid "Next"
msgstr "" msgstr ""
#: ../../mod/events.php:399 #: ../../mod/events.php:404
msgid "hour:minute" msgid "hour:minute"
msgstr "" msgstr ""
#: ../../mod/events.php:408 #: ../../mod/events.php:414
msgid "Event details" msgid "Event details"
msgstr "" msgstr ""
#: ../../mod/events.php:409 #: ../../mod/events.php:415
#, php-format #, 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 "" msgstr ""
#: ../../mod/events.php:411 #: ../../mod/events.php:417
msgid "Event Starts:" msgid "Event Starts:"
msgstr "" 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" msgid "Finish date/time is not known or not relevant"
msgstr "" msgstr ""
#: ../../mod/events.php:416 #: ../../mod/events.php:422
msgid "Event Finishes:" msgid "Event Finishes:"
msgstr "" msgstr ""
#: ../../mod/events.php:419 #: ../../mod/events.php:425
msgid "Adjust for viewer timezone" msgid "Adjust for viewer timezone"
msgstr "" msgstr ""
#: ../../mod/events.php:421 #: ../../mod/events.php:427
msgid "Description:" msgid "Description:"
msgstr "" msgstr ""
#: ../../mod/events.php:423 ../../include/event.php:37 #: ../../mod/events.php:429 ../../include/event.php:40
#: ../../include/bb2diaspora.php:355 ../../boot.php:1126 #: ../../include/bb2diaspora.php:357 ../../boot.php:1126
msgid "Location:" msgid "Location:"
msgstr "" msgstr ""
#: ../../mod/events.php:425 #: ../../mod/events.php:431
msgid "Title:"
msgstr ""
#: ../../mod/events.php:433
msgid "Share this event" msgid "Share this event"
msgstr "" msgstr ""
@ -407,7 +415,7 @@ msgstr ""
msgid "was tagged in a" msgid "was tagged in a"
msgstr "" 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 #: ../../addon/communityhome/communityhome.php:163
#: ../../view/theme/diabook/theme.php:570 ../../include/text.php:1316 #: ../../view/theme/diabook/theme.php:570 ../../include/text.php:1316
#: ../../include/diaspora.php:1710 ../../include/conversation.php:53 #: ../../include/diaspora.php:1710 ../../include/conversation.php:53
@ -428,12 +436,12 @@ msgid "Image file is empty."
msgstr "" msgstr ""
#: ../../mod/photos.php:736 ../../mod/profile_photo.php:126 #: ../../mod/photos.php:736 ../../mod/profile_photo.php:126
#: ../../mod/wall_upload.php:86 #: ../../mod/wall_upload.php:99
msgid "Unable to process image." msgid "Unable to process image."
msgstr "" msgstr ""
#: ../../mod/photos.php:757 ../../mod/profile_photo.php:259 #: ../../mod/photos.php:757 ../../mod/profile_photo.php:259
#: ../../mod/wall_upload.php:105 #: ../../mod/wall_upload.php:118
msgid "Image upload failed." msgid "Image upload failed."
msgstr "" msgstr ""
@ -837,7 +845,7 @@ msgstr ""
msgid "Confirm" msgid "Confirm"
msgstr "" msgstr ""
#: ../../mod/dfrn_request.php:715 ../../include/items.php:2805 #: ../../mod/dfrn_request.php:715 ../../include/items.php:2873
msgid "[Name Withheld]" msgid "[Name Withheld]"
msgstr "" msgstr ""
@ -1163,7 +1171,7 @@ msgid ""
msgstr "" msgstr ""
#: ../../mod/localtime.php:12 ../../include/event.php:11 #: ../../mod/localtime.php:12 ../../include/event.php:11
#: ../../include/bb2diaspora.php:333 #: ../../include/bb2diaspora.php:335
msgid "l F d, Y \\@ g:i A" msgid "l F d, Y \\@ g:i A"
msgstr "" msgstr ""
@ -1739,7 +1747,7 @@ msgstr ""
#: ../../addon/facebook/facebook.php:700 #: ../../addon/facebook/facebook.php:700
#: ../../addon/facebook/facebook.php:1190 #: ../../addon/facebook/facebook.php:1190
#: ../../addon/public_server/public_server.php:62 #: ../../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 #: ../../boot.php:720
msgid "Administrator" msgid "Administrator"
msgstr "" msgstr ""
@ -2788,7 +2796,7 @@ msgstr ""
msgid "People Search" msgid "People Search"
msgstr "" 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/facebook/facebook.php:1584
#: ../../addon/communityhome/communityhome.php:158 #: ../../addon/communityhome/communityhome.php:158
#: ../../addon/communityhome/communityhome.php:167 #: ../../addon/communityhome/communityhome.php:167
@ -2799,7 +2807,7 @@ msgstr ""
msgid "status" msgid "status"
msgstr "" msgstr ""
#: ../../mod/like.php:202 ../../addon/facebook/facebook.php:1588 #: ../../mod/like.php:161 ../../addon/facebook/facebook.php:1588
#: ../../addon/communityhome/communityhome.php:172 #: ../../addon/communityhome/communityhome.php:172
#: ../../view/theme/diabook/theme.php:579 ../../include/diaspora.php:1726 #: ../../view/theme/diabook/theme.php:579 ../../include/diaspora.php:1726
#: ../../include/conversation.php:65 #: ../../include/conversation.php:65
@ -2807,14 +2815,14 @@ msgstr ""
msgid "%1$s likes %2$s's %3$s" msgid "%1$s likes %2$s's %3$s"
msgstr "" msgstr ""
#: ../../mod/like.php:204 ../../include/conversation.php:68 #: ../../mod/like.php:163 ../../include/conversation.php:68
#, php-format #, php-format
msgid "%1$s doesn't like %2$s's %3$s" msgid "%1$s doesn't like %2$s's %3$s"
msgstr "" msgstr ""
#: ../../mod/notice.php:15 ../../mod/viewsrc.php:15 ../../mod/admin.php:159 #: ../../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/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." msgid "Item not found."
msgstr "" msgstr ""
@ -2852,34 +2860,34 @@ msgstr ""
msgid "Empty post discarded." msgid "Empty post discarded."
msgstr "" msgstr ""
#: ../../mod/item.php:379 ../../mod/wall_upload.php:102 #: ../../mod/item.php:379 ../../mod/wall_upload.php:115
#: ../../mod/wall_upload.php:111 ../../mod/wall_upload.php:118 #: ../../mod/wall_upload.php:124 ../../mod/wall_upload.php:131
#: ../../include/message.php:144 #: ../../include/message.php:144
msgid "Wall Photos" msgid "Wall Photos"
msgstr "" msgstr ""
#: ../../mod/item.php:800 #: ../../mod/item.php:784
msgid "System error. Post not saved." msgid "System error. Post not saved."
msgstr "" msgstr ""
#: ../../mod/item.php:825 #: ../../mod/item.php:809
#, php-format #, php-format
msgid "" msgid ""
"This message was sent to you by %s, a member of the Friendica social network." "This message was sent to you by %s, a member of the Friendica social network."
msgstr "" msgstr ""
#: ../../mod/item.php:827 #: ../../mod/item.php:811
#, php-format #, php-format
msgid "You may visit them online at %s" msgid "You may visit them online at %s"
msgstr "" msgstr ""
#: ../../mod/item.php:828 #: ../../mod/item.php:812
msgid "" msgid ""
"Please contact the sender by replying to this post if you do not wish to " "Please contact the sender by replying to this post if you do not wish to "
"receive these messages." "receive these messages."
msgstr "" msgstr ""
#: ../../mod/item.php:830 #: ../../mod/item.php:814
#, php-format #, php-format
msgid "%s posted an update." msgid "%s posted an update."
msgstr "" msgstr ""
@ -6127,8 +6135,7 @@ msgstr ""
msgid "j F" msgid "j F"
msgstr "" msgstr ""
#: ../../include/profile_advanced.php:30 ../../include/datetime.php:450 #: ../../include/profile_advanced.php:30
#: ../../include/items.php:1460
msgid "Birthday:" msgid "Birthday:"
msgstr "" msgstr ""
@ -6501,11 +6508,11 @@ msgstr ""
msgid "Ask me" msgid "Ask me"
msgstr "" msgstr ""
#: ../../include/event.php:17 ../../include/bb2diaspora.php:339 #: ../../include/event.php:20 ../../include/bb2diaspora.php:341
msgid "Starts:" msgid "Starts:"
msgstr "" msgstr ""
#: ../../include/event.php:27 ../../include/bb2diaspora.php:347 #: ../../include/event.php:30 ../../include/bb2diaspora.php:349
msgid "Finishes:" msgid "Finishes:"
msgstr "" msgstr ""
@ -6982,15 +6989,25 @@ msgstr ""
msgid "%1$d %2$s ago" msgid "%1$d %2$s ago"
msgstr "" 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 #: ../../include/onepoll.php:399
msgid "From: " msgid "From: "
msgstr "" msgstr ""
#: ../../include/bbcode.php:214 ../../include/bbcode.php:234 #: ../../include/bbcode.php:216 ../../include/bbcode.php:236
msgid "$1 wrote:" msgid "$1 wrote:"
msgstr "" msgstr ""
#: ../../include/bbcode.php:249 ../../include/bbcode.php:322 #: ../../include/bbcode.php:251 ../../include/bbcode.php:328
msgid "Image/photo" msgid "Image/photo"
msgstr "" msgstr ""
@ -7231,15 +7248,15 @@ msgstr ""
msgid "following" msgid "following"
msgstr "" msgstr ""
#: ../../include/items.php:2812 #: ../../include/items.php:2880
msgid "A new person is sharing with you at " msgid "A new person is sharing with you at "
msgstr "" msgstr ""
#: ../../include/items.php:2812 #: ../../include/items.php:2880
msgid "You have a new follower at " msgid "You have a new follower at "
msgstr "" msgstr ""
#: ../../include/items.php:3476 #: ../../include/items.php:3512
msgid "Archives" msgid "Archives"
msgstr "" msgstr ""
@ -7582,15 +7599,15 @@ msgstr ""
msgid "permissions" msgid "permissions"
msgstr "" msgstr ""
#: ../../include/plugin.php:385 #: ../../include/plugin.php:388 ../../include/plugin.php:390
msgid "Click here to upgrade." msgid "Click here to upgrade."
msgstr "" msgstr ""
#: ../../include/plugin.php:393 #: ../../include/plugin.php:396
msgid "This action exceeds the limits set by your subscription plan." msgid "This action exceeds the limits set by your subscription plan."
msgstr "" msgstr ""
#: ../../include/plugin.php:398 #: ../../include/plugin.php:401
msgid "This action is not available under your subscription plan." msgid "This action is not available under your subscription plan."
msgstr "" msgstr ""