Ignore:
Timestamp:
Aug 13, 2007, 9:05:34 PM (17 years ago)
Author:
george
Message:

Aktualizace MaNGOS Minimanageru na verzi 0.1.4a.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • minimanager/run_patch.php

    r5 r19  
    6767 if ( empty($_POST['query']) || empty($_POST['use_db']) ) redirect("run_patch.php?error=1");
    6868
    69  $mysql = new MySQL;
    70  $mysql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass']);
     69 $sql = new SQL;
     70 $sql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']);
    7171 
    72  $use_db = $mysql->quote_smart($_POST['use_db']);
     72 $use_db = $sql->quote_smart($_POST['use_db']);
    7373 $query = $_POST['query'];
    7474 
    75  if ($use_db == $realm_db['name']) $mysql->db($realm_db['name']);
     75 if ($use_db == $realm_db['name']) $sql->db($realm_db['name']);
    7676        else {
    7777                foreach ($mangos_db as $db)
    78                         if ($use_db == $db['name']) $mysql->connect($db['addr'], $db['user'], $db['pass'], $db['name']);
     78                        if ($use_db == $db['name']) $sql->connect($db['addr'], $db['user'], $db['pass'], $db['name']);
    7979        }
    8080       
     
    9595 foreach($qr as $qry) {
    9696        $line++;
    97         if(trim($qry)) ($mysql->query(trim($qry))?$good++:$bad++);
     97        if(trim($qry)) ($sql->query(trim($qry))?$good++:$bad++);
    9898                if ($bad) {
    99                                         $err = ereg_replace ("\n","",mysql_error());
     99                                        $err = ereg_replace ("\n","",$sql->error());
    100100                                        $err = ereg_replace ("\r\n$","",$err);
    101101                                        $err = ereg_replace ("\r$","",$err);
     
    105105  }
    106106
    107  $mysql->close();
     107 $sql->close();
    108108 
    109109 if ($queries) redirect("run_patch.php?error=2&tot=$good");
Note: See TracChangeset for help on using the changeset viewer.