From 62e528ba43bedbd33eb81447775bd743f0c1acf8 Mon Sep 17 00:00:00 2001 From: friendica Date: Mon, 2 Apr 2012 00:45:45 -0700 Subject: [PATCH 01/10] remove zrl from query string --- include/text.php | 3 +++ index.php | 1 + 2 files changed, 4 insertions(+) diff --git a/include/text.php b/include/text.php index e1e0407500..5456b5ad3e 100644 --- a/include/text.php +++ b/include/text.php @@ -225,6 +225,9 @@ if(! function_exists('paginate')) { function paginate(&$a) { $o = ''; $stripped = preg_replace('/(&page=[0-9]*)/','',$a->query_string); + +// $stripped = preg_replace('/&zrl=(.*?)([\?&]|$)/ism','',$stripped); + $stripped = str_replace('q=','',$stripped); $stripped = trim($stripped,'/'); $pagenum = $a->pager['page']; diff --git a/index.php b/index.php index a51e33e260..e7227962f4 100755 --- a/index.php +++ b/index.php @@ -95,6 +95,7 @@ if((x($_SESSION,'language')) && ($_SESSION['language'] !== $lang)) { if(x($_GET,'zrl')) { $_SESSION['my_url'] = $_GET['zrl']; + $a->query_string = preg_replace('/[\?&]zrl=(.*?)([\?&]|$)/is','',$a->query_string); } /** From 2352e6c1cbce57b8d6650360bfe322f34d229140 Mon Sep 17 00:00:00 2001 From: friendica Date: Mon, 2 Apr 2012 01:46:35 -0700 Subject: [PATCH 02/10] make the "new calendar" (javascript interactive) the default --- mod/events.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mod/events.php b/mod/events.php index 0906d16c2e..e66a2dc442 100755 --- a/mod/events.php +++ b/mod/events.php @@ -284,11 +284,11 @@ function events_content(&$a) { if (x($_GET,'id')){ $tpl = get_markup_template("event.tpl"); } else { - if (get_config('experimentals','new_calendar')==1){ +// if (get_config('experimentals','new_calendar')==1){ $tpl = get_markup_template("events-js.tpl"); - } else { - $tpl = get_markup_template("events.tpl"); - } +// } else { +// $tpl = get_markup_template("events.tpl"); +// } } $o = replace_macros($tpl, array( '$baseurl' => $a->get_baseurl(), From 9faa940f044dd47687a008272c727f8f8dac9fec Mon Sep 17 00:00:00 2001 From: tommy tomson Date: Mon, 2 Apr 2012 15:06:55 +0200 Subject: [PATCH 03/10] diabook-themes: bugfixes / css-fixes --- view/theme/diabook-aerith/profile_vcard.tpl | 4 ++-- view/theme/diabook-aerith/style-network.css | 2 +- view/theme/diabook-aerith/style-profile.css | 3 ++- view/theme/diabook-aerith/style.css | 1 + view/theme/diabook-blue/profile_vcard.tpl | 4 ++-- view/theme/diabook-blue/style-network.css | 2 +- view/theme/diabook-blue/style-profile.css | 3 ++- view/theme/diabook-blue/style.css | 1 + view/theme/diabook-red/profile_vcard.tpl | 4 ++-- view/theme/diabook-red/style-network.css | 2 +- view/theme/diabook-red/style-profile.css | 3 ++- view/theme/diabook-red/style.css | 1 + view/theme/diabook/profile_vcard.tpl | 4 ++-- view/theme/diabook/style-network.css | 2 +- view/theme/diabook/style-profile.css | 5 ++++- view/theme/diabook/style.css | 3 +++ view/theme/diabook/theme.php | 3 ++- 17 files changed, 30 insertions(+), 17 deletions(-) diff --git a/view/theme/diabook-aerith/profile_vcard.tpl b/view/theme/diabook-aerith/profile_vcard.tpl index 918cfc97cb..e28ec29097 100644 --- a/view/theme/diabook-aerith/profile_vcard.tpl +++ b/view/theme/diabook-aerith/profile_vcard.tpl @@ -21,9 +21,9 @@ - {{ if $pdesc }}
$profile.pdesc
{{ endif }} -
$profile.name
+
$profile.name
+ {{ if $pdesc }}
$profile.pdesc
{{ endif }} {{ if $location }} diff --git a/view/theme/diabook-aerith/style-network.css b/view/theme/diabook-aerith/style-network.css index f6c7bc69a0..79ab1d04fc 100644 --- a/view/theme/diabook-aerith/style-network.css +++ b/view/theme/diabook-aerith/style-network.css @@ -1256,7 +1256,7 @@ right_aside { /* background: #F1F1F1; */ } right_aside a{color: #3465A4;} -right_aside h3 {border-bottom: 1px solid #D2D2D2; padding-top: 5px; padding-bottom: 0px; padding-left: 5px; margin-bottom: 0px; +right_aside h3 {border-bottom: 1px solid #D2D2D2; padding-top: 5px; padding-bottom: 0px; padding-left: 3px; margin-bottom: 0px; margin-top:30px;} right_aside .directory-item { width: 50px; height: 50px; vertical-align: center; text-align: center; } right_aside .directory-photo { margin: 0px; } diff --git a/view/theme/diabook-aerith/style-profile.css b/view/theme/diabook-aerith/style-profile.css index c4f89359a9..74f2a48d1c 100644 --- a/view/theme/diabook-aerith/style-profile.css +++ b/view/theme/diabook-aerith/style-profile.css @@ -1251,7 +1251,7 @@ right_aside { /* background: #F1F1F1; */ } right_aside a{color: #3465A4;} -right_aside h3 {border-bottom: 1px solid #D2D2D2; padding-top: 5px; padding-bottom: 0px; padding-left: 5px; margin-bottom: 0px; +right_aside h3 {border-bottom: 1px solid #D2D2D2; padding-top: 5px; padding-bottom: 0px; padding-left: 3px; margin-bottom: 0px; margin-top:30px;} right_aside .directory-item { width: 50px; height: 50px; vertical-align: center; text-align: center; } right_aside .directory-photo { margin: 0px; } @@ -2076,6 +2076,7 @@ box-shadow: 2px 2px 5px 0px #000000; margin: 2px 5px 2px 5px; max-height: 85%; max-width: 85%; +border-radius: 10px; } .lframe { float: left; diff --git a/view/theme/diabook-aerith/style.css b/view/theme/diabook-aerith/style.css index 796af62eda..189d6252b7 100644 --- a/view/theme/diabook-aerith/style.css +++ b/view/theme/diabook-aerith/style.css @@ -2096,6 +2096,7 @@ box-shadow: 2px 2px 5px 0px #000000; margin: 2px 5px 2px 5px; max-height: 85%; max-width: 85%; +border-radius: 10px; } .lframe { float: left; diff --git a/view/theme/diabook-blue/profile_vcard.tpl b/view/theme/diabook-blue/profile_vcard.tpl index 918cfc97cb..e28ec29097 100644 --- a/view/theme/diabook-blue/profile_vcard.tpl +++ b/view/theme/diabook-blue/profile_vcard.tpl @@ -21,9 +21,9 @@ - {{ if $pdesc }}
$profile.pdesc
{{ endif }} -
$profile.name
+
$profile.name
+ {{ if $pdesc }}
$profile.pdesc
{{ endif }} {{ if $location }} diff --git a/view/theme/diabook-blue/style-network.css b/view/theme/diabook-blue/style-network.css index 5d16cde9ee..224e6a9313 100644 --- a/view/theme/diabook-blue/style-network.css +++ b/view/theme/diabook-blue/style-network.css @@ -1215,7 +1215,7 @@ right_aside { /* background: #F1F1F1; */ } right_aside a{color: #1872A2;} -right_aside h3 {border-bottom: 1px solid #D2D2D2; padding-top: 5px; padding-bottom: 0px; padding-left: 5px; margin-bottom: 0px; +right_aside h3 {border-bottom: 1px solid #D2D2D2; padding-top: 5px; padding-bottom: 0px; padding-left: 3px; margin-bottom: 0px; margin-top:30px;} right_aside .directory-item { width: 50px; height: 50px; vertical-align: center; text-align: center; } right_aside .directory-photo { margin: 0px; } diff --git a/view/theme/diabook-blue/style-profile.css b/view/theme/diabook-blue/style-profile.css index 528327ac3b..a84b2df349 100644 --- a/view/theme/diabook-blue/style-profile.css +++ b/view/theme/diabook-blue/style-profile.css @@ -1214,7 +1214,7 @@ right_aside { /* background: #F1F1F1; */ } right_aside a{color: #1872A2;} -right_aside h3 {border-bottom: 1px solid #D2D2D2; padding-top: 5px; padding-bottom: 0px; padding-left: 5px; margin-bottom: 0px; +right_aside h3 {border-bottom: 1px solid #D2D2D2; padding-top: 5px; padding-bottom: 0px; padding-left: 3px; margin-bottom: 0px; margin-top:30px;} right_aside .directory-item { width: 50px; height: 50px; vertical-align: center; text-align: center; } right_aside .directory-photo { margin: 0px; } @@ -2035,6 +2035,7 @@ box-shadow: 2px 2px 5px 0px #000000; margin: 2px 5px 2px 5px; max-height: 85%; max-width: 85%; +border-radius: 10px; } .lframe { float: left; diff --git a/view/theme/diabook-blue/style.css b/view/theme/diabook-blue/style.css index b4289dc0f0..867d5b88f8 100644 --- a/view/theme/diabook-blue/style.css +++ b/view/theme/diabook-blue/style.css @@ -2044,6 +2044,7 @@ box-shadow: 2px 2px 5px 0px #000000; margin: 2px 5px 2px 5px; max-height: 85%; max-width: 85%; +border-radius: 10px; } .lframe { float: left; diff --git a/view/theme/diabook-red/profile_vcard.tpl b/view/theme/diabook-red/profile_vcard.tpl index 918cfc97cb..e28ec29097 100644 --- a/view/theme/diabook-red/profile_vcard.tpl +++ b/view/theme/diabook-red/profile_vcard.tpl @@ -21,9 +21,9 @@ - {{ if $pdesc }}
$profile.pdesc
{{ endif }} -
$profile.name
+
$profile.name
+ {{ if $pdesc }}
$profile.pdesc
{{ endif }} {{ if $location }} diff --git a/view/theme/diabook-red/style-network.css b/view/theme/diabook-red/style-network.css index c7063860f2..145852d968 100644 --- a/view/theme/diabook-red/style-network.css +++ b/view/theme/diabook-red/style-network.css @@ -1253,7 +1253,7 @@ right_aside { /* background: #F1F1F1; */ } right_aside a{color: red;} -right_aside h3 {border-bottom: 1px solid #D2D2D2; padding-top: 5px; padding-bottom: 0px; padding-left: 5px; margin-bottom: 0px; +right_aside h3 {border-bottom: 1px solid #D2D2D2; padding-top: 5px; padding-bottom: 0px; padding-left: 3px; margin-bottom: 0px; margin-top:30px;} right_aside .directory-item { width: 50px; height: 50px; vertical-align: center; text-align: center; } right_aside .directory-photo { margin: 0px; } diff --git a/view/theme/diabook-red/style-profile.css b/view/theme/diabook-red/style-profile.css index 5124ed8c0d..37790584d9 100644 --- a/view/theme/diabook-red/style-profile.css +++ b/view/theme/diabook-red/style-profile.css @@ -1231,7 +1231,7 @@ right_aside { /* background: #F1F1F1; */ } right_aside a{color: red;} -right_aside h3 {border-bottom: 1px solid #D2D2D2; padding-top: 5px; padding-bottom: 0px; padding-left: 5px; margin-bottom: 0px; +right_aside h3 {border-bottom: 1px solid #D2D2D2; padding-top: 5px; padding-bottom: 0px; padding-left: 3px; margin-bottom: 0px; margin-top:30px;} right_aside .directory-item { width: 50px; height: 50px; vertical-align: center; text-align: center; } right_aside .directory-photo { margin: 0px; } @@ -2057,6 +2057,7 @@ box-shadow: 2px 2px 5px 0px #000000; margin: 2px 5px 2px 5px; max-height: 85%; max-width: 85%; +border-radius: 10px; } .lframe { float: left; diff --git a/view/theme/diabook-red/style.css b/view/theme/diabook-red/style.css index 578a5473a8..92ede79be4 100644 --- a/view/theme/diabook-red/style.css +++ b/view/theme/diabook-red/style.css @@ -2081,6 +2081,7 @@ box-shadow: 2px 2px 5px 0px #000000; margin: 2px 5px 2px 5px; max-height: 85%; max-width: 85%; +border-radius: 10px; } .lframe { float: left; diff --git a/view/theme/diabook/profile_vcard.tpl b/view/theme/diabook/profile_vcard.tpl index 918cfc97cb..e28ec29097 100644 --- a/view/theme/diabook/profile_vcard.tpl +++ b/view/theme/diabook/profile_vcard.tpl @@ -21,9 +21,9 @@ - {{ if $pdesc }}
$profile.pdesc
{{ endif }} -
$profile.name
+
$profile.name
+ {{ if $pdesc }}
$profile.pdesc
{{ endif }} {{ if $location }} diff --git a/view/theme/diabook/style-network.css b/view/theme/diabook/style-network.css index 518e7b88d7..641d35b392 100644 --- a/view/theme/diabook/style-network.css +++ b/view/theme/diabook/style-network.css @@ -1196,7 +1196,7 @@ right_aside { /* background: #F1F1F1; */ } -right_aside h3 {border-bottom: 1px solid #D2D2D2; padding-top: 5px; padding-bottom: 0px; padding-left: 5px; margin-bottom: 0px; +right_aside h3 {border-bottom: 1px solid #D2D2D2; padding-top: 5px; padding-bottom: 0px; padding-left: 3px; margin-bottom: 0px; margin-top:30px;} right_aside .directory-item { width: 50px; height: 50px; vertical-align: center; text-align: center; } right_aside .directory-photo { margin: 0px; } diff --git a/view/theme/diabook/style-profile.css b/view/theme/diabook/style-profile.css index 0077510a1d..54b282310d 100644 --- a/view/theme/diabook/style-profile.css +++ b/view/theme/diabook/style-profile.css @@ -1191,7 +1191,7 @@ right_aside { /* background: #F1F1F1; */ } -right_aside h3 {border-bottom: 1px solid #D2D2D2; padding-top: 5px; padding-bottom: 0px; padding-left: 5px; margin-bottom: 0px; +right_aside h3 {border-bottom: 1px solid #D2D2D2; padding-top: 5px; padding-bottom: 0px; padding-left: 3px; margin-bottom: 0px; margin-top:30px;} right_aside .directory-item { width: 50px; height: 50px; vertical-align: center; text-align: center; } right_aside .directory-photo { margin: 0px; } @@ -2003,6 +2003,9 @@ ul.tabs li .active { float: left; } /* photo */ +.photo { +border-radius: 10px; + } .lframe { float: left; } diff --git a/view/theme/diabook/style.css b/view/theme/diabook/style.css index 97a26a41d9..99bf1b3357 100644 --- a/view/theme/diabook/style.css +++ b/view/theme/diabook/style.css @@ -2014,6 +2014,9 @@ ul.tabs li .active { float: left; } /* photo */ +.photo { +border-radius: 10px; + } .lframe { float: left; } diff --git a/view/theme/diabook/theme.php b/view/theme/diabook/theme.php index d6ee57316a..a535ed07e3 100755 --- a/view/theme/diabook/theme.php +++ b/view/theme/diabook/theme.php @@ -169,7 +169,8 @@ function diabook_community_info(){ $pagelist = array(); $contacts = q("SELECT `id`, `url`, `name`, `micro`FROM `contact` - WHERE `network`= 'dfrn' AND `forum` = 1 AND `uid` = %d", + WHERE `network`= 'dfrn' AND `forum` = 1 AND `uid` = %d + ORDER BY `name` ASC", intval($a->user['uid']) ); From b5d57d5313b61842a72f0e2ad002cf633aa72dd7 Mon Sep 17 00:00:00 2001 From: tommy tomson Date: Mon, 2 Apr 2012 17:17:14 +0200 Subject: [PATCH 04/10] diabook-themes: fixed pageheader --- view/theme/diabook-aerith/style-network.css | 6 +- view/theme/diabook-aerith/style-profile.css | 7 +- view/theme/diabook-aerith/style-settings.css | 6 +- view/theme/diabook-aerith/style.css | 6 +- view/theme/diabook-blue/style-network.css | 6 +- view/theme/diabook-blue/style-profile.css | 6 +- view/theme/diabook-blue/style-settings.css | 6 +- view/theme/diabook-blue/style.css | 6 +- view/theme/diabook-red/style-network.css | 6 +- view/theme/diabook-red/style-profile.css | 6 +- view/theme/diabook-red/style-settings.css | 6 +- view/theme/diabook-red/style.css | 6 +- view/theme/diabook/style-network.css | 6 +- view/theme/diabook/style-profile.css | 6 +- view/theme/diabook/style-settings.css | 7 +- view/theme/diabook/style.css | 6 +- view/theme/diabook/theme.php | 68 ++++++++++---------- 17 files changed, 98 insertions(+), 68 deletions(-) diff --git a/view/theme/diabook-aerith/style-network.css b/view/theme/diabook-aerith/style-network.css index 79ab1d04fc..3e6e44f280 100644 --- a/view/theme/diabook-aerith/style-network.css +++ b/view/theme/diabook-aerith/style-network.css @@ -1198,8 +1198,10 @@ section { body .pageheader{ text-align: center; - margin-top: 25px; - font-size: 0px; + font-size: 20px; + margin-bottom: 20px; + margin-top: 0px; + max-width: 575px; } #id_username { diff --git a/view/theme/diabook-aerith/style-profile.css b/view/theme/diabook-aerith/style-profile.css index 74f2a48d1c..ef09829d40 100644 --- a/view/theme/diabook-aerith/style-profile.css +++ b/view/theme/diabook-aerith/style-profile.css @@ -1193,10 +1193,11 @@ section { body .pageheader{ text-align: center; - margin-top: 25px; - font-size: 0px; + font-size: 20px; + margin-bottom: 20px; + margin-top: 0px; + max-width: 575px; } - #id_username { width: 173px; } diff --git a/view/theme/diabook-aerith/style-settings.css b/view/theme/diabook-aerith/style-settings.css index 0326dbcfca..8963065ca1 100644 --- a/view/theme/diabook-aerith/style-settings.css +++ b/view/theme/diabook-aerith/style-settings.css @@ -1191,8 +1191,10 @@ section { body .pageheader{ text-align: center; - margin-top: 25px; - font-size: 0px; + font-size: 20px; + margin-bottom: 20px; + margin-top: 0px; + max-width: 575px; } #id_username { diff --git a/view/theme/diabook-aerith/style.css b/view/theme/diabook-aerith/style.css index 189d6252b7..3f11e71ef0 100644 --- a/view/theme/diabook-aerith/style.css +++ b/view/theme/diabook-aerith/style.css @@ -1254,8 +1254,10 @@ section { } body .pageheader{ text-align: center; - margin-top: 25px; - font-size: 0px; + font-size: 20px; + margin-bottom: 20px; + margin-top: 0px; + max-width: 575px; } #id_username { diff --git a/view/theme/diabook-blue/style-network.css b/view/theme/diabook-blue/style-network.css index 224e6a9313..08dc870764 100644 --- a/view/theme/diabook-blue/style-network.css +++ b/view/theme/diabook-blue/style-network.css @@ -1160,8 +1160,10 @@ section { body .pageheader{ text-align: center; - margin-top: 25px; - font-size: 0px; + font-size: 20px; + margin-bottom: 20px; + margin-top: 0px; + max-width: 575px; } #id_username { diff --git a/view/theme/diabook-blue/style-profile.css b/view/theme/diabook-blue/style-profile.css index a84b2df349..81bbe03c6b 100644 --- a/view/theme/diabook-blue/style-profile.css +++ b/view/theme/diabook-blue/style-profile.css @@ -1159,8 +1159,10 @@ section { body .pageheader{ text-align: center; - margin-top: 25px; - font-size: 0px; + font-size: 20px; + margin-bottom: 20px; + margin-top: 0px; + max-width: 575px; } #id_username { diff --git a/view/theme/diabook-blue/style-settings.css b/view/theme/diabook-blue/style-settings.css index 197b53d306..2e7db1e1f2 100644 --- a/view/theme/diabook-blue/style-settings.css +++ b/view/theme/diabook-blue/style-settings.css @@ -1156,8 +1156,10 @@ section { body .pageheader{ text-align: center; - margin-top: 25px; - font-size: 0px; + font-size: 20px; + margin-bottom: 20px; + margin-top: 0px; + max-width: 575px; } #id_username { diff --git a/view/theme/diabook-blue/style.css b/view/theme/diabook-blue/style.css index 867d5b88f8..809ae8f612 100644 --- a/view/theme/diabook-blue/style.css +++ b/view/theme/diabook-blue/style.css @@ -1210,8 +1210,10 @@ section { } body .pageheader{ text-align: center; - margin-top: 25px; - font-size: 0px; + font-size: 20px; + margin-bottom: 20px; + margin-top: 0px; + max-width: 575px; } #id_username { diff --git a/view/theme/diabook-red/style-network.css b/view/theme/diabook-red/style-network.css index 145852d968..7301ace3f6 100644 --- a/view/theme/diabook-red/style-network.css +++ b/view/theme/diabook-red/style-network.css @@ -1198,8 +1198,10 @@ section { body .pageheader{ text-align: center; - margin-top: 25px; - font-size: 0px; + font-size: 20px; + margin-bottom: 20px; + margin-top: 0px; + max-width: 575px; } #id_username { diff --git a/view/theme/diabook-red/style-profile.css b/view/theme/diabook-red/style-profile.css index 37790584d9..59e57fdd65 100644 --- a/view/theme/diabook-red/style-profile.css +++ b/view/theme/diabook-red/style-profile.css @@ -1176,8 +1176,10 @@ section { body .pageheader{ text-align: center; - margin-top: 25px; - font-size: 0px; + font-size: 20px; + margin-bottom: 20px; + margin-top: 0px; + max-width: 575px; } #id_username { diff --git a/view/theme/diabook-red/style-settings.css b/view/theme/diabook-red/style-settings.css index 9407c68f9e..43bb3d0374 100644 --- a/view/theme/diabook-red/style-settings.css +++ b/view/theme/diabook-red/style-settings.css @@ -1173,8 +1173,10 @@ section { body .pageheader{ text-align: center; - margin-top: 25px; - font-size: 0px; + font-size: 20px; + margin-bottom: 20px; + margin-top: 0px; + max-width: 575px; } #id_username { diff --git a/view/theme/diabook-red/style.css b/view/theme/diabook-red/style.css index 92ede79be4..ef498e6390 100644 --- a/view/theme/diabook-red/style.css +++ b/view/theme/diabook-red/style.css @@ -1243,8 +1243,10 @@ section { } body .pageheader{ text-align: center; - margin-top: 25px; - font-size: 0px; + font-size: 20px; + margin-bottom: 20px; + margin-top: 0px; + max-width: 575px; } #id_username { diff --git a/view/theme/diabook/style-network.css b/view/theme/diabook/style-network.css index 641d35b392..2044e1126e 100644 --- a/view/theme/diabook/style-network.css +++ b/view/theme/diabook/style-network.css @@ -1144,8 +1144,10 @@ section { body .pageheader{ text-align: center; - margin-top: 25px; - font-size: 0px; + font-size: 20px; + margin-bottom: 20px; + margin-top: 0px; + max-width: 575px; } #id_username { diff --git a/view/theme/diabook/style-profile.css b/view/theme/diabook/style-profile.css index 54b282310d..2664adfc5a 100644 --- a/view/theme/diabook/style-profile.css +++ b/view/theme/diabook/style-profile.css @@ -1138,8 +1138,10 @@ section { body .pageheader{ text-align: center; - margin-top: 25px; - font-size: 0px; + font-size: 20px; + margin-bottom: 20px; + margin-top: 0px; + max-width: 575px; } #id_username { diff --git a/view/theme/diabook/style-settings.css b/view/theme/diabook/style-settings.css index 46f7e957e9..b23c2bb1bc 100644 --- a/view/theme/diabook/style-settings.css +++ b/view/theme/diabook/style-settings.css @@ -1135,8 +1135,11 @@ section { body .pageheader{ text-align: center; - margin-top: 25px; - font-size: 0px; + font-size: 20px; + max-width: 575px; + margin-bottom: 20px; + margin-top: 0px; + max-width: 575px; } #id_username { diff --git a/view/theme/diabook/style.css b/view/theme/diabook/style.css index 99bf1b3357..4ce3068f06 100644 --- a/view/theme/diabook/style.css +++ b/view/theme/diabook/style.css @@ -1190,8 +1190,10 @@ section { body .pageheader{ text-align: center; - margin-top: 25px; - font-size: 0px; + font-size: 20px; + margin-bottom: 20px; + margin-top: 0px; + max-width: 575px; } #id_username { diff --git a/view/theme/diabook/theme.php b/view/theme/diabook/theme.php index a535ed07e3..34e5535ded 100755 --- a/view/theme/diabook/theme.php +++ b/view/theme/diabook/theme.php @@ -265,7 +265,7 @@ if ($a->argv[0].$a->argv[1] === "profile".$a->user['nickname']){ } } -//tabs at right_aside on settings page +//tabs at aside on settings page if ($a->argv[0] === "settings"){ $tabs = array( @@ -324,55 +324,58 @@ $a->page['htmlhead'] .= sprintf(' + '; + +if ($a->argv[0].$a->argv[1] === "profile".$a->user['nickname'] or $a->argv[0] === "network" && local_user()){ +$a->page['htmlhead'] .= ' - - -EOT; +';} \ No newline at end of file From 076b1b374b864a4d45add31c72e447495dbe0339 Mon Sep 17 00:00:00 2001 From: tommy tomson Date: Mon, 2 Apr 2012 18:16:58 +0200 Subject: [PATCH 05/10] diabook-themes: fixes in js --- view/theme/diabook-aerith/theme.php | 75 +++++++++++++++-------------- view/theme/diabook-blue/theme.php | 75 +++++++++++++++-------------- view/theme/diabook-red/theme.php | 75 +++++++++++++++-------------- view/theme/diabook/theme.php | 2 +- 4 files changed, 115 insertions(+), 112 deletions(-) diff --git a/view/theme/diabook-aerith/theme.php b/view/theme/diabook-aerith/theme.php index 4900107507..f9be1b2327 100755 --- a/view/theme/diabook-aerith/theme.php +++ b/view/theme/diabook-aerith/theme.php @@ -3,7 +3,7 @@ /* * Name: Diabook-aerith * Description: Diabook-aerith : report bugs and request here: http://pad.toktan.org/p/diabook or contact me : thomas_bierey@friendica.eu - * Version: + * Version: (Version: 0.010) * Author: */ @@ -164,7 +164,8 @@ function diabook_aerith_community_info(){ $pagelist = array(); $contacts = q("SELECT `id`, `url`, `name`, `micro`FROM `contact` - WHERE `network`= 'dfrn' AND `forum` = 1 AND `uid` = %d", + WHERE `network`= 'dfrn' AND `forum` = 1 AND `uid` = %d + ORDER BY `name` ASC", intval($a->user['uid']) ); @@ -316,56 +317,58 @@ $a->page['htmlhead'] .= sprintf(''; - +if ($a->argv[0].$a->argv[1] === "profile".$a->user['nickname'] or $a->argv[0] === "network" && local_user()){ +$a->page['htmlhead'] .= ' - -EOT; - + $.cookie("close_pages","2", { expires: 365, path: "/" }); + $.cookie("close_helpers","2", { expires: 365, path: "/" }); + $.cookie("close_services","2", { expires: 365, path: "/" }); + $.cookie("close_friends","2", { expires: 365, path: "/" }); + $.cookie("close_postit","2", { expires: 365, path: "/" }); + $.cookie("close_lastusers","2", { expires: 365, path: "/" }); + $.cookie("close_lastphotos","2", { expires: 365, path: "/" }); + $.cookie("close_lastlikes","2", { expires: 365, path: "/" }); + alert("Right-hand column was restored. Please refresh your browser"); + }; +';} \ No newline at end of file diff --git a/view/theme/diabook-blue/theme.php b/view/theme/diabook-blue/theme.php index 891c13cbf3..3a1312fefa 100755 --- a/view/theme/diabook-blue/theme.php +++ b/view/theme/diabook-blue/theme.php @@ -3,7 +3,7 @@ /* * Name: Diabook-blue * Description: Diabook-blue: report bugs and request here: http://pad.toktan.org/p/diabook or contact me : thomas_bierey@friendica.eu - * Version: + * Version: (Version: 0.010) * Author: */ @@ -164,7 +164,8 @@ function diabook_blue_community_info(){ $pagelist = array(); $contacts = q("SELECT `id`, `url`, `name`, `micro`FROM `contact` - WHERE `network`= 'dfrn' AND `forum` = 1 AND `uid` = %d", + WHERE `network`= 'dfrn' AND `forum` = 1 AND `uid` = %d + ORDER BY `name` ASC", intval($a->user['uid']) ); @@ -316,56 +317,58 @@ $a->page['htmlhead'] .= sprintf(''; - +if ($a->argv[0].$a->argv[1] === "profile".$a->user['nickname'] or $a->argv[0] === "network" && local_user()){ +$a->page['htmlhead'] .= ' - -EOT; - + $.cookie("close_pages","2", { expires: 365, path: "/" }); + $.cookie("close_helpers","2", { expires: 365, path: "/" }); + $.cookie("close_services","2", { expires: 365, path: "/" }); + $.cookie("close_friends","2", { expires: 365, path: "/" }); + $.cookie("close_postit","2", { expires: 365, path: "/" }); + $.cookie("close_lastusers","2", { expires: 365, path: "/" }); + $.cookie("close_lastphotos","2", { expires: 365, path: "/" }); + $.cookie("close_lastlikes","2", { expires: 365, path: "/" }); + alert("Right-hand column was restored. Please refresh your browser"); + }; +';} diff --git a/view/theme/diabook-red/theme.php b/view/theme/diabook-red/theme.php index 44a76a5e45..79045c979d 100755 --- a/view/theme/diabook-red/theme.php +++ b/view/theme/diabook-red/theme.php @@ -3,7 +3,7 @@ /* * Name: Diabook-red * Description: Diabook-red: report bugs and request here: http://pad.toktan.org/p/diabook or contact me : thomas_bierey@friendica.eu - * Version: + * Version: (Version: 0.010) * Author: */ @@ -164,7 +164,8 @@ function diabook_red_community_info(){ $pagelist = array(); $contacts = q("SELECT `id`, `url`, `name`, `micro`FROM `contact` - WHERE `network`= 'dfrn' AND `forum` = 1 AND `uid` = %d", + WHERE `network`= 'dfrn' AND `forum` = 1 AND `uid` = %d + ORDER BY `name` ASC", intval($a->user['uid']) ); @@ -317,56 +318,58 @@ $a->page['htmlhead'] .= sprintf(''; - +if ($a->argv[0].$a->argv[1] === "profile".$a->user['nickname'] or $a->argv[0] === "network" && local_user()){ +$a->page['htmlhead'] .= ' - -EOT; - + $.cookie("close_pages","2", { expires: 365, path: "/" }); + $.cookie("close_helpers","2", { expires: 365, path: "/" }); + $.cookie("close_services","2", { expires: 365, path: "/" }); + $.cookie("close_friends","2", { expires: 365, path: "/" }); + $.cookie("close_postit","2", { expires: 365, path: "/" }); + $.cookie("close_lastusers","2", { expires: 365, path: "/" }); + $.cookie("close_lastphotos","2", { expires: 365, path: "/" }); + $.cookie("close_lastlikes","2", { expires: 365, path: "/" }); + alert("Right-hand column was restored. Please refresh your browser"); + }; +';} diff --git a/view/theme/diabook/theme.php b/view/theme/diabook/theme.php index 34e5535ded..d8f96e9f78 100755 --- a/view/theme/diabook/theme.php +++ b/view/theme/diabook/theme.php @@ -3,7 +3,7 @@ /* * Name: Diabook * Description: Diabook: report bugs and request here: http://pad.toktan.org/p/diabook or contact me : thomas_bierey@friendica.eu - * Version: + * Version: (Version: 0.010) * Author: */ From 6dfd55668f39d2cfb27d468cc982471abaad5165 Mon Sep 17 00:00:00 2001 From: tommy tomson Date: Mon, 2 Apr 2012 20:30:27 +0200 Subject: [PATCH 06/10] diabook-themes: css-fixes --- view/theme/diabook-aerith/jot.tpl | 2 +- view/theme/diabook-aerith/style-network.css | 9 ++++++++- view/theme/diabook-aerith/style-profile.css | 8 ++++++++ view/theme/diabook-aerith/style.css | 12 ++++++++++-- view/theme/diabook-aerith/theme.php | 2 +- view/theme/diabook-aerith/wallwall_item.tpl | 4 ++++ view/theme/diabook-blue/jot.tpl | 2 +- view/theme/diabook-blue/style-network.css | 9 ++++++++- view/theme/diabook-blue/style-profile.css | 9 ++++++++- view/theme/diabook-blue/style.css | 10 +++++++++- view/theme/diabook-blue/theme.php | 2 +- view/theme/diabook-blue/wallwall_item.tpl | 4 ++++ view/theme/diabook-red/jot.tpl | 2 +- view/theme/diabook-red/style-network.css | 9 ++++++++- view/theme/diabook-red/style-profile.css | 9 ++++++++- view/theme/diabook-red/style.css | 10 +++++++++- view/theme/diabook-red/theme.php | 2 +- view/theme/diabook-red/wallwall_item.tpl | 4 ++++ view/theme/diabook/jot.tpl | 2 +- view/theme/diabook/style-network.css | 8 ++++++++ view/theme/diabook/style-profile.css | 9 ++++++++- view/theme/diabook/style.css | 11 +++++++++-- view/theme/diabook/theme.php | 2 +- view/theme/diabook/wallwall_item.tpl | 4 ++++ 24 files changed, 125 insertions(+), 20 deletions(-) diff --git a/view/theme/diabook-aerith/jot.tpl b/view/theme/diabook-aerith/jot.tpl index 59066a19c5..ee30da7bf7 100755 --- a/view/theme/diabook-aerith/jot.tpl +++ b/view/theme/diabook-aerith/jot.tpl @@ -2,7 +2,6 @@
 
-
@@ -15,6 +14,7 @@ +
diff --git a/view/theme/diabook-aerith/style-network.css b/view/theme/diabook-aerith/style-network.css index 3e6e44f280..7e2c8f02b5 100644 --- a/view/theme/diabook-aerith/style-network.css +++ b/view/theme/diabook-aerith/style-network.css @@ -1203,7 +1203,9 @@ body .pageheader{ margin-top: 0px; max-width: 575px; } - +.qcomment{ + max-width: 122px; + } #id_username { width: 173px; } @@ -1615,6 +1617,11 @@ transition: all 0.2s ease-in-out; padding: 0.3em; margin-bottom: 10px; } +.grey +{ + display: inline; + float: right; + } #jot #jot-tools { margin: 0px; padding: 0px; diff --git a/view/theme/diabook-aerith/style-profile.css b/view/theme/diabook-aerith/style-profile.css index ef09829d40..29982c8c59 100644 --- a/view/theme/diabook-aerith/style-profile.css +++ b/view/theme/diabook-aerith/style-profile.css @@ -1198,6 +1198,9 @@ body .pageheader{ margin-top: 0px; max-width: 575px; } +.qcomment{ + max-width: 122px; + } #id_username { width: 173px; } @@ -1604,6 +1607,11 @@ transition: all 0.2s ease-in-out; padding: 0.3em; margin-bottom: 10px; } +.grey +{ + display: inline; + float: right; + } #jot #jot-tools { margin: 0px; padding: 0px; diff --git a/view/theme/diabook-aerith/style.css b/view/theme/diabook-aerith/style.css index 3f11e71ef0..14bbb6cdac 100644 --- a/view/theme/diabook-aerith/style.css +++ b/view/theme/diabook-aerith/style.css @@ -1,4 +1,4 @@ -/opt/lampp/htdocs/friendica/view/theme/diabook/search_item.tpl/** +/** * Fabio Comuni * Additional Changes: Michael Vogel **/ @@ -1062,6 +1062,7 @@ aside { float: left; /* background: #F1F1F1; */ } +aside #page-sidebar{display: none;} aside .vcard .fn { font-size: 18px; font-weight: bold; @@ -1259,7 +1260,9 @@ body .pageheader{ margin-top: 0px; max-width: 575px; } - +.qcomment{ + max-width: 122px; + } #id_username { width: 173px; } @@ -1624,6 +1627,11 @@ body .pageheader{ padding: 0.3em; margin-bottom: 10px; } +.grey +{ + display: inline; + float: right; + } #jot #jot-tools { margin: 0px; padding: 0px; diff --git a/view/theme/diabook-aerith/theme.php b/view/theme/diabook-aerith/theme.php index f9be1b2327..008e80c14e 100755 --- a/view/theme/diabook-aerith/theme.php +++ b/view/theme/diabook-aerith/theme.php @@ -3,7 +3,7 @@ /* * Name: Diabook-aerith * Description: Diabook-aerith : report bugs and request here: http://pad.toktan.org/p/diabook or contact me : thomas_bierey@friendica.eu - * Version: (Version: 0.010) + * Version: (Version: 1.011) * Author: */ diff --git a/view/theme/diabook-aerith/wallwall_item.tpl b/view/theme/diabook-aerith/wallwall_item.tpl index c5b6b36b54..6a0c93f884 100644 --- a/view/theme/diabook-aerith/wallwall_item.tpl +++ b/view/theme/diabook-aerith/wallwall_item.tpl @@ -71,6 +71,10 @@ {{ endif }} + {{ if $item.filer }} + + {{ endif }} + {{ if $item.plink }}$item.plink.title{{ endif }} diff --git a/view/theme/diabook-blue/jot.tpl b/view/theme/diabook-blue/jot.tpl index 9aef997873..bd43994b54 100755 --- a/view/theme/diabook-blue/jot.tpl +++ b/view/theme/diabook-blue/jot.tpl @@ -2,7 +2,6 @@
 
-
@@ -15,6 +14,7 @@ +
diff --git a/view/theme/diabook-blue/style-network.css b/view/theme/diabook-blue/style-network.css index 08dc870764..3542dc00cf 100644 --- a/view/theme/diabook-blue/style-network.css +++ b/view/theme/diabook-blue/style-network.css @@ -1165,7 +1165,9 @@ body .pageheader{ margin-top: 0px; max-width: 575px; } - +.qcomment{ + max-width: 122px; + } #id_username { width: 173px; } @@ -1573,6 +1575,11 @@ transition: all 0.2s ease-in-out; padding: 0.3em; margin-bottom: 10px; } +.grey +{ + display: inline; + float: right; + } #jot #jot-tools { margin: 0px; padding: 0px; diff --git a/view/theme/diabook-blue/style-profile.css b/view/theme/diabook-blue/style-profile.css index 81bbe03c6b..0b27e4a77e 100644 --- a/view/theme/diabook-blue/style-profile.css +++ b/view/theme/diabook-blue/style-profile.css @@ -1164,7 +1164,9 @@ body .pageheader{ margin-top: 0px; max-width: 575px; } - +.qcomment{ + max-width: 122px; + } #id_username { width: 173px; } @@ -1568,6 +1570,11 @@ transition: all 0.2s ease-in-out; padding: 0.3em; margin-bottom: 10px; } +.grey +{ + display: inline; + float: right; + } #jot #jot-tools { margin: 0px; padding: 0px; diff --git a/view/theme/diabook-blue/style.css b/view/theme/diabook-blue/style.css index 809ae8f612..8d3d854bac 100644 --- a/view/theme/diabook-blue/style.css +++ b/view/theme/diabook-blue/style.css @@ -1030,6 +1030,7 @@ aside { float: left; /* background: #F1F1F1; */ } +aside #page-sidebar{display: none;} aside .vcard .fn { font-size: 18px; font-weight: bold; @@ -1215,7 +1216,9 @@ body .pageheader{ margin-top: 0px; max-width: 575px; } - +.qcomment{ + max-width: 122px; + } #id_username { width: 173px; } @@ -1577,6 +1580,11 @@ body .pageheader{ padding: 0.3em; margin-bottom: 10px; } +.grey +{ + display: inline; + float: right; + } #jot #jot-tools { margin: 0px; padding: 0px; diff --git a/view/theme/diabook-blue/theme.php b/view/theme/diabook-blue/theme.php index 3a1312fefa..19468779ed 100755 --- a/view/theme/diabook-blue/theme.php +++ b/view/theme/diabook-blue/theme.php @@ -3,7 +3,7 @@ /* * Name: Diabook-blue * Description: Diabook-blue: report bugs and request here: http://pad.toktan.org/p/diabook or contact me : thomas_bierey@friendica.eu - * Version: (Version: 0.010) + * Version: (Version: 1.011) * Author: */ diff --git a/view/theme/diabook-blue/wallwall_item.tpl b/view/theme/diabook-blue/wallwall_item.tpl index c5b6b36b54..bee75ad99a 100644 --- a/view/theme/diabook-blue/wallwall_item.tpl +++ b/view/theme/diabook-blue/wallwall_item.tpl @@ -71,6 +71,10 @@ {{ endif }} + {{ if $item.filer }} + + {{ endif }} + {{ if $item.plink }}$item.plink.title{{ endif }} diff --git a/view/theme/diabook-red/jot.tpl b/view/theme/diabook-red/jot.tpl index 9aef997873..bd43994b54 100755 --- a/view/theme/diabook-red/jot.tpl +++ b/view/theme/diabook-red/jot.tpl @@ -2,7 +2,6 @@
 
-
@@ -15,6 +14,7 @@ +
diff --git a/view/theme/diabook-red/style-network.css b/view/theme/diabook-red/style-network.css index 7301ace3f6..bbd4ceeee4 100644 --- a/view/theme/diabook-red/style-network.css +++ b/view/theme/diabook-red/style-network.css @@ -1203,7 +1203,9 @@ body .pageheader{ margin-top: 0px; max-width: 575px; } - +.qcomment{ + max-width: 122px; + } #id_username { width: 173px; } @@ -1611,6 +1613,11 @@ transition: all 0.2s ease-in-out; padding: 0.3em; margin-bottom: 10px; } +.grey +{ + display: inline; + float: right; + } #jot #jot-tools { margin: 0px; padding: 0px; diff --git a/view/theme/diabook-red/style-profile.css b/view/theme/diabook-red/style-profile.css index 59e57fdd65..74217acf3c 100644 --- a/view/theme/diabook-red/style-profile.css +++ b/view/theme/diabook-red/style-profile.css @@ -1181,7 +1181,9 @@ body .pageheader{ margin-top: 0px; max-width: 575px; } - +.qcomment{ + max-width: 122px; + } #id_username { width: 173px; } @@ -1585,6 +1587,11 @@ transition: all 0.2s ease-in-out; padding: 0.3em; margin-bottom: 10px; } +.grey +{ + display: inline; + float: right; + } #jot #jot-tools { margin: 0px; padding: 0px; diff --git a/view/theme/diabook-red/style.css b/view/theme/diabook-red/style.css index ef498e6390..16c8fe6c59 100644 --- a/view/theme/diabook-red/style.css +++ b/view/theme/diabook-red/style.css @@ -1061,6 +1061,7 @@ aside { float: left; /* background: #F1F1F1; */ } +aside #page-sidebar{display: none;} aside .vcard .fn { font-size: 18px; font-weight: bold; @@ -1248,7 +1249,9 @@ body .pageheader{ margin-top: 0px; max-width: 575px; } - +.qcomment{ + max-width: 122px; + } #id_username { width: 173px; } @@ -1610,6 +1613,11 @@ body .pageheader{ padding: 0.3em; margin-bottom: 10px; } +.grey +{ + display: inline; + float: right; + } #jot #jot-tools { margin: 0px; padding: 0px; diff --git a/view/theme/diabook-red/theme.php b/view/theme/diabook-red/theme.php index 79045c979d..a6b2ea823b 100755 --- a/view/theme/diabook-red/theme.php +++ b/view/theme/diabook-red/theme.php @@ -3,7 +3,7 @@ /* * Name: Diabook-red * Description: Diabook-red: report bugs and request here: http://pad.toktan.org/p/diabook or contact me : thomas_bierey@friendica.eu - * Version: (Version: 0.010) + * Version: (Version: 1.011) * Author: */ diff --git a/view/theme/diabook-red/wallwall_item.tpl b/view/theme/diabook-red/wallwall_item.tpl index c5b6b36b54..bee75ad99a 100644 --- a/view/theme/diabook-red/wallwall_item.tpl +++ b/view/theme/diabook-red/wallwall_item.tpl @@ -71,6 +71,10 @@ {{ endif }} + {{ if $item.filer }} + + {{ endif }} + {{ if $item.plink }}$item.plink.title{{ endif }} diff --git a/view/theme/diabook/jot.tpl b/view/theme/diabook/jot.tpl index 9aef997873..bd43994b54 100755 --- a/view/theme/diabook/jot.tpl +++ b/view/theme/diabook/jot.tpl @@ -2,7 +2,6 @@
 
-
@@ -15,6 +14,7 @@ +
diff --git a/view/theme/diabook/style-network.css b/view/theme/diabook/style-network.css index 2044e1126e..d226c70fdb 100644 --- a/view/theme/diabook/style-network.css +++ b/view/theme/diabook/style-network.css @@ -1149,6 +1149,9 @@ body .pageheader{ margin-top: 0px; max-width: 575px; } +.qcomment{ + max-width: 122px; + } #id_username { width: 173px; @@ -1546,6 +1549,11 @@ transition: all 0.2s ease-in-out; padding: 0.3em; margin-bottom: 10px; } +.grey +{ + display: inline; + float: right; + } #jot #jot-tools { margin: 0px; padding: 0px; diff --git a/view/theme/diabook/style-profile.css b/view/theme/diabook/style-profile.css index 2664adfc5a..f1672f4b46 100644 --- a/view/theme/diabook/style-profile.css +++ b/view/theme/diabook/style-profile.css @@ -1143,7 +1143,9 @@ body .pageheader{ margin-top: 0px; max-width: 575px; } - +.qcomment{ + max-width: 122px; + } #id_username { width: 173px; } @@ -1541,6 +1543,11 @@ transition: all 0.2s ease-in-out; padding: 0.3em; margin-bottom: 10px; } +.grey +{ + display: inline; + float: right; + } #jot #jot-tools { margin: 0px; padding: 0px; diff --git a/view/theme/diabook/style.css b/view/theme/diabook/style.css index 4ce3068f06..c8efeab33e 100644 --- a/view/theme/diabook/style.css +++ b/view/theme/diabook/style.css @@ -1022,7 +1022,7 @@ aside { float: left; /* background: #F1F1F1; */ } - +aside #page-sidebar{display: none;} aside .vcard .fn { font-size: 18px; font-weight: bold; @@ -1195,7 +1195,9 @@ body .pageheader{ margin-top: 0px; max-width: 575px; } - +.qcomment{ + max-width: 122px; + } #id_username { width: 173px; } @@ -1552,6 +1554,11 @@ body .pageheader{ padding: 0.3em; margin-bottom: 10px; } +.grey +{ + display: inline; + float: right; + } #jot #jot-tools { margin: 0px; padding: 0px; diff --git a/view/theme/diabook/theme.php b/view/theme/diabook/theme.php index d8f96e9f78..2fe9850606 100755 --- a/view/theme/diabook/theme.php +++ b/view/theme/diabook/theme.php @@ -3,7 +3,7 @@ /* * Name: Diabook * Description: Diabook: report bugs and request here: http://pad.toktan.org/p/diabook or contact me : thomas_bierey@friendica.eu - * Version: (Version: 0.010) + * Version: (Version: 1.011) * Author: */ diff --git a/view/theme/diabook/wallwall_item.tpl b/view/theme/diabook/wallwall_item.tpl index c5b6b36b54..bee75ad99a 100644 --- a/view/theme/diabook/wallwall_item.tpl +++ b/view/theme/diabook/wallwall_item.tpl @@ -71,6 +71,10 @@ {{ endif }} + {{ if $item.filer }} + + {{ endif }} + {{ if $item.plink }}$item.plink.title{{ endif }} From 9391fc965d68fea5fc18e93a1583e90d8f11bd02 Mon Sep 17 00:00:00 2001 From: friendica Date: Mon, 2 Apr 2012 17:43:11 -0700 Subject: [PATCH 07/10] bug #363 and a couple of other reported ssl link issues --- boot.php | 2 +- mod/admin.php | 33 ++++++++++++++++++++++++++++++++- 2 files changed, 33 insertions(+), 2 deletions(-) diff --git a/boot.php b/boot.php index c2690f6ef0..bcc51a9958 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.1299' ); +define ( 'FRIENDICA_VERSION', '2.3.1300' ); define ( 'DFRN_PROTOCOL_VERSION', '2.23' ); define ( 'DB_UPDATE_VERSION', 1134 ); diff --git a/mod/admin.php b/mod/admin.php index 53b5ee3544..8caa763707 100755 --- a/mod/admin.php +++ b/mod/admin.php @@ -208,6 +208,38 @@ function admin_page_site_post(&$a){ $diaspora_enabled = ((x($_POST,'diaspora_enabled')) ? True : False); $ssl_policy = ((x($_POST,'ssl_policy')) ? intval($_POST['ssl_policy']) : 0); + if($ssl_policy != intval(get_config('system','ssl_policy'))) { + if($ssl_policy == SSL_POLICY_FULL) { + q("update `contact` set + `url` = replace(`url` , 'http:' , 'https:'), + `photo` = replace(`photo` , 'http:' , 'https:'), + `thumb` = replace(`thumb` , 'http:' , 'https:'), + `micro` = replace(`micro` , 'http:' , 'https:'), + `request` = replace(`request`, 'http:' , 'https:'), + `notify` = replace(`notify` , 'http:' , 'https:'), + `poll` = replace(`poll` , 'http:' , 'https:'), + `confirm` = replace(`confirm`, 'http:' , 'https:'), + `poco` = replace(`poco` , 'http:' , 'https:') + where `self` = 1" + ); + } + elseif($ssl_policy == SSL_POLICY_SELFSIGN) { + q("update `contact` set + `url` = replace(`url` , 'https:' , 'http:'), + `photo` = replace(`photo` , 'https:' , 'http:'), + `thumb` = replace(`thumb` , 'https:' , 'http:'), + `micro` = replace(`micro` , 'https:' , 'http:'), + `request` = replace(`request`, 'https:' , 'http:'), + `notify` = replace(`notify` , 'https:' , 'http:'), + `poll` = replace(`poll` , 'https:' , 'http:'), + `confirm` = replace(`confirm`, 'https:' , 'http:'), + `poco` = replace(`poco` , 'https:' , 'http:') + where `self` = 1" + ); + } + } + set_config('system','ssl_policy',$ssl_policy); + set_config('config','sitename',$sitename); if ($banner==""){ // don't know why, but del_config doesn't work... @@ -218,7 +250,6 @@ function admin_page_site_post(&$a){ } else { set_config('system','banner', $banner); } - set_config('system','ssl_policy',$ssl_policy); set_config('system','language', $language); set_config('system','theme', $theme); set_config('system','maximagesize', $maximagesize); From e1de2e3de0142c350fd74ea2161117ed61654dd6 Mon Sep 17 00:00:00 2001 From: friendica Date: Mon, 2 Apr 2012 19:38:13 -0700 Subject: [PATCH 08/10] don't change ssl settings on local photos for remote contact --- mod/dfrn_notify.php | 9 --------- 1 file changed, 9 deletions(-) diff --git a/mod/dfrn_notify.php b/mod/dfrn_notify.php index 8e4ce06719..4ce3246520 100755 --- a/mod/dfrn_notify.php +++ b/mod/dfrn_notify.php @@ -107,9 +107,6 @@ function dfrn_notify_post(&$a) { $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']); @@ -121,9 +118,6 @@ function dfrn_notify_post(&$a) { $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']); @@ -146,9 +140,6 @@ function dfrn_notify_post(&$a) { 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']), From f4721955dbfb23992c4acdadd05108cb1b92e2af Mon Sep 17 00:00:00 2001 From: friendica Date: Mon, 2 Apr 2012 21:01:19 -0700 Subject: [PATCH 09/10] more ssl policy fixes and prevent delivery to soapbox when using local delivery --- include/delivery.php | 50 ++++++++++++++++++++++++++++++++++++++++++++ include/notifier.php | 50 ++++++++++++++++++++++++++++++++++++++++++++ mod/dfrn_notify.php | 5 ----- 3 files changed, 100 insertions(+), 5 deletions(-) diff --git a/include/delivery.php b/include/delivery.php index 532dcd6991..2407f11c02 100755 --- a/include/delivery.php +++ b/include/delivery.php @@ -321,6 +321,56 @@ function delivery_run($argv, $argc){ $x[0]['writable'] = 1; } + + $ssl_policy = get_config('system','ssl_policy'); + // if contact's ssl policy changed, update our links + + $ssl_changed = false; + + if($ssl_policy == SSL_POLICY_SELFSIGN && strstr($x[0]['url'],'https:')) { + $ssl_changed = true; + $x[0]['url'] = str_replace('https:','http:',$x[0]['url']); + $x[0]['request'] = str_replace('https:','http:',$x[0]['request']); + $x[0]['notify'] = str_replace('https:','http:',$x[0]['notify']); + $x[0]['poll'] = str_replace('https:','http:',$x[0]['poll']); + $x[0]['confirm'] = str_replace('https:','http:',$x[0]['confirm']); + $x[0]['poco'] = str_replace('https:','http:',$x[0]['poco']); + } + + if($ssl_policy == SSL_POLICY_FULL && strstr($x[0]['url'],'http:')) { + $ssl_changed = true; + $x[0]['url'] = str_replace('http:','https:',$x[0]['url']); + $x[0]['request'] = str_replace('http:','https:',$x[0]['request']); + $x[0]['notify'] = str_replace('http:','https:',$x[0]['notify']); + $x[0]['poll'] = str_replace('http:','https:',$x[0]['poll']); + $x[0]['confirm'] = str_replace('http:','https:',$x[0]['confirm']); + $x[0]['poco'] = str_replace('http:','https:',$x[0]['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($x[0]['url']), + dbesc($x[0]['request']), + dbesc($x[0]['notify']), + dbesc($x[0]['poll']), + dbesc($x[0]['confirm']), + dbesc($x[0]['poco']), + intval($x[0]['id']) + ); + } + + // 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/notifier.php b/include/notifier.php index d63ad7ae7c..e91185c514 100755 --- a/include/notifier.php +++ b/include/notifier.php @@ -537,6 +537,56 @@ function notifier_run($argv, $argc){ $x[0]['writable'] = 1; } + $ssl_policy = get_config('system','ssl_policy'); + // if contact's ssl policy changed, update our links + + $ssl_changed = false; + + if($ssl_policy == SSL_POLICY_SELFSIGN && strstr($x[0]['url'],'https:')) { + $ssl_changed = true; + $x[0]['url'] = str_replace('https:','http:',$x[0]['url']); + $x[0]['request'] = str_replace('https:','http:',$x[0]['request']); + $x[0]['notify'] = str_replace('https:','http:',$x[0]['notify']); + $x[0]['poll'] = str_replace('https:','http:',$x[0]['poll']); + $x[0]['confirm'] = str_replace('https:','http:',$x[0]['confirm']); + $x[0]['poco'] = str_replace('https:','http:',$x[0]['poco']); + } + + if($ssl_policy == SSL_POLICY_FULL && strstr($x[0]['url'],'http:')) { + $ssl_changed = true; + $x[0]['url'] = str_replace('http:','https:',$x[0]['url']); + $x[0]['request'] = str_replace('http:','https:',$x[0]['request']); + $x[0]['notify'] = str_replace('http:','https:',$x[0]['notify']); + $x[0]['poll'] = str_replace('http:','https:',$x[0]['poll']); + $x[0]['confirm'] = str_replace('http:','https:',$x[0]['confirm']); + $x[0]['poco'] = str_replace('http:','https:',$x[0]['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($x[0]['url']), + dbesc($x[0]['request']), + dbesc($x[0]['notify']), + dbesc($x[0]['poll']), + dbesc($x[0]['confirm']), + dbesc($x[0]['poco']), + intval($x[0]['id']) + ); + } + + // 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/dfrn_notify.php b/mod/dfrn_notify.php index 4ce3246520..5d44e8144d 100755 --- a/mod/dfrn_notify.php +++ b/mod/dfrn_notify.php @@ -106,7 +106,6 @@ function dfrn_notify_post(&$a) { 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['request'] = str_replace('https:','http:',$importer['request']); $importer['notify'] = str_replace('https:','http:',$importer['notify']); $importer['poll'] = str_replace('https:','http:',$importer['poll']); @@ -117,7 +116,6 @@ function dfrn_notify_post(&$a) { 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['request'] = str_replace('http:','https:',$importer['request']); $importer['notify'] = str_replace('http:','https:',$importer['notify']); $importer['poll'] = str_replace('http:','https:',$importer['poll']); @@ -129,9 +127,6 @@ function dfrn_notify_post(&$a) { q("update contact set url = '%s', nurl = '%s', - photo = '%s', - thumb = '%s', - micro = '%s', request = '%s', notify = '%s', poll = '%s', From 5d0d9f877294258cb90e1c496b4db750ee99f3ca Mon Sep 17 00:00:00 2001 From: friendica Date: Mon, 2 Apr 2012 23:07:26 -0700 Subject: [PATCH 10/10] make contact ssl_policy change a function since it is used in a few places --- include/delivery.php | 44 +---------------------------------------- include/network.php | 45 ++++++++++++++++++++++++++++++++++++++++++ include/notifier.php | 47 ++++---------------------------------------- mod/dfrn_notify.php | 45 ++---------------------------------------- 4 files changed, 52 insertions(+), 129 deletions(-) diff --git a/include/delivery.php b/include/delivery.php index 2407f11c02..794b8f27a3 100755 --- a/include/delivery.php +++ b/include/delivery.php @@ -321,51 +321,9 @@ function delivery_run($argv, $argc){ $x[0]['writable'] = 1; } - $ssl_policy = get_config('system','ssl_policy'); - // if contact's ssl policy changed, update our links + fix_contact_ssl_policy($x[0],$ssl_policy); - $ssl_changed = false; - - if($ssl_policy == SSL_POLICY_SELFSIGN && strstr($x[0]['url'],'https:')) { - $ssl_changed = true; - $x[0]['url'] = str_replace('https:','http:',$x[0]['url']); - $x[0]['request'] = str_replace('https:','http:',$x[0]['request']); - $x[0]['notify'] = str_replace('https:','http:',$x[0]['notify']); - $x[0]['poll'] = str_replace('https:','http:',$x[0]['poll']); - $x[0]['confirm'] = str_replace('https:','http:',$x[0]['confirm']); - $x[0]['poco'] = str_replace('https:','http:',$x[0]['poco']); - } - - if($ssl_policy == SSL_POLICY_FULL && strstr($x[0]['url'],'http:')) { - $ssl_changed = true; - $x[0]['url'] = str_replace('http:','https:',$x[0]['url']); - $x[0]['request'] = str_replace('http:','https:',$x[0]['request']); - $x[0]['notify'] = str_replace('http:','https:',$x[0]['notify']); - $x[0]['poll'] = str_replace('http:','https:',$x[0]['poll']); - $x[0]['confirm'] = str_replace('http:','https:',$x[0]['confirm']); - $x[0]['poco'] = str_replace('http:','https:',$x[0]['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($x[0]['url']), - dbesc($x[0]['request']), - dbesc($x[0]['notify']), - dbesc($x[0]['poll']), - dbesc($x[0]['confirm']), - dbesc($x[0]['poco']), - intval($x[0]['id']) - ); - } - // If we are setup as a soapbox we aren't accepting input from this person if($x[0]['page-flags'] == PAGE_SOAPBOX) diff --git a/include/network.php b/include/network.php index 9e1ed2091d..38d0980d50 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 e91185c514..ca7c7b92eb 100755 --- a/include/notifier.php +++ b/include/notifier.php @@ -537,56 +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'); - // if contact's ssl policy changed, update our links + fix_contact_ssl_policy($x[0],$ssl_policy); - $ssl_changed = false; - - if($ssl_policy == SSL_POLICY_SELFSIGN && strstr($x[0]['url'],'https:')) { - $ssl_changed = true; - $x[0]['url'] = str_replace('https:','http:',$x[0]['url']); - $x[0]['request'] = str_replace('https:','http:',$x[0]['request']); - $x[0]['notify'] = str_replace('https:','http:',$x[0]['notify']); - $x[0]['poll'] = str_replace('https:','http:',$x[0]['poll']); - $x[0]['confirm'] = str_replace('https:','http:',$x[0]['confirm']); - $x[0]['poco'] = str_replace('https:','http:',$x[0]['poco']); - } - - if($ssl_policy == SSL_POLICY_FULL && strstr($x[0]['url'],'http:')) { - $ssl_changed = true; - $x[0]['url'] = str_replace('http:','https:',$x[0]['url']); - $x[0]['request'] = str_replace('http:','https:',$x[0]['request']); - $x[0]['notify'] = str_replace('http:','https:',$x[0]['notify']); - $x[0]['poll'] = str_replace('http:','https:',$x[0]['poll']); - $x[0]['confirm'] = str_replace('http:','https:',$x[0]['confirm']); - $x[0]['poco'] = str_replace('http:','https:',$x[0]['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($x[0]['url']), - dbesc($x[0]['request']), - dbesc($x[0]['notify']), - dbesc($x[0]['poll']), - dbesc($x[0]['confirm']), - dbesc($x[0]['poco']), - intval($x[0]['id']) - ); - } - // 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/dfrn_notify.php b/mod/dfrn_notify.php index 5d44e8144d..65d39d5fe1 100755 --- a/mod/dfrn_notify.php +++ b/mod/dfrn_notify.php @@ -99,51 +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['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['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', - request = '%s', - notify = '%s', - poll = '%s', - confirm = '%s', - poco = '%s' - where id = %d limit 1", - dbesc($importer['url']), - dbesc($importer['nurl']), - 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);