aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--addon/java_upload/java_upload.php103
-rw-r--r--addon/java_upload/jumploader_z.jarbin962772 -> 0 bytes
-rw-r--r--addon/js_upload/js_upload.php14
-rw-r--r--addon/twitter/twitter.php1
-rw-r--r--boot.php2
-rw-r--r--include/notifier.php25
-rw-r--r--mod/follow.php11
-rw-r--r--mod/settings.php20
-rw-r--r--view/settings.tpl4
9 files changed, 44 insertions, 136 deletions
diff --git a/addon/java_upload/java_upload.php b/addon/java_upload/java_upload.php
deleted file mode 100644
index 09e321f0a..000000000
--- a/addon/java_upload/java_upload.php
+++ /dev/null
@@ -1,103 +0,0 @@
-<?php
-
-/**
- * Name: Java photo uploader
- * Description: WARNING: This module currently has privacy issues. The java package does not pass the permissions array intact and could lead to photos being seen by people that were excluded from seeing them.
- * Version: 1.0
- * Author: Mike Macgirvin <http://macgirvin.com/profile/mike>
- */
-
-/**
- *
- * Java photo uploader, uses Jumploader
- *
- * WARNING: This module currently has privacy issues.
- * The java package does not pass the permissions array intact and could lead to
- * photos being seen by people that were excluded from seeing them.
- *
- */
-
-
-function java_upload_install() {
- register_hook('photo_upload_form', 'addon/java_upload/java_upload.php', 'java_upload_form');
- register_hook('photo_post_init', 'addon/java_upload/java_upload.php', 'java_upload_post_init');
- register_hook('photo_post_end', 'addon/java_upload/java_upload.php', 'java_upload_post_end');
-}
-
-
-function java_upload_uninstall() {
- unregister_hook('photo_upload_form', 'addon/java_upload/java_upload.php', 'java_upload_form');
- unregister_hook('photo_post_init', 'addon/java_upload/java_upload.php', 'java_upload_post_init');
- unregister_hook('photo_post_end', 'addon/java_upload/java_upload.php', 'java_upload_post_end');
-}
-
-
-function java_upload_form(&$a,&$b) {
-
- $uploadurl = $b['post_url'];
- $sessid = session_id();
- $archive = $a->get_baseurl() . '/addon/java_upload/jumploader_z.jar';
- $filestext = t('Select files to upload: ');
-
- $nojava = t('Use the following controls only if the Java uploader [above] fails to launch.');
-
- $b['default_upload'] = true;
-
-
-$b['addon_text'] .= <<< EOT
-
- <div id="photos-upload-select-files-text">$filestext</div>
-
- <div id="photos_upload_applet_wrapper">
- <applet name="jumpLoaderApplet"
- code="jmaster.jumploader.app.JumpLoaderApplet.class"
- archive="$archive"
- width="700"
- height="600"
- mayscript >
- <param name="uc_uploadUrl" value="$uploadurl" />
- <param name="uc_uploadFormName" value="photos-upload-form" />
- <param name="gc_loggingLeveL" value="FATAL" />
- <param name="uc_fileParameterName" value="userfile" />
- <param name="uc_cookie" value="PHPSESSID=$sessid; path=/;" />
- <param name="vc_disableLocalFileSystem" value="false" />
- <param name="vc_uploadViewMenuBarVisible" value="false" />
- <param name="vc_mainViewFileListViewVisible" value="true" />
- <param name="vc_mainViewFileListViewHeightPercent" value="50" />
- <param name="vc_mainViewFileTreeViewVisible" value="true" />
- <param name="vc_mainViewFileTreeViewWidthPercent" value="35" />
- <param name="vc_lookAndFeel" value="system" />
-
- </applet>
-
- </div>
-
- <div id="photos-upload-no-java-message" >
- $nojava
- </div>
-
-EOT;
-
-}
-
-
-
-
-
-function java_upload_photo_post_init(&$a,&$b) {
-
- if($_POST['partitionCount'])
- $a->data['java_upload'] = true;
- else
- $a->data['java_upload'] = false;
-
-
-}
-
-
-function java_upload_photo_post_end(&$a,&$b) {
-
- if(x($a->data,'java_upload') && $a->data['java_upload'])
- killme();
-
-}
diff --git a/addon/java_upload/jumploader_z.jar b/addon/java_upload/jumploader_z.jar
deleted file mode 100644
index 30a85a33f..000000000
--- a/addon/java_upload/jumploader_z.jar
+++ /dev/null
Binary files differ
diff --git a/addon/js_upload/js_upload.php b/addon/js_upload/js_upload.php
index 8691389fe..06a907603 100644
--- a/addon/js_upload/js_upload.php
+++ b/addon/js_upload/js_upload.php
@@ -14,9 +14,6 @@
* Uses Valum 'qq' Uploader.
* Module Author: Chris Case
*
- * Prior to enabling, ensure that you have a directory 'uploads'
- * which is writable by the web server.
- *
*/
@@ -254,8 +251,6 @@ class qqFileUploader {
$this->allowedExtensions = $allowedExtensions;
$this->sizeLimit = $sizeLimit;
- $this->checkServerSettings();
-
if (isset($_GET['qqfile'])) {
$this->file = new qqUploadedFileXhr();
} elseif (isset($_FILES['qqfile'])) {
@@ -266,15 +261,6 @@ class qqFileUploader {
}
- private function checkServerSettings(){
- $postSize = $this->toBytes(ini_get('post_max_size'));
- $uploadSize = $this->toBytes(ini_get('upload_max_filesize'));
- logger('mod/photos.php: qqFileUploader(): upload_max_filesize=' . $uploadSize , 'LOGGER_DEBUG');
- if ($postSize < $this->sizeLimit || $uploadSize < $this->sizeLimit){
- $size = max(1, $this->sizeLimit / 1024 / 1024) . 'M';
- die("{'error':'increase post_max_size and upload_max_filesize to $size'}");
- }
- }
private function toBytes($str){
$val = trim($str);
diff --git a/addon/twitter/twitter.php b/addon/twitter/twitter.php
index 183c71126..1dce9d2f6 100644
--- a/addon/twitter/twitter.php
+++ b/addon/twitter/twitter.php
@@ -216,6 +216,7 @@ function twitter_post_hook(&$a,&$b) {
$twitter_enable = (($twitter_post && x($_POST,'twitter_enable')) ? intval($_POST['twitter_enable']) : 0);
if($twitter_post && $twitter_enable) {
+ logger('Posting to Twitter', LOGGER_DEBUG);
require_once('library/twitteroauth.php');
require_once('include/bbcode.php');
$tweet = new TwitterOAuth($ckey,$csecret,$otoken,$osecret);
diff --git a/boot.php b/boot.php
index 5d3643e06..6e6477d28 100644
--- a/boot.php
+++ b/boot.php
@@ -4,7 +4,7 @@ set_time_limit(0);
ini_set('pcre.backtrack_limit', 250000);
-define ( 'FRIENDIKA_VERSION', '2.2.1032' );
+define ( 'FRIENDIKA_VERSION', '2.2.1033' );
define ( 'DFRN_PROTOCOL_VERSION', '2.21' );
define ( 'DB_UPDATE_VERSION', 1075 );
diff --git a/include/notifier.php b/include/notifier.php
index 9c194d962..59e573762 100644
--- a/include/notifier.php
+++ b/include/notifier.php
@@ -365,8 +365,13 @@ function notifier_run($argv, $argc){
}
break;
case 'stat':
+
+ // Do not send to otatus if we are not configured to send to public networks
if($owner['prvnets'])
break;
+ if(get_config('system','ostatus_disabled') || get_config('system','dfrn_only'))
+ break;
+
if($followup && $contact['notify']) {
logger('notifier: slapdelivery: ' . $contact['name']);
$deliver_status = slapper($owner,$contact['notify'],$slap);
@@ -382,8 +387,6 @@ function notifier_run($argv, $argc){
);
}
-
-
}
else {
@@ -413,6 +416,9 @@ function notifier_run($argv, $argc){
case 'mail':
+ if(get_config('system','dfrn_only'))
+ break;
+
// WARNING: does not currently convert to RFC2047 header encodings, etc.
$addr = $contact['addr'];
@@ -488,6 +494,8 @@ function notifier_run($argv, $argc){
case 'feed':
case 'face':
case 'dspr':
+ if(get_config('system','dfrn_only'))
+ break;
default:
break;
}
@@ -497,11 +505,13 @@ function notifier_run($argv, $argc){
// send additional slaps to mentioned remote tags (@foo@example.com)
if($slap && count($url_recipients) && $followup && $notify_hub && (! $expire)) {
- foreach($url_recipients as $url) {
- if($url) {
- logger('notifier: urldelivery: ' . $url);
- $deliver_status = slapper($owner,$url,$slap);
- // TODO: redeliver/queue these items on failure, though there is no contact record
+ if(! get_config('system','dfrn_only')) {
+ foreach($url_recipients as $url) {
+ if($url) {
+ logger('notifier: urldelivery: ' . $url);
+ $deliver_status = slapper($owner,$url,$slap);
+ // TODO: redeliver/queue these items on failure, though there is no contact record
+ }
}
}
}
@@ -577,7 +587,6 @@ function notifier_run($argv, $argc){
}
if (array_search(__file__,get_included_files())===0){
- echo "run!";
notifier_run($argv,$argc);
killme();
}
diff --git a/mod/follow.php b/mod/follow.php
index a354b3457..830399ff5 100644
--- a/mod/follow.php
+++ b/mod/follow.php
@@ -34,6 +34,13 @@ function follow_post(&$a) {
// NOTREACHED
}
+ else {
+ if(get_config('system','dfrn_only')) {
+ notice( t('This site is not configured to allow communications with other networks.') . EOL);
+ notice( t('No compatible communication protocols or feeds were discovered.') . EOL);
+ goaway($_SESSION['return_url']);
+ }
+ }
// do we have enough information?
@@ -50,6 +57,10 @@ function follow_post(&$a) {
goaway($_SESSION['return_url']);
}
+ if($ret['network'] === NETWORK_OSTATUS && get_config('system','ostatus_disabled')) {
+ notice( t('Communication options with this network have been restricted.') . EOL);
+ $ret['notify'] = '';
+ }
if(! $ret['notify']) {
notice( t('Limited profile. This person will be unable to receive direct/personal notifications from you.') . EOL);
diff --git a/mod/settings.php b/mod/settings.php
index 44de482c1..e11555687 100644
--- a/mod/settings.php
+++ b/mod/settings.php
@@ -115,6 +115,8 @@ function settings_post(&$a) {
$mail_disabled = ((function_exists('imap_open') && (! get_config('system','imap_disabled'))) ? 0 : 1);
+ if(get_config('system','dfrn_only'))
+ $mail_disabled = 1;
if(! $mail_disabled) {
$r = q("SELECT * FROM `mailacct` WHERE `uid` = %d LIMIT 1",
@@ -257,7 +259,7 @@ function settings_post(&$a) {
$r = q("UPDATE `profile`
SET `publish` = %d,
`net-publish` = %d,
- `hide-friends` = %d,
+ `hide-friends` = %d
WHERE `is-default` = 1 AND `uid` = %d LIMIT 1",
intval($publish),
intval($net_publish),
@@ -355,6 +357,8 @@ function settings_content(&$a) {
$mail_disabled = ((function_exists('imap_open') && (! get_config('system','imap_disabled'))) ? 0 : 1);
+ if(get_config('system','dfrn_only'))
+ $mail_disabled = 1;
if(! $mail_disabled) {
$r = q("SELECT * FROM `mailacct` WHERE `uid` = %d LIMIT 1",
@@ -375,19 +379,19 @@ function settings_content(&$a) {
$pageset_tpl = get_markup_template('pagetypes.tpl');
$pagetype = replace_macros($pageset_tpl,array(
- $page_normal => array('page-flags', t('Normal Account'), PAGE_NORMAL,
+ '$page_normal' => array('page-flags', t('Normal Account'), PAGE_NORMAL,
t('This account is a normal personal profile'),
($a->user['page-flags'] == PAGE_NORMAL)),
- $page_soapbox => array('page-flags', t('Soapbox Account'), PAGE_SOAPBOX,
+ '$page_soapbox' => array('page-flags', t('Soapbox Account'), PAGE_SOAPBOX,
t('Automatically approve all connection/friend requests as read-only fans'),
- ($a->user['page-flags'] == PAGE_NORMAL)),
+ ($a->user['page-flags'] == PAGE_SOAPBOX)),
- $page_community => array('page-flags', t('Community/Celebrity Account'), PAGE_COMMUNITY,
+ '$page_community' => array('page-flags', t('Community/Celebrity Account'), PAGE_COMMUNITY,
t('Automatically approve all connection/friend requests as read-write fans'),
($a->user['page-flags'] == PAGE_COMMUNITY)),
- $page_freelove => array('page-flags', t('Automatic Friend Account'), PAGE_FREELOVE,
+ '$page_freelove' => array('page-flags', t('Automatic Friend Account'), PAGE_FREELOVE,
t('Automatically approve all connection/friend requests as friends'),
($a->user['page-flags'] == PAGE_FREELOVE)),
));
@@ -537,8 +541,8 @@ function settings_content(&$a) {
'$mail_disabled' => (($mail_disabled) ? t('Email access is disabled on this site.') : ''),
'$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:'), $mail_ssl, '', array( ''=>t('None'), 'TSL'=>'TSL', 'SSL'=>'SSL')),
- '$mail_user' => array('mail_server', t('Email login name:'), $mail_server, ''),
+ '$mail_ssl' => array('mail_ssl', t('Security:'), strtoupper($mail_ssl), '', array( ''=>t('None'), 'TSL'=>'TSL', 'SSL'=>'SSL')),
+ '$mail_user' => array('mail_user', t('Email login name:'), $mail_user, ''),
'$mail_pass' => array('mail_pass', t('Email password:'), '', ''),
'$mail_replyto' => array('mail_replyto', t('Reply-to address:'), '', 'Optional'),
'$mail_pubmail' => array('mail_pubmail', t('Send public posts to all email contacts:'), $mail_pubmail, ''),
diff --git a/view/settings.tpl b/view/settings.tpl
index 50b59cc91..5e8b90769 100644
--- a/view/settings.tpl
+++ b/view/settings.tpl
@@ -94,10 +94,10 @@ $hide_wall
<input type="submit" name="submit" class="settings-submit" value="$submit" />
</div>
-<h3 class="settings-heading">$h_imap</h3>
{{ if $mail_disabled }}
- <div class="info-message">$mail_disabled</div>
+
{{ else }}
+ <h3 class="settings-heading">$h_imap</h3>
<p>$imap_desc</p>
{{inc field_custom.tpl with $field=$imap_lastcheck }}{{endinc}}
{{inc field_input.tpl with $field=$mail_server }}{{endinc}}