-- cgit v1.2.3 From 39a49d51e370f6421a065cd78594e849ef92ff73 Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 6 Mar 2012 16:28:52 -0800 Subject: remove stray debugging --- mod/display.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mod/display.php b/mod/display.php index 4f2e5ff9a..00f8b503a 100755 --- a/mod/display.php +++ b/mod/display.php @@ -34,7 +34,7 @@ function display_content(&$a) { $contact = null; $remote_contact = false; -dbg(1); + if(remote_user()) { $contact_id = $_SESSION['visitor_id']; $groups = init_groups_visitor($contact_id); @@ -138,7 +138,7 @@ dbg(1); } } -dbg(0); + return $o; } -- cgit v1.2.3 From 88cd5800cf2e22f365bc38f567fcc1627e9278a7 Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 6 Mar 2012 17:21:14 -0800 Subject: [privacy] rework latest fix --- include/security.php | 4 +++- mod/display.php | 3 --- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/include/security.php b/include/security.php index 6b8128bdd..c04491570 100755 --- a/include/security.php +++ b/include/security.php @@ -159,6 +159,7 @@ function permissions_sql($owner_id,$remote_verified = false,$groups = null) { AND allow_gid = '' AND deny_cid = '' AND deny_gid = '' + AND private = 0 "; /** @@ -199,10 +200,11 @@ function permissions_sql($owner_id,$remote_verified = false,$groups = null) { } $sql = sprintf( - " AND ( allow_cid = '' OR allow_cid REGEXP '<%d>' ) + " AND (( allow_cid = '' OR allow_cid REGEXP '<%d>' ) AND ( deny_cid = '' OR NOT deny_cid REGEXP '<%d>' ) AND ( allow_gid = '' OR allow_gid REGEXP '%s' ) AND ( deny_gid = '' OR NOT deny_gid REGEXP '%s') + OR private = 0 ) ", intval($remote_user), intval($remote_user), diff --git a/mod/display.php b/mod/display.php index 00f8b503a..f510f793d 100755 --- a/mod/display.php +++ b/mod/display.php @@ -87,9 +87,6 @@ function display_content(&$a) { $sql_extra = permissions_sql($a->profile['uid'],$remote_contact,$groups); - if(! local_user() && ! remote_user()) - $sql_extra .= " and `item`.`private` = 0 "; - $r = q("SELECT `item`.*, `item`.`id` AS `item_id`, `contact`.`name`, `contact`.`photo`, `contact`.`url`, `contact`.`rel`, `contact`.`network`, `contact`.`thumb`, `contact`.`self`, `contact`.`writable`, -- cgit v1.2.3 From 7ad2dd65654f6b1cb17ae98e65c3e95528d29e30 Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 6 Mar 2012 17:52:00 -0800 Subject: fix photos after permissions_sql change --- include/security.php | 80 +++++++++++++++++++++++++++++++++++++++++++++++++--- mod/display.php | 2 +- mod/profile.php | 2 +- 3 files changed, 78 insertions(+), 6 deletions(-) diff --git a/include/security.php b/include/security.php index c04491570..9042d4d64 100755 --- a/include/security.php +++ b/include/security.php @@ -149,6 +149,77 @@ function permissions_sql($owner_id,$remote_verified = false,$groups = null) { $local_user = local_user(); $remote_user = remote_user(); + /** + * Construct permissions + * + * default permissions - anonymous user + */ + + $sql = " AND allow_cid = '' + AND allow_gid = '' + AND deny_cid = '' + AND deny_gid = '' + "; + + /** + * Profile owner - everything is visible + */ + + if(($local_user) && ($local_user == $owner_id)) { + $sql = ''; + } + + /** + * Authenticated visitor. Unless pre-verified, + * check that the contact belongs to this $owner_id + * and load the groups the visitor belongs to. + * If pre-verified, the caller is expected to have already + * done this and passed the groups into this function. + */ + + elseif($remote_user) { + + if(! $remote_verified) { + $r = q("SELECT id FROM contact WHERE id = %d AND uid = %d AND blocked = 0 LIMIT 1", + intval($remote_user), + intval($owner_id) + ); + if(count($r)) { + $remote_verified = true; + $groups = init_groups_visitor($remote_user); + } + } + if($remote_verified) { + + $gs = '<<>>'; // should be impossible to match + + if(is_array($groups) && count($groups)) { + foreach($groups as $g) + $gs .= '|<' . intval($g) . '>'; + } + + $sql = sprintf( + " AND ( allow_cid = '' OR allow_cid REGEXP '<%d>' ) + AND ( deny_cid = '' OR NOT deny_cid REGEXP '<%d>' ) + AND ( allow_gid = '' OR allow_gid REGEXP '%s' ) + AND ( deny_gid = '' OR NOT deny_gid REGEXP '%s') + ", + intval($remote_user), + intval($remote_user), + dbesc($gs), + dbesc($gs) + ); + } + } + return $sql; +} + + +function item_permissions_sql($owner_id,$remote_verified = false,$groups = null) { + + $local_user = local_user(); + $remote_user = remote_user(); + /** * Construct permissions * @@ -200,11 +271,10 @@ function permissions_sql($owner_id,$remote_verified = false,$groups = null) { } $sql = sprintf( - " AND (( allow_cid = '' OR allow_cid REGEXP '<%d>' ) + " AND ( private = 0 OR (( allow_cid = '' OR allow_cid REGEXP '<%d>' ) AND ( deny_cid = '' OR NOT deny_cid REGEXP '<%d>' ) AND ( allow_gid = '' OR allow_gid REGEXP '%s' ) - AND ( deny_gid = '' OR NOT deny_gid REGEXP '%s') - OR private = 0 ) + AND ( deny_gid = '' OR NOT deny_gid REGEXP '%s'))) ", intval($remote_user), intval($remote_user), @@ -214,4 +284,6 @@ function permissions_sql($owner_id,$remote_verified = false,$groups = null) { } } return $sql; -} \ No newline at end of file +} + + diff --git a/mod/display.php b/mod/display.php index f510f793d..f428149e8 100755 --- a/mod/display.php +++ b/mod/display.php @@ -85,7 +85,7 @@ function display_content(&$a) { $o .= status_editor($a,$x,0,true); - $sql_extra = permissions_sql($a->profile['uid'],$remote_contact,$groups); + $sql_extra = item_permissions_sql($a->profile['uid'],$remote_contact,$groups); $r = q("SELECT `item`.*, `item`.`id` AS `item_id`, `contact`.`name`, `contact`.`photo`, `contact`.`url`, `contact`.`rel`, diff --git a/mod/profile.php b/mod/profile.php index 74e1a2302..1a701f407 100755 --- a/mod/profile.php +++ b/mod/profile.php @@ -159,7 +159,7 @@ function profile_content(&$a, $update = 0) { * Get permissions SQL - if $remote_contact is true, our remote user has been pre-verified and we already have fetched his/her groups */ - $sql_extra = permissions_sql($a->profile['profile_uid'],$remote_contact,$groups); + $sql_extra = item_permissions_sql($a->profile['profile_uid'],$remote_contact,$groups); if($update) { -- cgit v1.2.3 From ec3ce0535731694566ba20a7111b28d2422676eb Mon Sep 17 00:00:00 2001 From: tommy tomson Date: Wed, 7 Mar 2012 00:47:43 +0100 Subject: fix in navbar --- view/theme/diabook/icons/bug-x.gif | Bin 134 -> 0 bytes view/theme/diabook/nav.tpl | 11 ++++++++--- 2 files changed, 8 insertions(+), 3 deletions(-) delete mode 100644 view/theme/diabook/icons/bug-x.gif diff --git a/view/theme/diabook/icons/bug-x.gif b/view/theme/diabook/icons/bug-x.gif deleted file mode 100644 index 10936caa7..000000000 Binary files a/view/theme/diabook/icons/bug-x.gif and /dev/null differ diff --git a/view/theme/diabook/nav.tpl b/view/theme/diabook/nav.tpl index 3a36e7daa..dc339131d 100644 --- a/view/theme/diabook/nav.tpl +++ b/view/theme/diabook/nav.tpl @@ -136,11 +136,16 @@ + + -
-
$langselector
-
+ + + + {# -- cgit v1.2.3 From 66d2c52b5f076187f7b6b9eb3caa51b916a7da21 Mon Sep 17 00:00:00 2001 From: Simon L'nu Date: Wed, 7 Mar 2012 10:07:36 -0500 Subject: push fix for funky menu action. the overflow-x might break again for some people Signed-off-by: Simon L'nu --- view/theme/dispy/jot-header.tpl | 10 +++----- view/theme/dispy/jot.tpl | 12 ++++----- view/theme/dispy/style.css | 57 +++++++++++++++++++---------------------- 3 files changed, 35 insertions(+), 44 deletions(-) diff --git a/view/theme/dispy/jot-header.tpl b/view/theme/dispy/jot-header.tpl index e72000b4c..43dcdbb84 100644 --- a/view/theme/dispy/jot-header.tpl +++ b/view/theme/dispy/jot-header.tpl @@ -1,12 +1,7 @@ - - + +{{ endif }} diff --git a/view/theme/dispy/style.css b/view/theme/dispy/style.css index 558290c2f..472fd875c 100644 --- a/view/theme/dispy/style.css +++ b/view/theme/dispy/style.css @@ -143,7 +143,10 @@ a:hover { } .required { display: inline; - color: #ff0000; + color: #ff0; + font-size: 16px; + font-weight: bold; + margin: 3px; } .fakelink, .lockview { color: #3465a4; @@ -613,7 +616,8 @@ nav #nav-notifications-linkmenu.on .icon.s22.notify, nav #nav-notifications-link aside { position: absolute; right: 15px; - width: 230px; + width: 245px; + padding-top: 15px; font-size: smaller; } .vcard .fn { @@ -687,7 +691,7 @@ aside #viewcontacts { #jot #jot-tools { margin: 0px; padding: 0px; - height: 40px; + height: 35px; overflow: none; width: 100%; /*background-color: #0e232e;*/ @@ -757,23 +761,21 @@ aside #viewcontacts { margin-top: 10px; } #jot #jot-title { - border: 1px solid #aaa; + border: 1px solid #ccc; margin: 0 0 5px; height: 20px; width: 90%; font-weight: bold; border-radius: 5px; vertical-align: middle; - padding: 5px 1px; } #jot #character-counter { - width: 40px; - float: right; - text-align: right; - height: 20px; - line-height: 20px; - padding: 5px; - margin: 0 0 5px; + width: 6%; + float: right; + text-align: right; + height: 15px; + line-height: 20px; + padding: 2px 20px 5px 0; } #profile-jot-text_tbl { margin-bottom: 10px; @@ -782,15 +784,15 @@ aside #viewcontacts { width:99.900002% !important; } #profile-attach-wrapper, -#profile-audio, +#profile-audio-wrapper, #profile-link-wrapper, -#profile-location, -#profile-nolocation, +#profile-location-wrapper, +#profile-nolocation-wrapper, #profile-title-wrapper, #profile-upload-wrapper, -#profile-video { +#profile-video-wrapper { float: left; - margin-left: 10px; + margin: 0 20px 0 0; } #profile-rotator-wrapper { float: right; @@ -821,9 +823,10 @@ aside #viewcontacts { padding: 5px; } #jot-preview-link { - margin: 0 0 0 25px; + margin: 0 0 0 10px; border: 0; text-decoration: none; + float: right; } .icon-text-preview { margin: 0 0 -18px 0; @@ -833,9 +836,10 @@ aside #viewcontacts { background: url(icons.png) no-repeat -128px -40px; border: 0; text-decoration: none; + float: right; } #profile-jot-perms { - /*float: right;*/ + float: right; background-color: #555753; height: 22px; width: 20px; @@ -846,17 +850,18 @@ aside #viewcontacts { border: 0px; margin: 0 -4px 0 10px; } +#profile-jot-plugin-wrapper { + width: 1px; + margin: 10px 0 0 0; + float: right; +} #profile-jot-submit-wrapper { float: right; - width: 30%; + width: 100%; list-style: none; margin: 10px 0 0 0; padding: 0; } -#profile-jot-submit-wrapper li { - display: inline-block; - vertical-align: middle; -} #profile-jot-submit { height: 22px; background-color: #555753; @@ -866,6 +871,7 @@ aside #viewcontacts { border-radius: 0 5px 5px 0; border: 0; margin: 0; + float: right; } #jot-perms-icons { background-color: #555753; @@ -951,7 +957,7 @@ aside #viewcontacts { section { margin: 20px 6% 0 4%; font-size: 0.8em; - padding-right: 220px; + padding-right: 230px; min-width: 475px; } @@ -1726,11 +1732,10 @@ div[id$="wrapper"] br { margin: 30px 0px; } .profile-edit-side-div { - margin-top: 0px; + margin: 5px 2px 0 0; } .profile-edit-side-link { float: right; - margin: 0px 20px -18px 0; } .profile-listing { float: left; @@ -2119,8 +2124,6 @@ div[id$="wrapper"] br { } .field textarea { width: 80%; -} -.field textarea { height: 100px; } .field_help { @@ -2152,7 +2155,6 @@ div[id$="wrapper"] br { .hidden { display:none !important; } - .field.radio .field_help { margin-left: 0; } @@ -2280,12 +2282,12 @@ div[id$="wrapper"] br { .icon.drophide, .icon.delete { float: left; } -.icon.s22 { +/*.icon.s22 { display: block; background: url(icons.png) no-repeat; width: 22px; height: 22px; -} +}*/ .icon.s22.delete { display: block; background-position: -110px 0; -- cgit v1.2.3 From dd3b3c2454b98225e2251a890095e8a971fdb396 Mon Sep 17 00:00:00 2001 From: friendica Date: Wed, 7 Mar 2012 15:54:37 -0800 Subject: revup --- boot.php | 2 +- include/security.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/boot.php b/boot.php index ea2178231..4557f2f39 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.1273' ); +define ( 'FRIENDICA_VERSION', '2.3.1274' ); define ( 'DFRN_PROTOCOL_VERSION', '2.22' ); define ( 'DB_UPDATE_VERSION', 1131 ); diff --git a/include/security.php b/include/security.php index 9042d4d64..f469dad66 100755 --- a/include/security.php +++ b/include/security.php @@ -271,7 +271,7 @@ function item_permissions_sql($owner_id,$remote_verified = false,$groups = null) } $sql = sprintf( - " AND ( private = 0 OR (( allow_cid = '' OR allow_cid REGEXP '<%d>' ) + " AND ( private = 0 OR ( private = 1 AND wall = 1 AND ( allow_cid = '' OR allow_cid REGEXP '<%d>' ) AND ( deny_cid = '' OR NOT deny_cid REGEXP '<%d>' ) AND ( allow_gid = '' OR allow_gid REGEXP '%s' ) AND ( deny_gid = '' OR NOT deny_gid REGEXP '%s'))) -- cgit v1.2.3 From 395a9530dcbca95b2f2c7dde9df21ee1981fa19f Mon Sep 17 00:00:00 2001 From: friendica Date: Wed, 7 Mar 2012 18:23:55 -0800 Subject: still getting parent relays on remote systems --- include/items.php | 4 ++-- include/notifier.php | 2 +- js/fk.autocomplete.js | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/include/items.php b/include/items.php index fdff6b642..1a7aa6c46 100755 --- a/include/items.php +++ b/include/items.php @@ -1756,7 +1756,7 @@ function consume_feed($xml,$importer,&$contact, &$hub, $datedir = 0, $pass = 0) $datarray['uid'] = $importer['uid']; $datarray['contact-id'] = $contact['id']; - if(x($datarray,'owner-link') && strlen($datarray['owner-link']) && (! link_compare($datarray['owner-link'],$contact['url']))) { + if(! link_compare($datarray['owner-link'],$contact['url'])) { // The item owner info is not our contact. It's OK and is to be expected if this is a tgroup delivery, // but otherwise there's a possible data mixup on the sender's system. // the tgroup delivery code called from item_store will correct it if it's a forum, @@ -2477,7 +2477,7 @@ function local_delivery($importer,$data) { $datarray['uid'] = $importer['importer_uid']; $datarray['contact-id'] = $importer['id']; - if(x($datarray,'owner-link') && strlen($datarray['owner-link']) && (! link_compare($datarray['owner-link'],$importer['url']))) { + if(! link_compare($datarray['owner-link'],$contact['url'])) { // The item owner info is not our contact. It's OK and is to be expected if this is a tgroup delivery, // but otherwise there's a possible data mixup on the sender's system. // the tgroup delivery code called from item_store will correct it if it's a forum, diff --git a/include/notifier.php b/include/notifier.php index 4765cca06..5b23406fc 100755 --- a/include/notifier.php +++ b/include/notifier.php @@ -201,7 +201,7 @@ function notifier_run($argv, $argc){ // by stringing togther an array of retractions and sending them onward. - $localhost = $a->get_hostname(); + $localhost = str_replace('www.','',$a->get_hostname()); if(strpos($localhost,':')) $localhost = substr($localhost,0,strpos($localhost,':')); diff --git a/js/fk.autocomplete.js b/js/fk.autocomplete.js index 509466bd9..69fe77e8c 100755 --- a/js/fk.autocomplete.js +++ b/js/fk.autocomplete.js @@ -103,6 +103,7 @@ ACPopup.prototype._search = function(){ } else { txt = tinyMCE.activeEditor.getContent(); + // alert(that.searchText + ':' + t); newtxt = txt.replace(that.searchText,t+' '); tinyMCE.activeEditor.setContent(newtxt); tinyMCE.activeEditor.focus(); -- cgit v1.2.3 From 03b5e3aa0c99ce6c290156ddccc9cba6744f245d Mon Sep 17 00:00:00 2001 From: friendica Date: Wed, 7 Mar 2012 21:12:31 -0800 Subject: reworked fix from unary for bug #323 (due to incorrect use of array_key_exists()) --- mod/network.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mod/network.php b/mod/network.php index 8da1561a0..27c6e315b 100755 --- a/mod/network.php +++ b/mod/network.php @@ -470,7 +470,7 @@ function network_content(&$a, $update = 0) { if(count($r)) { foreach($r as $rr) - if(! array_key_exists($rr['item_id'],$parents_arr)) + if(! in_array($rr['item_id'],$parents_arr)) $parents_arr[] = $rr['item_id']; $parents_str = implode(', ', $parents_arr); -- cgit v1.2.3 From b7bfff12b9adc6fd4e5508719854dce37460e68c Mon Sep 17 00:00:00 2001 From: friendica Date: Thu, 8 Mar 2012 16:25:14 +1100 Subject: Update README --- README | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README b/README index 152d481ea..d85d98aad 100644 --- a/README +++ b/README @@ -1,4 +1,11 @@ Friendica Social Communications Server ====================================== +http://friendica.com + Welcome to the free social web. + + +Friendica is a communications platform for integrated social communications utilising decentralised communications and linkage to several indie social projects - as well as popular mainstream providers. + +Our mission is to free our friends and families from the clutches of data-harvesting corporations, and pave the way to a future where social communications are free and open and flow between alternate providers as easily as email does today. \ No newline at end of file -- cgit v1.2.3 From 1fcbc7aa5a0b560b99201320a64e4e7671665613 Mon Sep 17 00:00:00 2001 From: tommy tomson Date: Thu, 8 Mar 2012 14:49:07 +0100 Subject: add links to /profiles, add some icons to diabook/icons, fixes in css --- view/theme/diabook/icons/bluebug.png | Bin 0 -> 1032 bytes view/theme/diabook/icons/lupe.png | Bin 0 -> 697 bytes view/theme/diabook/nav.tpl | 8 ++++- view/theme/diabook/profile_vcard.tpl | 64 +++++++++++++++++++++++++++++++++++ view/theme/diabook/style.css | 35 ++++++++++++++++--- 5 files changed, 101 insertions(+), 6 deletions(-) create mode 100644 view/theme/diabook/icons/bluebug.png create mode 100755 view/theme/diabook/icons/lupe.png create mode 100644 view/theme/diabook/profile_vcard.tpl diff --git a/view/theme/diabook/icons/bluebug.png b/view/theme/diabook/icons/bluebug.png new file mode 100644 index 000000000..3979e7d8e Binary files /dev/null and b/view/theme/diabook/icons/bluebug.png differ diff --git a/view/theme/diabook/icons/lupe.png b/view/theme/diabook/icons/lupe.png new file mode 100755 index 000000000..f8b228347 Binary files /dev/null and b/view/theme/diabook/icons/lupe.png differ diff --git a/view/theme/diabook/nav.tpl b/view/theme/diabook/nav.tpl index dc339131d..c7c00e20c 100644 --- a/view/theme/diabook/nav.tpl +++ b/view/theme/diabook/nav.tpl @@ -119,7 +119,8 @@
  • $usermenu.1
  • {{ endfor }} - {{ if $nav.notifications }}
  • $nav.notifications.1
  • {{ endif }} + {{ if $nav.profiles }}
  • $nav.profiles.3
  • {{ endif }} + {{ if $nav.notifications }}
  • $nav.notifications.1
  • {{ endif }} {{ if $nav.messages }}
  • $nav.messages.1
  • {{ endif }} {{ if $nav.contacts }}
  • $nav.contacts.1
  • {{ endif }} @@ -141,6 +142,11 @@ +
    +
    $langselector
    +
    + +