git.shiar.nl
/
minimedit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
page: replace global variables by $Page object
[minimedit.git]
/
widget
/
countdown.php
diff --git
a/widget/countdown.php
b/widget/countdown.php
index 746e4b6f88559d1409185525e2142c5c2944fd74..29e73c60f7fe0c2bb457756857edb4bce8f99c09 100644
(file)
--- a/
widget/countdown.php
+++ b/
widget/countdown.php
@@
-1,8
+1,8
@@
<?php
<?php
-if (empty($
Args
)) {
+if (empty($
Page->path
)) {
return;
}
return;
}
-@list ($target, $interval) = explode('+', ltrim($
Args
, '/'));
+@list ($target, $interval) = explode('+', ltrim($
Page->path
, '/'));
$target = new DateTime($target);
$now = new DateTime('NOW');
$next = $target->diff($now); # age
$target = new DateTime($target);
$now = new DateTime('NOW');
$next = $target->diff($now); # age