Changeset 123

Show
Ignore:
Timestamp:
11/29/06 19:07:22 (14 years ago)
Author:
exi
Message:

Admin: admin_mapoptions.php now deletes all regioncache images on submit of new values.
SQL: default inxed for kb3_ships_values.shp_id is now primary key.
Killlists should now properly show the old date format.
Fixed a typo in admin_mapoptions.tpl.
Added debug code to class.map.php.
The killmail importer should now work also with 1 killmail per request.

Location:
dev
Files:
1 removed
8 modified

Legend:

Unmodified
Added
Removed
  • dev/common/admin_mapoptions.php

    r91 r123  
    5252        } 
    5353    } 
     54 
     55    // on submit delete all region cache files 
     56    $dir = opendir('cache/map'); 
     57    while ($file = readdir($dir)) 
     58    { 
     59        if (strpos($file, '.png')) 
     60        { 
     61            @unlink('cache/map/'.$file); 
     62        } 
     63    } 
    5464} 
    5565 
  • dev/common/autoupgrade.php

    r95 r123  
    4949`shp_id` INT( 11 ) NOT NULL , 
    5050`shp_value` BIGINT( 4 ) NOT NULL , 
    51 INDEX ( `shp_id` ) 
     51PRIMARY KEY ( `shp_id` ) 
    5252) TYPE = MYISAM ;'; 
    5353    $qry->execute($query); 
    54     $qry->execute('ALTER TABLE `kb3_ships_values` ADD PRIMARY KEY ( `shp_id` ) '); 
    5554    $qry->execute('UPDATE kb3_ships set shp_class = 8 WHERE shp_id=257 limit 1'); 
    5655    $qry->execute('UPDATE kb3_ships set shp_class = 8 WHERE shp_id=252 limit 1'); 
  • dev/common/class.killlisttable.php

    r92 r123  
    6060                if (count($kills) && $this->daybreak_) 
    6161                { 
    62                     $kl[] = array('kills' => $kills, 'date' => $prevdate); 
     62                    $kl[] = array('kills' => $kills, 'date' => strtotime($prevdate)); 
    6363                    $kills = array(); 
    6464                } 
     
    8686        if (count($kills)) 
    8787        { 
    88             $kl[] = array('kills' => $kills, 'date' => date("l, F jS", strtotime($prevdate))); 
     88            $kl[] = array('kills' => $kills, 'date' => strtotime($prevdate)); 
    8989        } 
    9090 
  • dev/common/class.map.php

    r91 r123  
    132132                header("Content-type: image/png"); 
    133133                readfile($regioncache); 
    134                 $cached = true; 
     134                return; 
    135135            } 
    136136            $caption = $this->regname_; 
     
    216216            $xscale = 1 / ($dx / ($this->imgwidth_ - ($this->offset_ * 2))); 
    217217            $yscale = 1 / ($dz / ($this->imgheight_ - ($this->offset_ * 2))); 
    218             // echo "dx:".$dx." dz:".$dz." xscale:".$scale." ".$yscale."<br>"; 
    219             // echo "minx:".$minx." maxx:".$maxx." "; 
    220             // echo "minz:".$minz." maxz:".$maxz." "; 
    221             // exit; 
    222             // exit; 
     218            if ($_REQUEST['debug'] == 'admovrd') 
     219            { 
     220                echo "dx:".$dx." dz:".$dz."<br/> xscale:".$xscale." ".$yscale."<br/>"; 
     221                echo "minx:".$minx." maxx:".$maxx."<br/>"; 
     222                echo "minz:".$minz." maxz:".$maxz."<br/>".$sql."<br/>\n"; 
     223                echo nl2br(print_r($this, 1)); 
     224                echo nl2br(print_r($qry, 1)); 
     225            } 
     226 
    223227            // draw lines 
    224228            if ($this->showlines_) 
  • dev/common/class.ship.php

    r96 r123  
    7272            $this->qry_ = new DBQuery(); 
    7373 
    74             $this->sql_ = "select * 
    75                            from kb3_ships shp 
     74            $this->sql_ = "select * from kb3_ships shp 
    7675                           inner join kb3_ship_classes scl on shp.shp_class = scl.scl_id"; 
    7776            if ($config->getConfig('ship_values')) 
     
    7978                $this->sql_ .= ' left join kb3_ships_values ksv on (shp.shp_id = ksv.shp_id) '; 
    8079            } 
    81             $this->sql_ .= "where shp.shp_id = ".$this->id_; 
     80            $this->sql_ .= " where shp.shp_id = ".$this->id_; 
    8281 
    8382            $this->qry_->execute($this->sql_); 
  • dev/common/kill_import.php

    r32 r123  
    118118        { 
    119119            $i++; 
    120             if ($i < $_SESSION['kill_import']['startnum']) 
     120            if ($i <= $_SESSION['kill_import']['startnum']) 
    121121            { 
    122122                continue; 
    123123            } 
    124             if ($i < $_SESSION['kill_import']['numcount']) 
     124            if ($i <= $_SESSION['kill_import']['numcount']) 
    125125            { 
    126126                continue; 
     
    137137                $inv++; 
    138138                $invalid++; 
    139                 #$html .= "Killmail is malformed: $file.<br>\n"; 
     139                $html .= "Killmail is malformed: $file.<br>\n"; 
    140140                //unlink($dir.$file); 
    141141            } 
     
    144144                $posted++; 
    145145                $posted_all++; 
    146                 #echo "That $file killmail has already been posted <a href=\"/eve/?a=kill_detail&kll_id=" . $parser->dupeid_ . "\">here</a>.<br>\n"; 
     146                #echo "That $file killmail has already been posted <a href=\"?a=kill_detail&kll_id=" . $parser->dupeid_ . "\">here</a>.<br>\n"; 
    147147            } 
    148148            else 
  • dev/templates/admin_mapoptions.tpl

    r91 r123  
    22<b>Note:</b> You don't need to set colors if you don't want to overwrite the default.<br/> 
    33The other settings do have an effect if they're touched though.<br/> 
    4 <b>Usage:</b> Input into a RGB-colorfield set of 3 values seperated by ','. If you want to have those values threadened as hex then put an x in front of each. 
     4<b>Usage:</b> Input into a RGB-colorfield set of 3 values seperated by ','. If you want to have those values treated as hex then put an x in front of each. 
    55You can omit the 'x' if you're using A-F in the number. It also accepts html codes in the format '#RRGGBB'. If you want to turn back to the default color simply delete everything in the particular editbox.<br/> 
    66<b>Example:</b> "34,x13,xff" will be evaluated as rgb(34,19,255). 
  • dev/templates/killlisttable.tpl

    r86 r123  
    11{section name=day loop=$killlist} 
    22    {if $daybreak} 
    3 <div class="kb-date-header">{$killlist[day].date}</div><br/> 
     3<div class="kb-date-header">{"l, F jS"|date:$killlist[day].date}</div><br/> 
    44    {/if} 
    55<table class="kb-table" width="99%" align="center" cellspacing="1">