summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/archive.module10
-rw-r--r--modules/archive/archive.module10
2 files changed, 18 insertions, 2 deletions
diff --git a/modules/archive.module b/modules/archive.module
index a39cc9f9c..05848c06b 100644
--- a/modules/archive.module
+++ b/modules/archive.module
@@ -8,13 +8,21 @@ function archive_system($field){
}
function archive_calendar($original = 0) {
+ $edit = $_POST["edit"];
// Extract today's date:
$start_of_today = mktime(0, 0, 0, date("n", time()), date("d", time()), date("Y", time()));
$end_of_today = mktime(23, 59, 59, date("n", time()), date("d", time()), date("Y", time()));
// Extract the requested date:
- if (arg(0) == "archive" && arg(3)) {
+ if ($edit["year"] && $edit["month"] && $edit["day"]) {
+ $year = $edit["year"];
+ $month = $edit["month"];
+ $day = $edit["day"];
+
+ $requested = mktime(0, 0, 0, $month, $day, $year);
+ }
+ else if (arg(0) == "archive" && arg(3)) {
$year = arg(1);
$month = arg(2);
$day = arg(3);
diff --git a/modules/archive/archive.module b/modules/archive/archive.module
index a39cc9f9c..05848c06b 100644
--- a/modules/archive/archive.module
+++ b/modules/archive/archive.module
@@ -8,13 +8,21 @@ function archive_system($field){
}
function archive_calendar($original = 0) {
+ $edit = $_POST["edit"];
// Extract today's date:
$start_of_today = mktime(0, 0, 0, date("n", time()), date("d", time()), date("Y", time()));
$end_of_today = mktime(23, 59, 59, date("n", time()), date("d", time()), date("Y", time()));
// Extract the requested date:
- if (arg(0) == "archive" && arg(3)) {
+ if ($edit["year"] && $edit["month"] && $edit["day"]) {
+ $year = $edit["year"];
+ $month = $edit["month"];
+ $day = $edit["day"];
+
+ $requested = mktime(0, 0, 0, $month, $day, $year);
+ }
+ else if (arg(0) == "archive" && arg(3)) {
$year = arg(1);
$month = arg(2);
$day = arg(3);