diff --git a/boot.php b/boot.php index bcc51a995..f08eda0f1 100755 --- a/boot.php +++ b/boot.php @@ -9,7 +9,7 @@ require_once('include/nav.php'); require_once('include/cache.php'); define ( 'FRIENDICA_PLATFORM', 'Friendica'); -define ( 'FRIENDICA_VERSION', '2.3.1300' ); +define ( 'FRIENDICA_VERSION', '2.3.1301' ); define ( 'DFRN_PROTOCOL_VERSION', '2.23' ); define ( 'DB_UPDATE_VERSION', 1134 ); diff --git a/include/delivery.php b/include/delivery.php index 532dcd699..794b8f27a 100755 --- a/include/delivery.php +++ b/include/delivery.php @@ -321,6 +321,14 @@ function delivery_run($argv, $argc){ $x[0]['writable'] = 1; } + $ssl_policy = get_config('system','ssl_policy'); + fix_contact_ssl_policy($x[0],$ssl_policy); + + // If we are setup as a soapbox we aren't accepting input from this person + + if($x[0]['page-flags'] == PAGE_SOAPBOX) + break; + require_once('library/simplepie/simplepie.inc'); logger('mod-delivery: local delivery'); local_delivery($x[0],$atom); diff --git a/include/network.php b/include/network.php index 9e1ed2091..38d0980d5 100755 --- a/include/network.php +++ b/include/network.php @@ -824,3 +824,48 @@ function scale_external_images($s,$include_link = true) { } return $s; } + + +function fix_contact_ssl_policy(&$contact,$new_policy) { + + $ssl_changed = false; + if((intval($new_policy) == SSL_POLICY_SELFSIGN || $new_policy === 'self') && strstr($contact['url'],'https:')) { + $ssl_changed = true; + $contact['url'] = str_replace('https:','http:',$contact['url']); + $contact['request'] = str_replace('https:','http:',$contact['request']); + $contact['notify'] = str_replace('https:','http:',$contact['notify']); + $contact['poll'] = str_replace('https:','http:',$contact['poll']); + $contact['confirm'] = str_replace('https:','http:',$contact['confirm']); + $contact['poco'] = str_replace('https:','http:',$contact['poco']); + } + + if((intval($new_policy) == SSL_POLICY_FULL || $new_policy === 'full') && strstr($contact['url'],'http:')) { + $ssl_changed = true; + $contact['url'] = str_replace('http:','https:',$contact['url']); + $contact['request'] = str_replace('http:','https:',$contact['request']); + $contact['notify'] = str_replace('http:','https:',$contact['notify']); + $contact['poll'] = str_replace('http:','https:',$contact['poll']); + $contact['confirm'] = str_replace('http:','https:',$contact['confirm']); + $contact['poco'] = str_replace('http:','https:',$contact['poco']); + } + + if($ssl_changed) { + q("update contact set + url = '%s', + request = '%s', + notify = '%s', + poll = '%s', + confirm = '%s', + poco = '%s' + where id = %d limit 1", + dbesc($contact['url']), + dbesc($contact['request']), + dbesc($contact['notify']), + dbesc($contact['poll']), + dbesc($contact['confirm']), + dbesc($contact['poco']), + intval($contact['id']) + ); + } +} + diff --git a/include/notifier.php b/include/notifier.php index d63ad7ae7..ca7c7b92e 100755 --- a/include/notifier.php +++ b/include/notifier.php @@ -537,6 +537,17 @@ function notifier_run($argv, $argc){ $x[0]['writable'] = 1; } + // if contact's ssl policy changed, which we just determined + // is on our own server, update our contact links + + $ssl_policy = get_config('system','ssl_policy'); + fix_contact_ssl_policy($x[0],$ssl_policy); + + // If we are setup as a soapbox we aren't accepting input from this person + + if($x[0]['page-flags'] == PAGE_SOAPBOX) + break; + require_once('library/simplepie/simplepie.inc'); logger('mod-delivery: local delivery'); local_delivery($x[0],$atom); diff --git a/mod/admin.php b/mod/admin.php index 8caa76370..a395027c1 100755 --- a/mod/admin.php +++ b/mod/admin.php @@ -222,6 +222,11 @@ function admin_page_site_post(&$a){ `poco` = replace(`poco` , 'http:' , 'https:') where `self` = 1" ); + q("update `profile` set + `photo` = replace(`photo` , 'http:' , 'https:'), + `thumb` = replace(`thumb` , 'http:' , 'https:') + where 1 " + ); } elseif($ssl_policy == SSL_POLICY_SELFSIGN) { q("update `contact` set @@ -236,6 +241,11 @@ function admin_page_site_post(&$a){ `poco` = replace(`poco` , 'https:' , 'http:') where `self` = 1" ); + q("update `profile` set + `photo` = replace(`photo` , 'https:' , 'http:'), + `thumb` = replace(`thumb` , 'https:' , 'http:') + where 1 " + ); } } set_config('system','ssl_policy',$ssl_policy); diff --git a/mod/dfrn_notify.php b/mod/dfrn_notify.php index 8e4ce0671..65d39d5fe 100755 --- a/mod/dfrn_notify.php +++ b/mod/dfrn_notify.php @@ -99,65 +99,10 @@ function dfrn_notify_post(&$a) { $importer['forum'] = $page; } + // if contact's ssl policy changed, update our links - $ssl_changed = false; - - if($ssl_policy == 'self' && strstr($importer['url'],'https:')) { - $ssl_changed = true; - $importer['url'] = str_replace('https:','http:',$importer['url']); - $importer['nurl'] = normalise_link($importer['url']); - $importer['photo'] = str_replace('https:','http:',$importer['photo']); - $importer['thumb'] = str_replace('https:','http:',$importer['thumb']); - $importer['micro'] = str_replace('https:','http:',$importer['micro']); - $importer['request'] = str_replace('https:','http:',$importer['request']); - $importer['notify'] = str_replace('https:','http:',$importer['notify']); - $importer['poll'] = str_replace('https:','http:',$importer['poll']); - $importer['confirm'] = str_replace('https:','http:',$importer['confirm']); - $importer['poco'] = str_replace('https:','http:',$importer['poco']); - } - - if($ssl_policy == 'full' && strstr($importer['url'],'http:')) { - $ssl_changed = true; - $importer['url'] = str_replace('http:','https:',$importer['url']); - $importer['nurl'] = normalise_link($importer['url']); - $importer['photo'] = str_replace('http:','https:',$importer['photo']); - $importer['thumb'] = str_replace('http:','https:',$importer['thumb']); - $importer['micro'] = str_replace('http:','https:',$importer['micro']); - $importer['request'] = str_replace('http:','https:',$importer['request']); - $importer['notify'] = str_replace('http:','https:',$importer['notify']); - $importer['poll'] = str_replace('http:','https:',$importer['poll']); - $importer['confirm'] = str_replace('http:','https:',$importer['confirm']); - $importer['poco'] = str_replace('http:','https:',$importer['poco']); - } - - if($ssl_changed) { - q("update contact set - url = '%s', - nurl = '%s', - photo = '%s', - thumb = '%s', - micro = '%s', - request = '%s', - notify = '%s', - poll = '%s', - confirm = '%s', - poco = '%s' - where id = %d limit 1", - dbesc($importer['url']), - dbesc($importer['nurl']), - dbesc($importer['photo']), - dbesc($importer['thumb']), - dbesc($importer['micro']), - dbesc($importer['request']), - dbesc($importer['notify']), - dbesc($importer['poll']), - dbesc($importer['confirm']), - dbesc($importer['poco']), - intval($importer['id']) - ); - } - + fix_contact_ssl_policy($importer,$ssl_policy); logger('dfrn_notify: received notify from ' . $importer['name'] . ' for ' . $importer['username']); logger('dfrn_notify: data: ' . $data, LOGGER_DATA); diff --git a/mod/profile.php b/mod/profile.php index 26b33d5f1..68d73fba3 100755 --- a/mod/profile.php +++ b/mod/profile.php @@ -124,9 +124,9 @@ function profile_content(&$a, $update = 0) { return; } - $a->page['aside'] .= categories_widget($a->get_baseurl(true) . '/profile/' . $a->profile['nickname'],(x($category) ? xmlify($category) : '')); - if(! $update) { + + if(x($_GET,'tab')) $tab = notags(trim($_GET['tab'])); @@ -148,6 +148,7 @@ function profile_content(&$a, $update = 0) { $celeb = ((($a->profile['page-flags'] == PAGE_SOAPBOX) || ($a->profile['page-flags'] == PAGE_COMMUNITY)) ? true : false); + $a->page['aside'] .= categories_widget($a->get_baseurl(true) . '/profile/' . $a->profile['nickname'],(x($category) ? xmlify($category) : '')); if(can_write_wall($a,$a->profile['profile_uid'])) { diff --git a/mod/search.php b/mod/search.php index 6495fc8e5..4ca7db9bb 100755 --- a/mod/search.php +++ b/mod/search.php @@ -97,27 +97,26 @@ function search_content(&$a) { // OR your own posts if you are a logged in member // No items will be shown if the member has a blocked profile wall. - $r = q("SELECT COUNT(*) AS `total` + $r = q("SELECT distinct(`item`.`uri`) as `total` FROM `item` LEFT JOIN `contact` ON `contact`.`id` = `item`.`contact-id` LEFT JOIN `user` ON `user`.`uid` = `item`.`uid` WHERE `item`.`visible` = 1 AND `item`.`deleted` = 0 and `item`.`moderated` = 0 AND (( `item`.`allow_cid` = '' AND `item`.`allow_gid` = '' AND `item`.`deny_cid` = '' AND `item`.`deny_gid` = '' AND `item`.`private` = 0 AND `user`.`hidewall` = 0) OR `item`.`uid` = %d ) AND `contact`.`blocked` = 0 AND `contact`.`pending` = 0 - AND ( `item`.`body` REGEXP '%s' OR `item`.`tag` REGEXP '%s' )", + AND ( `item`.`body` REGEXP '%s' OR `item`.`tag` REGEXP '%s' ) group by `item`.`uri` ", intval(local_user()), dbesc(preg_quote($search)), dbesc('\\]' . preg_quote($search) . '\\[') ); if(count($r)) - $a->set_pager_total($r[0]['total']); - - if(! $r[0]['total']) { + $a->set_pager_total(count($r)); + if(! count($r)) { info( t('No results.') . EOL); return $o; } - $r = q("SELECT `item`.*, `item`.`id` AS `item_id`, + $r = q("SELECT distinct(`item`.`uri`), `item`.*, `item`.`id` AS `item_id`, `contact`.`name`, `contact`.`photo`, `contact`.`url`, `contact`.`rel`, `contact`.`network`, `contact`.`thumb`, `contact`.`self`, `contact`.`writable`, `contact`.`id` AS `cid`, `contact`.`uid` AS `contact-uid`, @@ -128,7 +127,8 @@ function search_content(&$a) { AND (( `item`.`allow_cid` = '' AND `item`.`allow_gid` = '' AND `item`.`deny_cid` = '' AND `item`.`deny_gid` = '' AND `item`.`private` = 0 AND `user`.`hidewall` = 0 ) OR `item`.`uid` = %d ) AND `contact`.`blocked` = 0 AND `contact`.`pending` = 0 - AND ( `item`.`body` REGEXP '%s' OR `item`.`tag` REGEXP '%s' ) + AND ( `item`.`body` REGEXP '%s' OR `item`.`tag` REGEXP '%s' ) + group by `item`.`uri` ORDER BY `received` DESC LIMIT %d , %d ", intval(local_user()), dbesc(preg_quote($search)), diff --git a/mod/settings.php b/mod/settings.php index 926d1faa5..6879da285 100755 --- a/mod/settings.php +++ b/mod/settings.php @@ -229,7 +229,7 @@ function settings_post(&$a) { if ($theme == $a->user['theme']){ - // call theme_post only if theme has not benn changed + // call theme_post only if theme has not been changed if( ($themeconfigfile = get_theme_config_file($theme)) != null){ require_once($themeconfigfile); theme_post($a); @@ -242,6 +242,7 @@ function settings_post(&$a) { intval(local_user()) ); + call_hooks('display_settings_post', $_POST); goaway($a->get_baseurl(true) . '/settings/display' ); return; // NOTREACHED } @@ -679,6 +680,8 @@ function settings_content(&$a) { '$settings_connectors' => $settings_connectors )); + + call_hooks('display_settings', $o); return $o; } diff --git a/view/de/strings.php b/view/de/strings.php index 3f9176cd7..c9cd91138 100755 --- a/view/de/strings.php +++ b/view/de/strings.php @@ -26,6 +26,7 @@ $a->strings["New photo from this URL"] = "Neues Foto von dieser URL"; $a->strings["Submit"] = "Senden"; $a->strings["Help:"] = "Hilfe:"; $a->strings["Help"] = "Hilfe"; +$a->strings["Help or @NewHere ?"] = "Hilfe oder @NeuHier"; $a->strings["Not Found"] = "Nicht gefunden"; $a->strings["Page not found."] = "Seite nicht gefunden."; $a->strings["File exceeds size limit of %d"] = "Die Datei ist größer als das erlaubte Limit von %d"; @@ -125,6 +126,9 @@ $a->strings["No installed plugins/addons/apps"] = "Keine Plugins/Erweiterungen/A $a->strings["Item not found"] = "Beitrag nicht gefunden"; $a->strings["Edit post"] = "Beitrag bearbeiten"; $a->strings["Post to Email"] = "An E-Mail senden"; +$a->strings["PostIt to Friendica"] = "Teile mit Friendica"; +$a->strings["Post to Friendica"] = "Teile mit Friendica"; +$a->strings[" from anywhere by bookmarking this Link."] = " von überall her, indem du diesen Link zu deinen Lesezeichen hinzufügst."; $a->strings["Edit"] = "Bearbeiten"; $a->strings["Upload photo"] = "Foto hochladen"; $a->strings["Attach file"] = "Datei anhängen"; @@ -244,6 +248,7 @@ $a->strings["Profile Match"] = "Profilübereinstimmungen"; $a->strings["No keywords to match. Please add keywords to your default profile."] = "Keine Schlüsselwörter zum Abgleichen gefunden. Bitte füge einige Schlüsselwörter zu deinem Standardprofil hinzu."; $a->strings["is interested in:"] = "ist interessiert an:"; $a->strings["Connect"] = "Verbinden"; +$a->strings["Connect Services"] = "Verbinde Dienste"; $a->strings["No matches"] = "Keine Übereinstimmungen"; $a->strings["Remote privacy information not available."] = "Entfernte Privatsphäreneinstellungen nicht verfügbar."; $a->strings["Visible to:"] = "Sichtbar für:"; @@ -676,6 +681,7 @@ $a->strings["Force users to register with a space between firstname and lastname $a->strings["UTF-8 Regular expressions"] = "UTF-8 Reguläre Ausdrücke"; $a->strings["Use PHP UTF8 regular expressions"] = "PHP UTF8 Ausdrücke verwenden"; $a->strings["Show Community Page"] = "Gemeinschaftsseite anzeigen"; +$a->strings["Community Pages"] = "Foren"; $a->strings["Display a Community page showing all recent public postings on this site."] = "Zeige die Gemeinschaftsseite mit allen öffentlichen Beiträgen auf diesem Server."; $a->strings["Enable OStatus support"] = "OStatus Unterstützung aktivieren"; $a->strings["Provide built-in OStatus (identi.ca, status.net, etc.) compatibility. All communications in OStatus are public, so privacy warnings will be occasionally displayed."] = "Biete die eingebaute OStatus (identi.ca, status.net, etc.) Unterstützung an. Jede Kommunikation in OStatus ist öffentlich, so Privatsphäre Warnungen werden bei Bedarf angezeigt."; @@ -830,6 +836,7 @@ $a->strings["Friend Suggestions"] = "Kontaktvorschläge"; $a->strings["No suggestions available. If this is a new site, please try again in 24 hours."] = "Keine Vorschläge. Falls der Server frisch aufgesetzt wurde, versuche es bitte in 24 Stunden noch einmal."; $a->strings["Ignore/Hide"] = "Ignorieren/Verbergen"; $a->strings["Global Directory"] = "Weltweites Verzeichnis"; +$a->strings["Local Directory"] = "Lokales Verzeichnis"; $a->strings["Normal site view"] = "Normale Seitenansicht"; $a->strings["Admin - View all site entries"] = "Admin: Alle Einträge dieses Servers anzeigen"; $a->strings["Find on this site"] = "Auf diesem Server suchen"; @@ -1164,6 +1171,7 @@ $a->strings["Dating"] = "Dating"; $a->strings["Unfaithful"] = "Untreu"; $a->strings["Sex Addict"] = "Sexbesessen"; $a->strings["Friends"] = "Freunde"; +$a->strings["Find Friends"] = "Freunde finden"; $a->strings["Friends/Benefits"] = "Freunde/Zuwendungen"; $a->strings["Casual"] = "Casual"; $a->strings["Engaged"] = "Verlobt"; diff --git a/view/theme/clean/screenshot.jpg b/view/theme/clean/screenshot.jpg deleted file mode 100644 index 8d9d772f4..000000000 Binary files a/view/theme/clean/screenshot.jpg and /dev/null differ diff --git a/view/theme/clean/style.css b/view/theme/clean/style.css deleted file mode 100755 index 86bca371c..000000000 --- a/view/theme/clean/style.css +++ /dev/null @@ -1,115 +0,0 @@ -@import url('../loozah/style.css'); - -footer { - background: #CCC; -} - -#banner { - color: #444444; -} - -body { - background: #FFFFFF; - color: #000000; -} -.nav-selected { - background: #FFFFFF !important; - color: #888888 !important; -} - -input:hover { - background-color: #CCCCCC; - color: #000000; - border: 1px solid #FFFFFF; -} - -input, select { - background-color: #FFFFFF; - color: #000000; -} -.nav-link:hover, .nav-commlink:hover { - background: #DDDDDD; - color: #0000EE; -} -option { - background-color: #FFFFFF; -} -#page-footer { - border: none; -} - -nav { - background: #F4F4F4; -} - -body { - background: #FFFFFF; - color: #444444; -} - -.nav-link { - color: #444444; - background: #EEE; - border: 2px solid #CCCCCC; -} - -.nav-commlink { - color: #444444; - background: #EEE; - border: 2px solid #CCCCCC; -} - -.tab { - color: #444444; - background: #EEE; - -} - -a, a:visited { - color: #8888FF; - text-decoration: none; -} - -a:hover { - color: #0000FF; - text-decoration: underline; -} - -.fakelink, .fakelink:visited { - color: #8888FF; -} - -.fakelink:hover { - color: #0000FF; -} - -.wall-item-content-wrapper { - border: 1px solid #CCC; -} - -.wall-item-content-wrapper.comment { - background: #CCC; -} - -.comment-edit-wrapper { - background: #CCC; -} - -.comment-wwedit-wrapper { - background: #CCC; -} - -#photos-upload-perms-menu, #photos-upload-perms-menu:visited { - color: #8888FF; -} - -#photos-upload-perms-menu:hover { - color: #0000FF; -} -#settings-default-perms-menu, #settings-default-perms-menu:visited { - color: #8888FF; -} - -#settings-default-perms-menu:hover { - color: #0000FF; -} diff --git a/view/theme/clean/theme.php b/view/theme/clean/theme.php deleted file mode 100755 index 47b43cf13..000000000 --- a/view/theme/clean/theme.php +++ /dev/null @@ -1,4 +0,0 @@ -theme_info = array( - 'extends' => 'loozah', -); diff --git a/view/theme/clean/unsupported b/view/theme/clean/unsupported deleted file mode 100644 index e69de29bb..000000000 diff --git a/view/theme/darkness/screenshot.jpg b/view/theme/darkness/screenshot.jpg deleted file mode 100644 index aec866e99..000000000 Binary files a/view/theme/darkness/screenshot.jpg and /dev/null differ diff --git a/view/theme/darkness/style.css b/view/theme/darkness/style.css deleted file mode 100755 index 3bc4c6aea..000000000 --- a/view/theme/darkness/style.css +++ /dev/null @@ -1,67 +0,0 @@ -@import url('../loozah/style.css'); - -nav { - background: #CCC; -} -footer { - background: #CCC; -} -#banner { - color: #FF0000; -} - -body { - background: #000000; - color: #FF0000; -} -.nav-selected { - background: #000000 !important; - color: #888888 !important; -} - -input:hover { - background-color: #800000; -} -input, select { - background-color: #000000; - color: #FF0000; -} -.nav-link:hover, .nav-commlink:hover, .tab:hover { - background: #DDDDDD; - color: #FF0000; -} - -#logo-text a, #logo-text a:visited, #site-location { - color: #000000; -} - - -#page-footer { - border: none; -} -.nav-link { - color: #FF0000; - background: #444444; -} - -.nav-commlink { - color: #FF0000; - background: #444444; -} - -.tab { - color: #FF0000; - background: #444444; - -} - -a, a:visited, .fakelink, .fakelink:visited { - color: #888888; - text-decoration: none; -} - -a:hover, .fakelink:hover { - color: #FF0000; - text-decoration: underline; -} - diff --git a/view/theme/darkness/theme.php b/view/theme/darkness/theme.php deleted file mode 100755 index 47b43cf13..000000000 --- a/view/theme/darkness/theme.php +++ /dev/null @@ -1,4 +0,0 @@ -theme_info = array( - 'extends' => 'loozah', -); diff --git a/view/theme/darkness/unsupported b/view/theme/darkness/unsupported deleted file mode 100644 index e69de29bb..000000000 diff --git a/view/theme/diabook-aerith/communityhome.tpl b/view/theme/diabook-aerith/communityhome.tpl index c26d02dc6..4873cdd14 100755 --- a/view/theme/diabook-aerith/communityhome.tpl +++ b/view/theme/diabook-aerith/communityhome.tpl @@ -6,7 +6,7 @@