Changeset 628 for trunk/index.php


Ignore:
Timestamp:
Aug 21, 2009, 5:45:13 PM (15 years ago)
Author:
george
Message:
  • Opraveno: Automatická volba aktuálně vybraného světa.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/index.php

    r626 r628  
    1717  $_COOKIE['RealmIndex'] = $_GET['RealmIndex'];
    1818}
    19 if(!array_key_exists('RealmIndex', $_COOKIE)) $_COOKIE['RealmIndex'] = 1;
     19$RealmList = $Config['Mangos']['RealmList'];
     20$FirstRealm = array_shift($RealmList);
     21if(!array_key_exists('RealmIndex', $_COOKIE)) $_COOKIE['RealmIndex'] = $FirstRealm['Id'];
    2022  else
    2123  {
    2224    if(!array_key_exists($_COOKIE['RealmIndex'], $Config['Mangos']['RealmList']))
    23       $_COOKIE['RealmIndex'] = 1;
     25      $_COOKIE['RealmIndex'] = $FirstRealm['Id'];
    2426  }
    2527 
Note: See TracChangeset for help on using the changeset viewer.