aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-09-14 18:33:14 -0700
committerfriendica <info@friendica.com>2013-09-14 18:33:14 -0700
commita7cd3f7dfe3fa82300401a217b298c78a438c39c (patch)
tree5586bb1bf97ad9e457de2eacb298d28e22c854ee
parentaefb0f823353d15a281d3c94ec6fc044e1b62580 (diff)
parent4132d1cd8e59d2cf84d7578ac700c65d7954edd6 (diff)
downloadvolse-hubzilla-a7cd3f7dfe3fa82300401a217b298c78a438c39c.tar.gz
volse-hubzilla-a7cd3f7dfe3fa82300401a217b298c78a438c39c.tar.bz2
volse-hubzilla-a7cd3f7dfe3fa82300401a217b298c78a438c39c.zip
Merge pull request #136 from cvogeley/master
Search by date
-rw-r--r--mod/channel.php23
-rwxr-xr-xview/tpl/posted_date_widget.tpl2
2 files changed, 13 insertions, 12 deletions
diff --git a/mod/channel.php b/mod/channel.php
index 652084cf0..5a66f5e07 100644
--- a/mod/channel.php
+++ b/mod/channel.php
@@ -64,17 +64,18 @@ function channel_content(&$a, $update = 0, $load = false) {
$category = $datequery = $datequery2 = '';
- if(argc() > 2) {
- for($x = 2; $x < argc(); $x ++) {
- if(is_a_date_arg(argv($x))) {
- if($datequery)
- $datequery2 = escape_tags(argv($x));
- else
- $datequery = escape_tags(argv($x));
- }
- }
- }
-
+ // if(argc() > 2) {
+ // for($x = 2; $x < argc(); $x ++) {
+ // if(is_a_date_arg(argv($x))) {
+ // if($datequery)
+ // $datequery2 = escape_tags(argv($x));
+ // else
+ // $datequery = escape_tags(argv($x));
+ // }
+ // }
+ // }
+ $datequery = ((x($_GET,'dend') && is_a_date_arg($_GET['dend'])) ? notags($_GET['dend']) : '');
+ $datequery2 = ((x($_GET,'dbegin') && is_a_date_arg($_GET['dbegin'])) ? notags($_GET['dbegin']) : '');
if(get_config('system','block_public') && (! get_account_id()) && (! remote_user())) {
return login();
diff --git a/view/tpl/posted_date_widget.tpl b/view/tpl/posted_date_widget.tpl
index 009fa60a6..6720d3628 100755
--- a/view/tpl/posted_date_widget.tpl
+++ b/view/tpl/posted_date_widget.tpl
@@ -3,7 +3,7 @@
<script>function dateSubmit(dateurl) { window.location.href = dateurl; } </script>
<select id="posted-date-selector" name="posted-date-select" onchange="dateSubmit($(this).val());" size="{{$size}}">
{{foreach $dates as $d}}
-<option value="{{$url}}/{{$d.1}}/{{$d.2}}" >{{$d.0}}</option>
+<option value="{{$url}}?dend={{$d.1}}&dbegin={{$d.2}}" >{{$d.0}}</option>
{{/foreach}}
</select>
</div>