Changeset 7


Ignore:
Timestamp:
Jun 4, 2008, 11:02:50 AM (17 years ago)
Author:
george
Message:

Opraveno: Nemožnost editace serveru s názvem obsaženým v jiném názvu.

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • includes/classes.php

    r1 r7  
    147147    }
    148148  else {
    149     $exist = $db->query_result("SELECT count(*) as pocet FROM `servers` where (`name` like '%".$posted['name']."%' AND NOT `id`=$server_id)");
     149    $exist = $db->query_result("SELECT count(*) as pocet FROM `servers` where (`name` like TRIM('".$posted['name']."') AND NOT `id`=$server_id)");
    150150  if ($exist==1)
    151151    {
  • scripts/online.php

    r6 r7  
    11<?php
    22
    3 require ('../includes/config.php');
     3include('../includes/config.php');
    44
    5 $Database = new mysqli($db_config['host'], $db_config['user'], $db_config['pass']);
    6 $Database->select_db($db_config['name']);
     5$Database = new mysqli($db_config['host'], $db_config['user'], $db_config['pass'], $db_config['name']);
     6
     7if(mysqli_connect_errno())
     8{
     9  printf("Connect failed: %s\n", mysqli_connect_error());
     10  exit();
     11}
    712
    813function CheckPortStatus($Ip, $Port)
  • sql/updates/6_servers.sql

    r6 r7  
    99  `players_count` int(11) NOT NULL,
    1010  KEY `server` (`server`)
    11 ) ENGINE=MyISAM DEFAULT CHARSET=utf8_czech_ci;
     11) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci;
Note: See TracChangeset for help on using the changeset viewer.