aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2015-03-23 19:56:10 -0700
committerfriendica <info@friendica.com>2015-03-23 19:56:10 -0700
commitc2acab21d44bfaa8e051a42a13b72c056c95b0a3 (patch)
tree9bed606355434db496ecca9aaca04fcac4993381 /mod
parentd32f63df82de01f66d5babe932f20aed9a5b3ee2 (diff)
downloadvolse-hubzilla-c2acab21d44bfaa8e051a42a13b72c056c95b0a3.tar.gz
volse-hubzilla-c2acab21d44bfaa8e051a42a13b72c056c95b0a3.tar.bz2
volse-hubzilla-c2acab21d44bfaa8e051a42a13b72c056c95b0a3.zip
improve performance of the zotfeed queries
Diffstat (limited to 'mod')
-rw-r--r--mod/zotfeed.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/mod/zotfeed.php b/mod/zotfeed.php
index 7bf91d4db..78a667330 100644
--- a/mod/zotfeed.php
+++ b/mod/zotfeed.php
@@ -9,7 +9,7 @@ function zotfeed_init(&$a) {
$mindate = (($_REQUEST['mindate']) ? datetime_convert('UTC','UTC',$_REQUEST['mindate']) : '');
if(! $mindate)
- $mindate = datetime_convert('UTC','UTC', 'now - 1 month');
+ $mindate = datetime_convert('UTC','UTC', 'now - 4 days');
if(get_config('system','block_public') && (! get_account_id()) && (! remote_channel())) {
$result['message'] = 'Public access denied';
@@ -21,7 +21,7 @@ function zotfeed_init(&$a) {
$channel_address = ((argc() > 1) ? argv(1) : '');
if($channel_address) {
- $r = q("select channel_id, channel_name from channel where channel_address = '%s' and not (channel_pageflags & %d)>0 limit 1",
+ $r = q("select channel_id, channel_name from channel where channel_address = '%s' and not (channel_pageflags & %d) > 0 limit 1",
dbesc(argv(1)),
intval(PAGE_REMOVED)
);
@@ -30,6 +30,7 @@ function zotfeed_init(&$a) {
$x = get_sys_channel();
if($x)
$r = array($x);
+ $mindate = datetime_convert('UTC','UTC', 'now - 2 days');
}
if(! $r) {
$result['message'] = 'Channel not found.';