1
0
mirror of https://github.com/php/web-php.git synced 2026-03-23 23:02:13 +01:00

Stop abusing the current element of the page configuration, and instead add a

proper option to set body classes if appropriate.
This commit is contained in:
Adam Harvey
2012-09-07 16:33:57 +08:00
parent f1f04062fe
commit 0f25c08b5e
4 changed files with 12 additions and 10 deletions

View File

@@ -4,7 +4,7 @@ $_SERVER['BASE_PAGE'] = 'cal.php';
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/prepend.inc';
$site_header_config = array(
"current" => "calendar",
"current" => "community",
"css" => array('calendar.css'),
);
@@ -56,7 +56,7 @@ elseif ($cy && $cm && $cd) {
// Try to load events for that day, and display them all
if ($events = load_events($date)) {
$site_header_config = array('current' => 'calendar calendar-day') + $site_header_config;
$site_header_config = array('classes' => 'calendar calendar-day') + $site_header_config;
site_header("Events: ".date("F j, Y", $date), $site_header_config);
echo "<h2>", date("F j, Y", $date), "</h2>\n";
foreach ($events as $event) {