Changeset 317 for dev/common/includes

Show
Ignore:
Timestamp:
01/25/08 09:00:29 (15 years ago)
Author:
ralle030583
Message:

- ADD (TEST) api class for testing, getCharId from eve, atm commented out
- fixes for Tickets #74,#75,#77
- DBUpdate004: trinity ships had wrong tech level
- mailer should now send the killmail per email instead of msg that is classified
- and fixed the version in readme cause of the confusion ;-)

Location:
dev/common/includes
Files:
1 added
4 modified

Legend:

Unmodified
Added
Removed
  • dev/common/includes/autoupgrade.php

    r314 r317  
    1212define(CURRENT_DB_UPDATE,config::get("DBUpdate")); 
    1313//Update version of this autoupgrade.php 
    14 define(LASTEST_DB_UPDATE,"003"); 
     14define(LASTEST_DB_UPDATE,"004"); 
    1515 
    1616function updateDB(){ 
     
    9292} 
    9393 
     94function update004(){ 
     95        // new trinity ships are wrong saved as T1 shipes 
     96        if (CURRENT_DB_UPDATE < "004" ) 
     97        { 
     98                $qry = new DBQuery(); 
     99                 
     100                $query = "UPDATE kb3_ships  
     101                                        INNER JOIN kb3_ship_classes ON scl_id = shp_class 
     102                                        SET shp_techlevel = 2  
     103                                        WHERE scl_class IN ('Electronic Attack Ship','Heavy Interdictor','Black Ops','Marauder','Heavy Interdictor','Jump Freighter') 
     104                                        AND shp_techlevel = 1;"; 
     105                $qry->execute($query);           
     106                config::set("DBUpdate","004");   
     107        } 
     108} 
     109 
    94110function update_slot_of_group($id,$oldSlot = 0 ,$newSlot){ 
    95111        $qry  = new DBQuery(); 
  • dev/common/includes/class.cache.php

    r254 r317  
    1010        } 
    1111 
    12         $load = file_get_contents('/proc/loadavg'); 
     12        $load = @file_get_contents('/proc/loadavg'); 
     13        if (false === $load) 
     14        { 
     15            return false; 
     16        } 
    1317        $array = explode(' ', $load); 
    1418        if ((float)$array[0] > (float)config::get('reinforced_threshold')) 
  • dev/common/includes/class.pilot.php

    r254 r317  
    3535    { 
    3636        $this->execQuery(); 
    37         return '?a=thumb&amp;id='.$this->row_['plt_externalid'].'&amp;size='.$size; 
     37        /* charID api readout - in work, feel free to test 
     38        if ($this->row_['plt_externalid'] == 0) && config::get('apiCharId'){ 
     39                require_once("class.api.php"); 
     40                $api = new Api(); 
     41                $id = $api->getCharId(plt_name); 
     42                if ($id > 0){ 
     43                        setCharacterID($id); 
     44                } 
     45                return '?a=thumb&id='.$id.'&size='.$size; 
     46                         
     47        }*/ 
     48        return '?a=thumb&id='.$this->row_['plt_externalid'].'&size='.$size; 
    3849    } 
    39  
     50     
    4051    function execQuery() 
    4152    { 
  • dev/common/includes/globals.php

    r316 r317  
    11<?php 
    22// current subversion revision 
    3 preg_match('/\$Re'.'vision: (.*?) \$/', '$Revision: 316 $', $match); 
     3preg_match('/\$Re'.'vision: (.*?) \$/', '$Revision: 317 $', $match); 
    44define('SVN_REV', $match[1]); 
    55