mirror of
https://github.com/e107inc/e107.git
synced 2025-07-30 19:30:25 +02:00
Additional parameter vetting
This commit is contained in:
@@ -11,8 +11,8 @@
|
||||
| GNU General Public License (http://gnu.org).
|
||||
|
|
||||
| $Source: /cvs_backup/e107_0.8/e107_plugins/blogcalendar_menu/archive.php,v $
|
||||
| $Revision: 1.2 $
|
||||
| $Date: 2007-05-13 13:59:25 $
|
||||
| $Revision: 1.3 $
|
||||
| $Date: 2007-12-03 20:38:01 $
|
||||
| $Author: e107steved $
|
||||
+----------------------------------------------------------------------------+
|
||||
| Based on code by: Thomas Bouve (crahan@gmx.net)
|
||||
@@ -50,12 +50,17 @@ $pref['blogcal_ws'] = "monday";
|
||||
$cur_year = date("Y");
|
||||
$cur_month = date("n");
|
||||
$cur_day = date("j");
|
||||
if (strstr(e_QUERY, "year")) {
|
||||
$tmp = explode(".", e_QUERY);
|
||||
$req_year = $tmp[1];
|
||||
} else {
|
||||
$req_year = $cur_year;
|
||||
if (strstr(e_QUERY, "year"))
|
||||
{
|
||||
$tmp = explode(".", e_QUERY);
|
||||
if (is_numeric($tmp[1]))
|
||||
{
|
||||
$req_year = intval($tmp[1]);
|
||||
}
|
||||
}
|
||||
|
||||
if (!isset($req_year)) $req_year = $cur_year;
|
||||
|
||||
|
||||
|
||||
// --------------------------------
|
||||
|
@@ -11,9 +11,9 @@
|
||||
| GNU General Public License (http://gnu.org).
|
||||
|
|
||||
| $Source: /cvs_backup/e107_0.8/e107_plugins/blogcalendar_menu/blogcalendar_menu.php,v $
|
||||
| $Revision: 1.1.1.1 $
|
||||
| $Date: 2006-12-02 04:34:44 $
|
||||
| $Author: mcfly_e107 $
|
||||
| $Revision: 1.2 $
|
||||
| $Date: 2007-12-03 20:38:01 $
|
||||
| $Author: e107steved $
|
||||
+----------------------------------------------------------------------------+
|
||||
| Based on code by: Thomas Bouve (crahan@gmx.net)
|
||||
*/
|
||||
@@ -38,8 +38,8 @@ list($cur_year, $cur_month, $cur_day) = explode(" ", date("Y n j"));
|
||||
if (strstr(e_QUERY, "day")) {
|
||||
$tmp = explode(".", e_QUERY);
|
||||
$item = $tmp[1];
|
||||
$req_year = substr($item, 0, 4);
|
||||
$req_month = substr($item, 4, 2);
|
||||
$req_year = intval(substr($item, 0, 4));
|
||||
$req_month = intval(substr($item, 4, 2));
|
||||
// decide on the behaviour here, do we highlight
|
||||
// the day being viewed? or only 'today'?
|
||||
//$req_day = substr($item, 6, 2);
|
||||
@@ -54,8 +54,8 @@ if (strstr(e_QUERY, "day")) {
|
||||
else if(strstr(e_QUERY, "month")) {
|
||||
$tmp = explode(".", e_QUERY);
|
||||
$item = $tmp[1];
|
||||
$req_year = substr($item, 0, 4);
|
||||
$req_month = substr($item, 4, 2);
|
||||
$req_year = intval(substr($item, 0, 4));
|
||||
$req_month = intval(substr($item, 4, 2));
|
||||
// if the requested year and month are the current, then add
|
||||
// the current day to the mix so the calendar highlights it
|
||||
if (($req_year == $cur_year) && ($req_month == $cur_month)) {
|
||||
|
Reference in New Issue
Block a user