Changeset 368 for dev

Show
Ignore:
Timestamp:
01/04/09 02:18:54 (13 years ago)
Author:
exi
Message:

Fixed the pre PHP 5.1.0 issue with the current year, it will run on php4 again but stil has the week 52/1 issue (kindof).
Removed debug content from globals.php.

Location:
dev/common
Files:
4 modified

Legend:

Unmodified
Added
Removed
  • dev/common/home.php

    r367 r368  
    99 
    1010$week = kbdate('W'); 
    11 $year = kbdate('o'); 
     11$year = getYear(); 
    1212 
    1313$page = new Page('Week '.$week); 
     
    3636if ($week == 1) 
    3737{ 
    38     $pyear = kbdate("o") - 1; 
     38    $pyear = $year - 1; 
    3939    $pweek = 52; 
    4040} 
    4141else 
    4242{ 
    43     $pyear = kbdate("o"); 
     43    $pyear = $year; 
    4444    $pweek = $week - 1; 
    4545} 
  • dev/common/includes/globals.php

    r367 r368  
    77else 
    88{ 
    9     $svn_rev = '367'; 
     9    $svn_rev = '368'; 
    1010} 
    1111define('SVN_REV', $svn_rev); 
     
    6868    if ($timestamp === null) 
    6969    { 
    70         $timestamp = 1230584400;#time(); 
     70        $timestamp = time(); 
    7171    } 
    7272 
     
    7777    return date($format, $timestamp); 
    7878} 
    79 ?> 
     79 
     80function getYear() 
     81{ 
     82    $test = kbdate('o'); 
     83    if ($test == 'o') 
     84    { 
     85        $test = kbdate('Y'); 
     86    } 
     87    return $test; 
     88} 
  • dev/common/kills.php

    r367 r368  
    1515 
    1616if ($year == '') 
    17     $year = kbdate('o'); 
     17    $year = getYear(); 
    1818 
    1919if ($week == 52) 
  • dev/common/losses.php

    r367 r368  
    1818 
    1919if ($year == '') 
    20     $year = kbdate('o'); 
     20    $year = getYear(); 
    2121 
    2222if ($week == 52)