aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjeroenpraat <jeroenpraat@xs4all.nl>2014-06-04 14:00:08 +0000
committerjeroenpraat <jeroenpraat@xs4all.nl>2014-06-04 14:00:08 +0000
commitd9688e5ab3bb1c33e432a14ac3455ecb7ca3a6b2 (patch)
treecd0a06052eb398d0401ca61314d9db8a6ce91599
parent5869836180d8721363294c5d8dbe64d6b54571c6 (diff)
parentd84f03d59b4b3f625b36852211698f5606b6b37c (diff)
downloadvolse-hubzilla-d9688e5ab3bb1c33e432a14ac3455ecb7ca3a6b2.tar.gz
volse-hubzilla-d9688e5ab3bb1c33e432a14ac3455ecb7ca3a6b2.tar.bz2
volse-hubzilla-d9688e5ab3bb1c33e432a14ac3455ecb7ca3a6b2.zip
Merge branch 'master' of https://github.com/friendica/red
-rw-r--r--app/suggest.apd4
-rw-r--r--app/suggest.pngbin0 -> 2164 bytes
-rw-r--r--doc/technical_faq.bb38
-rw-r--r--doc/troubleshooting.bb3
-rw-r--r--include/apps.php4
-rw-r--r--include/datetime.php5
-rw-r--r--include/event.php19
-rw-r--r--include/widgets.php4
-rw-r--r--mod/display.php9
-rw-r--r--mod/import.php8
-rw-r--r--mod/search.php21
-rw-r--r--version.inc2
-rw-r--r--view/js/icon_translate.js1
-rw-r--r--view/theme/redbasic/css/style.css4
-rwxr-xr-xview/tpl/direntry.tpl2
-rwxr-xr-xview/tpl/direntry_large.tpl2
-rwxr-xr-xview/tpl/match.tpl2
-rwxr-xr-xview/tpl/profile_vcard.tpl2
-rwxr-xr-xview/tpl/suggest_friends.tpl2
19 files changed, 109 insertions, 23 deletions
diff --git a/app/suggest.apd b/app/suggest.apd
new file mode 100644
index 000000000..ff82a73d3
--- /dev/null
+++ b/app/suggest.apd
@@ -0,0 +1,4 @@
+url: $baseurl/suggest
+requires: local_user
+name: Suggest
+photo: $baseurl/app/suggest.png
diff --git a/app/suggest.png b/app/suggest.png
new file mode 100644
index 000000000..6868da30f
--- /dev/null
+++ b/app/suggest.png
Binary files differ
diff --git a/doc/technical_faq.bb b/doc/technical_faq.bb
new file mode 100644
index 000000000..122e82ddb
--- /dev/null
+++ b/doc/technical_faq.bb
@@ -0,0 +1,38 @@
+These are common questions with answers which are almost always correct. Note these aren't the [i]only[/i] possible
+answers, they're merely the most probable answers. 90% of the time, these solutions should work. The other 10% of
+the time is when you should use a support forum.
+
+[b]I can log in, but there are no posts or webpages[/b]
+
+Your item table has crashed. Run the MySQL command repair table item;
+
+[b]Login doesn't work, immediately after login, the page reloads and I'm logged out[/b]
+
+Your session table has crashed. Run the MySQL command repair table session;
+
+[b]When I switch theme, I sometimes get elements of one theme superimposed on top of the other[/b]
+
+a) view/tpl/smarty3 isn't writeable by the webserver.
+
+b) You're using Midori.
+
+[b]My network tab won't load, it appears to be caused by a photo or video[/b]
+
+Your PHP memory limit is too low. Increase the size of the memory_limit directive in your php.ini
+
+[b]I have no communication with anybody[/b]
+
+You're listening on port 443, but do not have a valid SSL certificate. Note this applies even if your baseurl is http.
+Don't listen on port 443 if you cannot use it.
+
+[b]I can't see private resources[/b]
+
+You have disabled third party cookies.
+
+[b]What do I need to do when moving my hub to a different server[/b]
+
+1) Git clone on the new server. Repeat the process for any custom themes, and addons.
+2) Copy .htconfig.php
+3) Rsync everything in store/
+4) Rsync everything in custom/ (this will only exist if you have custom modules)
+5) Dump and restore DB.
diff --git a/doc/troubleshooting.bb b/doc/troubleshooting.bb
index ea7dbb11a..f5572c6ed 100644
--- a/doc/troubleshooting.bb
+++ b/doc/troubleshooting.bb
@@ -1,5 +1,6 @@
[b]Troubleshooting[/b]
+[li][zrl=[baseurl]/help/technical_faq]Technical FAQ[/zrl][/li]
[li][zrl=[baseurl]/help/problems-following-an-update]Problems following an update[/zrl][/li]
-Return to the [url=[baseurl]/help/main]Main documentation page[/url] \ No newline at end of file
+Return to the [url=[baseurl]/help/main]Main documentation page[/url]
diff --git a/include/apps.php b/include/apps.php
index a24d8e503..f7b09c7b6 100644
--- a/include/apps.php
+++ b/include/apps.php
@@ -131,7 +131,9 @@ function translate_system_apps(&$arr) {
'Mood' => t('Mood'),
'Poke' => t('Poke'),
'Chat' => t('Chat'),
- 'Search' => t('Search')
+ 'Search' => t('Search'),
+ 'Probe' => t('Probe'),
+ 'Suggest' => t('Suggest')
);
if(array_key_exists($arr['name'],$apps))
diff --git a/include/datetime.php b/include/datetime.php
index 4884cda11..0214b9e4c 100644
--- a/include/datetime.php
+++ b/include/datetime.php
@@ -484,11 +484,16 @@ function z_birthday($dob,$tz,$format="Y-m-d H:i:s") {
function update_birthdays() {
require_once('include/event.php');
+ require_once('include/permissions.php');
$r = q("SELECT * FROM abook left join xchan on abook_xchan = xchan_hash
WHERE abook_dob > utc_timestamp() + interval 7 day and abook_dob < utc_timestamp() + interval 14 day");
if($r) {
foreach($r as $rr) {
+
+ if(! perm_is_allowed($rr['abook_channel'],$rr['xchan_hash'],'send_stream'))
+ continue;
+
$ev = array();
$ev['uid'] = $rr['abook_channel'];
$ev['account'] = $rr['abook_account'];
diff --git a/include/event.php b/include/event.php
index 861d74f00..e198fe15c 100644
--- a/include/event.php
+++ b/include/event.php
@@ -318,7 +318,22 @@ function event_store_item($arr,$event) {
}
}
- $prefix = (($event['type'] === 'birthday') ? t('This event has been added to your calendar.') . "\n\n" : '');
+ $item_arr = array();
+ $prefix = '';
+ $birthday = false;
+
+ if($event['type'] === 'birthday') {
+ $prefix = t('This event has been added to your calendar.');
+ $birthday = true;
+
+ // The event is created on your own site by the system, but appears to belong
+ // to the birthday person. It also isn't propagated - so we need to prevent
+ // folks from trying to comment on it. If you're looking at this and trying to
+ // fix it, you'll need to completely change the way birthday events are created
+ // and send them out from the source. This has its own issues.
+
+ $item_arr['comment_policy'] = 'none';
+ }
$r = q("SELECT * FROM item left join xchan on author_xchan = xchan_hash WHERE resource_id = '%s' AND resource_type = 'event' and uid = %d LIMIT 1",
dbesc($event['event_hash']),
@@ -373,7 +388,6 @@ function event_store_item($arr,$event) {
$private = (($arr['allow_cid'] || $arr['allow_gid'] || $arr['deny_cid'] || $arr['deny_gid']) ? 1 : 0);
- $item_arr = array();
if($item) {
$item_arr['id'] = $item['id'];
@@ -387,6 +401,7 @@ function event_store_item($arr,$event) {
$item_flags |= ITEM_ORIGIN;
}
$item_arr['item_flags'] = $item_flags;
+
}
if(! $arr['mid'])
diff --git a/include/widgets.php b/include/widgets.php
index c7a4da6a0..96bced87f 100644
--- a/include/widgets.php
+++ b/include/widgets.php
@@ -196,7 +196,7 @@ function widget_savedsearch($arr) {
$a = get_app();
$search = ((x($_GET,'search')) ? $_GET['search'] : '');
-
+
if(x($_GET,'searchsave') && $search) {
$r = q("select * from `term` where `uid` = %d and `type` = %d and `term` = '%s' limit 1",
intval(local_user()),
@@ -264,7 +264,7 @@ function widget_savedsearch($arr) {
$o = replace_macros($tpl, array(
'$title' => t('Saved Searches'),
'$add' => t('add'),
- '$searchbox' => searchbox('','netsearch-box',$srchurl . (($hasq) ? '' : '?f='),true),
+ '$searchbox' => searchbox($search,'netsearch-box',$srchurl . (($hasq) ? '' : '?f='),true),
'$saved' => $saved,
));
diff --git a/mod/display.php b/mod/display.php
index efc3265c8..8eb271b9c 100644
--- a/mod/display.php
+++ b/mod/display.php
@@ -150,6 +150,9 @@ function display_content(&$a, $update = 0, $load = false) {
if($load || ($_COOKIE['jsAvailable'] != 1)) {
$r = null;
+ require_once('include/identity.php');
+ $sys = get_sys_channel();
+
if(local_user()) {
$r = q("SELECT * from item
WHERE item_restrict = 0
@@ -169,12 +172,14 @@ function display_content(&$a, $update = 0, $load = false) {
$r = q("SELECT * from item
WHERE item_restrict = 0
and mid = '%s'
- AND ((( `item`.`allow_cid` = '' AND `item`.`allow_gid` = '' AND `item`.`deny_cid` = ''
+ AND (((( `item`.`allow_cid` = '' AND `item`.`allow_gid` = '' AND `item`.`deny_cid` = ''
AND `item`.`deny_gid` = '' AND item_private = 0 )
and owner_xchan in ( " . stream_perms_xchans(($observer) ? PERMS_NETWORK : PERMS_PUBLIC) . " ))
+ OR owner_xchan = '%s')
$sql_extra )
group by mid limit 1",
- dbesc($target_item['parent_mid'])
+ dbesc($target_item['parent_mid']),
+ dbesc($sys['xchan_hash'])
);
}
diff --git a/mod/import.php b/mod/import.php
index 5b3b53156..d3b237c3a 100644
--- a/mod/import.php
+++ b/mod/import.php
@@ -254,12 +254,18 @@ function import_post(&$a) {
require_once('include/photo/photo_driver.php');
$photos = import_profile_photo($xchan['xchan_photo_l'],$xchan['xchan_hash']);
- $r = q("update xchan set xchan_photo_l = '%s', xchan_photo_m = '%s', xchan_photo_s = '%s', xchan_photo_mimetype = '%s'
+ if($photos[4])
+ $photodate = '0000-00-00 00:00:00';
+ else
+ $photodate = $xchan['xchan_photo_date'];
+
+ $r = q("update xchan set xchan_photo_l = '%s', xchan_photo_m = '%s', xchan_photo_s = '%s', xchan_photo_mimetype = '%s', xchan_photo_date = '%s'
where xchan_hash = '%s' limit 1",
dbesc($photos[0]),
dbesc($photos[1]),
dbesc($photos[2]),
dbesc($photos[3]),
+ dbesc($photodate),
dbesc($xchan_hash)
);
diff --git a/mod/search.php b/mod/search.php
index 82990913b..2c2e8c86a 100644
--- a/mod/search.php
+++ b/mod/search.php
@@ -39,7 +39,8 @@ function search_content(&$a,$update = 0, $load = false) {
$search = ((x($_GET,'tag')) ? trim(rawurldecode($_GET['tag'])) : '');
}
- $o .= search($search,'search-box','/search',((local_user()) ? true : false));
+ if((! local_user()) || (! feature_enabled(local_user(),'savedsearch')))
+ $o .= search($search,'search-box','/search',((local_user()) ? true : false));
if(strpos($search,'#') === 0) {
$tag = true;
@@ -114,6 +115,10 @@ function search_content(&$a,$update = 0, $load = false) {
$pub_sql = public_permissions_sql(get_observer_hash());
+ require_once('include/identity.php');
+
+ $sys = get_sys_channel();
+
if(($update) && ($load)) {
$itemspage = get_pconfig(local_user(),'system','itemspage');
$a->set_pager_itemspage(((intval($itemspage)) ? $itemspage : 20));
@@ -125,24 +130,24 @@ function search_content(&$a,$update = 0, $load = false) {
if(local_user()) {
$r = q("SELECT distinct mid, item.id as item_id, item.* from item
WHERE item_restrict = 0
- AND (( `item`.`allow_cid` = '' AND `item`.`allow_gid` = '' AND `item`.`deny_cid` = '' AND `item`.`deny_gid` = '' AND item_private = 0 )
- OR ( `item`.`uid` = %d ))
+ AND ((( `item`.`allow_cid` = '' AND `item`.`allow_gid` = '' AND `item`.`deny_cid` = '' AND `item`.`deny_gid` = '' AND item_private = 0 )
+ OR ( `item`.`uid` = %d )) OR item.owner_xchan = '%s' )
$sql_extra
group by mid ORDER BY created DESC $pager_sql ",
intval(local_user()),
- intval(ABOOK_FLAG_BLOCKED)
-
+ dbesc($sys['xchan_hash'])
);
}
if($r === null) {
$r = q("SELECT distinct mid, item.id as item_id, item.* from item
WHERE item_restrict = 0
- AND ((( `item`.`allow_cid` = '' AND `item`.`allow_gid` = '' AND `item`.`deny_cid` = ''
+ AND (((( `item`.`allow_cid` = '' AND `item`.`allow_gid` = '' AND `item`.`deny_cid` = ''
AND `item`.`deny_gid` = '' AND item_private = 0 )
and owner_xchan in ( " . stream_perms_xchans(($observer) ? PERMS_NETWORK : PERMS_PUBLIC) . " ))
- $pub_sql )
+ $pub_sql ) OR owner_xchan = '%s')
$sql_extra
- group by mid ORDER BY created DESC $pager_sql"
+ group by mid ORDER BY created DESC $pager_sql",
+ dbesc($sys['xchan_hash'])
);
}
}
diff --git a/version.inc b/version.inc
index 8ff524f4f..1bedfc22b 100644
--- a/version.inc
+++ b/version.inc
@@ -1 +1 @@
-2014-06-02.694
+2014-06-04.696
diff --git a/view/js/icon_translate.js b/view/js/icon_translate.js
index 930d3b265..fcbc26a3f 100644
--- a/view/js/icon_translate.js
+++ b/view/js/icon_translate.js
@@ -54,4 +54,5 @@ $(document).ready(function() {
$('.icon-bookmark').addClass('');
$('.icon-fullscreen').addClass('');
$('.icon-share').addClass('');
+ $('.icon-plus').addClass('');
}); \ No newline at end of file
diff --git a/view/theme/redbasic/css/style.css b/view/theme/redbasic/css/style.css
index 262819469..422a72e26 100644
--- a/view/theme/redbasic/css/style.css
+++ b/view/theme/redbasic/css/style.css
@@ -43,6 +43,10 @@ abbr {
text-indent: 0px;
}
+.connect-icon {
+ margin-right: 5px;
+}
+
a, a:visited, a:link, .fakelink, .fakelink:visited, .fakelink:link {
font-weight: bold;
color: $link_colour;
diff --git a/view/tpl/direntry.tpl b/view/tpl/direntry.tpl
index 7a3d42e01..e5f12944e 100755
--- a/view/tpl/direntry.tpl
+++ b/view/tpl/direntry.tpl
@@ -9,7 +9,7 @@
<div class="contact-name" id="directory-name-{{$entry.id}}" ><span onclick="dirdetails('{{$entry.hash}}');" class="fakelink" >{{$entry.name}}</span></div>
{{if $entry.connect}}
-<div class="directory-connect btn btn-default"><a href="{{$entry.connect}}">{{$entry.conn_label}}</a></div>
+<div class="directory-connect btn btn-default"><a href="{{$entry.connect}}"><i class="icon-plus connect-icon"></i> {{$entry.conn_label}}</a></div>
{{/if}}
<div class="contact-details">{{$entry.details}}</div>
</div>
diff --git a/view/tpl/direntry_large.tpl b/view/tpl/direntry_large.tpl
index 487839f7a..da6ea1a44 100755
--- a/view/tpl/direntry_large.tpl
+++ b/view/tpl/direntry_large.tpl
@@ -15,7 +15,7 @@
<div class="contact-name" id="directory-name-{{$id}}" >{{$name}}{{if $online}} <i class="icon-asterisk online-now" title="{{$online}}"></i>{{/if}}</div>
{{if $connect}}
-<div class="directory-connect btn btn-default"><a href="{{$connect}}">{{$conn_label}}</a></div>
+<div class="directory-connect btn btn-default"><a href="{{$connect}}"><i class="icon-plus connect-icon"></i> {{$conn_label}}</a></div>
{{/if}}
<div class="contact-webbie">{{$address}}</div>
diff --git a/view/tpl/match.tpl b/view/tpl/match.tpl
index 0688ca26b..41587430b 100755
--- a/view/tpl/match.tpl
+++ b/view/tpl/match.tpl
@@ -10,7 +10,7 @@
</div>
<div class="profile-match-end"></div>
{{if $connlnk}}
- <div class="profile-match-connect"><a href="{{$connlnk}}" title="{{$conntxt}}">{{$conntxt}}</a></div>
+ <div class="profile-match-connect"><a href="{{$connlnk}}" title="{{$conntxt}}"><i class="icon-plus connect-icon"></i> {{$conntxt}}</a></div>
{{/if}}
</div>
diff --git a/view/tpl/profile_vcard.tpl b/view/tpl/profile_vcard.tpl
index 10a0a25a9..d72507d4c 100755
--- a/view/tpl/profile_vcard.tpl
+++ b/view/tpl/profile_vcard.tpl
@@ -45,7 +45,7 @@
{{if $connect}}
-<a href="{{$connect_url}}" class="rconnect">{{$connect}}</a>
+<a href="{{$connect_url}}" class="rconnect"><i class="icon-plus connect-icon"></i> {{$connect}}</a>
{{/if}}
</div>
diff --git a/view/tpl/suggest_friends.tpl b/view/tpl/suggest_friends.tpl
index 0388504d2..6cf8f7ba8 100755
--- a/view/tpl/suggest_friends.tpl
+++ b/view/tpl/suggest_friends.tpl
@@ -11,6 +11,6 @@
</div>
<div class="profile-match-end"></div>
{{if $entry.connlnk}}
- <div class="profile-match-connect"><a href="{{$entry.connlnk}}" title="{{$entry.conntxt}}">{{$entry.conntxt}}</a></div>
+ <div class="profile-match-connect"><a href="{{$entry.connlnk}}" title="{{$entry.conntxt}}"><i class="icon-plus connect-icon"></i> {{$entry.conntxt}}</a></div>
{{/if}}
</div>