aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs
diff options
context:
space:
mode:
Diffstat (limited to 'Zotlabs')
-rw-r--r--Zotlabs/Lib/NativeWikiPage.php5
-rw-r--r--Zotlabs/Module/Articles.php17
-rw-r--r--Zotlabs/Module/Wiki.php2
-rw-r--r--Zotlabs/Widget/Archive.php6
-rw-r--r--Zotlabs/Widget/Wiki_page_history.php5
5 files changed, 28 insertions, 7 deletions
diff --git a/Zotlabs/Lib/NativeWikiPage.php b/Zotlabs/Lib/NativeWikiPage.php
index 919c51276..d4875bbaf 100644
--- a/Zotlabs/Lib/NativeWikiPage.php
+++ b/Zotlabs/Lib/NativeWikiPage.php
@@ -556,7 +556,10 @@ class NativeWikiPage {
'$pageHistory' => $pageHistory['history'],
'$permsWrite' => $arr['permsWrite'],
'$name_lbl' => t('Name'),
- '$msg_label' => t('Message','wiki_history')
+ '$msg_label' => t('Message','wiki_history'),
+ '$date_lbl' => t('Date'),
+ '$revert_btn' => t('Revert'),
+ '$compare_btn' => t('Compare')
));
}
diff --git a/Zotlabs/Module/Articles.php b/Zotlabs/Module/Articles.php
index 284868241..e1f0b4ab0 100644
--- a/Zotlabs/Module/Articles.php
+++ b/Zotlabs/Module/Articles.php
@@ -51,6 +51,8 @@ class Articles extends \Zotlabs\Web\Controller {
$sql_extra2 .= protect_sprintf(term_item_parent_query(\App::$profile['profile_uid'],'item', $category, TERM_CATEGORY));
}
+ $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']) : '');
$which = argv(1);
@@ -143,10 +145,21 @@ class Articles extends \Zotlabs\Web\Controller {
$sql_item = "and item.id = " . intval($r[0]['iid']) . " ";
}
}
-
+ if($datequery) {
+ $sql_extra2 .= protect_sprintf(sprintf(" AND item.created <= '%s' ", dbesc(datetime_convert(date_default_timezone_get(),'',$datequery))));
+ $order = 'post';
+ }
+ if($datequery2) {
+ $sql_extra2 .= protect_sprintf(sprintf(" AND item.created >= '%s' ", dbesc(datetime_convert(date_default_timezone_get(),'',$datequery2))));
+ }
+
+ if($datequery || $datequery2) {
+ $sql_extra2 .= " and item.item_thread_top != 0 ";
+ }
+
$r = q("select * from item
where item.uid = %d and item_type = %d
- $sql_extra $sql_item order by item.created desc $pager_sql",
+ $sql_extra $sql_extra2 $sql_item order by item.created desc $pager_sql",
intval($owner),
intval(ITEM_TYPE_ARTICLE)
);
diff --git a/Zotlabs/Module/Wiki.php b/Zotlabs/Module/Wiki.php
index 322a3933c..25ecb6a6a 100644
--- a/Zotlabs/Module/Wiki.php
+++ b/Zotlabs/Module/Wiki.php
@@ -384,6 +384,8 @@ class Wiki extends \Zotlabs\Web\Controller {
'$modalerrorlist' => t('Error getting album list'),
'$modalerrorlink' => t('Error getting photo link'),
'$modalerroralbum' => t('Error getting album'),
+ '$view_lbl' => t('View'),
+ '$history_lbl' => t('History')
));
if($p['pageMimeType'] === 'text/markdown')
diff --git a/Zotlabs/Widget/Archive.php b/Zotlabs/Widget/Archive.php
index c151ca563..9adaac38f 100644
--- a/Zotlabs/Widget/Archive.php
+++ b/Zotlabs/Widget/Archive.php
@@ -22,12 +22,12 @@ class Archive {
return '';
$wall = ((array_key_exists('wall', $arr)) ? intval($arr['wall']) : 0);
+ $wall = ((array_key_exists('articles', $arr)) ? 2 : $wall);
+
$style = ((array_key_exists('style', $arr)) ? $arr['style'] : 'select');
$showend = ((get_pconfig($uid,'system','archive_show_end_date')) ? true : false);
$mindate = get_pconfig($uid,'system','archive_mindate');
- $visible_years = get_pconfig($uid,'system','archive_visible_years');
- if(! $visible_years)
- $visible_years = 5;
+ $visible_years = get_pconfig($uid,'system','archive_visible_years',5);
$url = z_root() . '/' . \App::$cmd;
diff --git a/Zotlabs/Widget/Wiki_page_history.php b/Zotlabs/Widget/Wiki_page_history.php
index dcec9a037..dbb322dc3 100644
--- a/Zotlabs/Widget/Wiki_page_history.php
+++ b/Zotlabs/Widget/Wiki_page_history.php
@@ -20,7 +20,10 @@ class Wiki_page_history {
'$pageHistory' => $pageHistory['history'],
'$permsWrite' => $arr['permsWrite'],
'$name_lbl' => t('Name'),
- '$msg_label' => t('Message','wiki_history')
+ '$msg_label' => t('Message','wiki_history'),
+ '$date_lbl' => t('Date'),
+ '$revert_btn' => t('Revert'),
+ '$compare_btn' => t('Compare')
));
}