diff --git a/web/application/behaviors/UserIdBehavior.php b/web/application/behaviors/UserIdBehavior.php new file mode 100644 index 0000000..61ecf37 --- /dev/null +++ b/web/application/behaviors/UserIdBehavior.php @@ -0,0 +1,22 @@ +owner->isNewRecord) + return; + + if(Yii::app() instanceof CConsoleApplication || Yii::app()->user->isGuest) + return; + + $id = Yii::app()->user->id; + + foreach((array)$this->attributes as $attribute) + { + $this->owner->{$attribute} = $id; + } + } +} \ No newline at end of file diff --git a/web/application/behaviors/UserIpBehavior.php b/web/application/behaviors/UserIpBehavior.php new file mode 100644 index 0000000..5f3a064 --- /dev/null +++ b/web/application/behaviors/UserIpBehavior.php @@ -0,0 +1,21 @@ +owner->isNewRecord) + return; + + $ip = Yii::app() instanceof CConsoleApplication + ? '127.0.0.1' + : Yii::app()->request->userHostAddress; + + foreach((array)$this->attributes as $attribute) + { + $this->owner->{$attribute} = $ip; + } + } +} \ No newline at end of file diff --git a/web/application/config/main.php b/web/application/config/main.php index c48f139..f276849 100644 --- a/web/application/config/main.php +++ b/web/application/config/main.php @@ -17,6 +17,7 @@ 'import'=>array( 'application.models.*', 'application.components.*', + 'application.utils.*', ), // application components diff --git a/web/application/controllers/AdminController.php b/web/application/controllers/AdminController.php index bb391fc..049dc5f 100644 --- a/web/application/controllers/AdminController.php +++ b/web/application/controllers/AdminController.php @@ -331,20 +331,23 @@ public function actionSettings() $plugin=new SBPlugin; $plugin->class=$class; - - try - { - $plugin->save(); - } - catch(CDbException $e) - { - // Ignore duplicate keys - if($e->errorInfo[1] != 1062) - throw $e; - } + $plugin->save(); } - $plugins=SBPlugin::model()->findAll(); + $plugins=new CArrayDataProvider(SBPlugin::model()->findAll(), array( + 'keyField'=>'class', + 'sort'=>array( + 'attributes'=>array( + 'author', + 'name', + 'version', + '*', + ), + 'defaultOrder'=>array( + 'name'=>CSort::SORT_ASC, + ), + ), + )); $logs=new SBLog('search'); $logs->unsetAttributes(); // clear any default values diff --git a/web/application/controllers/ServersController.php b/web/application/controllers/ServersController.php index f058249..f8a2cf1 100644 --- a/web/application/controllers/ServersController.php +++ b/web/application/controllers/ServersController.php @@ -294,7 +294,12 @@ public function actionConfig() array('label'=>Yii::t('sourcebans', 'Back'), 'url'=>array('admin/servers')), ); - $this->render('config'); + preg_match_all('/([a-z_]+)=([^;]+)/i', Yii::app()->db->connectionString, $dsn); + $db = array_combine($dsn[1], $dsn[2]); + + $this->render('config', array( + 'db'=>$db, + )); } /** diff --git a/web/application/messages/cs/sourcebans.php b/web/application/messages/cs/sourcebans.php index 868260c..170b938 100644 --- a/web/application/messages/cs/sourcebans.php +++ b/web/application/messages/cs/sourcebans.php @@ -21,9 +21,9 @@ '

Here you will be able to submit a ban for a player who is breaking the rules of the gameserver. When submitting a ban we request you to fill out all the fields to be as descriptive as possible in your comments. This will ensure that your ban submission is processed much faster.

For a short explanation on how to create a demo, click here.

' => '@@

Zde máš možnost nahlásit hráče, kteří porušují pravidla herního serveru. Při nahlášení hráče prosíme o vyplnění všech polí co možná nejvýstižněji včetně komentářů. Tím zajistíte, že Vaše žádost bude zpracována tak rychle, jak je jen možné. Pro zobrazení krátkého návodu jak vytvořit demo, klikněte ZDE.

@@', 'A new release is available.' => '', 'Access' => 'Přístup', - 'Add comment' => '@@Pridat komentář@@', + 'Add comment' => 'Pridat komentář', + 'Add to group' => '', 'Admin' => 'Admin', - 'Admin Information' => 'Informace o adminovi', 'Admins in group' => 'Admini ve skupině', 'Advanced search' => 'Pokročilé vyhledávání', 'All of the bans in the database can be viewed from here.' => '', @@ -32,25 +32,25 @@ 'Archived' => '', 'Archived protests' => 'Archivované žádosti o odbanování', 'Archived submissions' => 'Archivované žádosti o ban', + 'Are you sure you want to add these items to {name}?' => '', 'Are you sure you want to kick {name}?' => '', + 'Are you sure you want to remove these items from {name}?' => '', 'Are you sure you want to uninstall this plugin?\nThis will delete all its data!' => '', 'Authentication type' => '', 'Author' => 'Autor', 'Back' => 'Zpět', 'Ban' => '', - 'Ban Information' => 'Informace o banu', 'Ban player' => '', - 'Bans' => 'Bany', 'By' => '@@Od@@', 'Change' => '', 'Click' => '@@Klik@@', + 'Close' => '', 'Command' => 'Příkaz', 'Command executed' => '', 'Comment' => '@@Komentář@@', - 'Comments' => '@@Komentáře@@', + 'Comments' => 'Komentáře', 'Confirm' => '@@Potvrdit@@', 'Confirm RCON password' => '@@Podtvrďte RCON heslo@@', - 'Players blocked' => '', 'Contact' => '@@Kontakt@@', 'Copy the {section} section below and place it on the game server in {file}, so that it looks similar to this:' => '', 'Country' => 'Stát', @@ -59,6 +59,7 @@ 'Delete' => 'Smazat', 'Delete comment' => '@@Smazat komentář@@', 'Demo' => '', + 'Demos' => '', 'Deny' => 'Odmítnout', 'Description' => '', 'Disable' => '', @@ -78,7 +79,6 @@ 'File' => 'Soubor', 'File does not exist.' => '@@Soubor neexistuje.@@', 'Filename' => '', - 'Flags' => '', 'Folder' => 'Složka', 'Function' => '', 'Game' => '', @@ -94,6 +94,7 @@ 'Identity' => 'Totožnost', 'Immunity level' => 'Úroveň imunity', 'Import' => '', + 'Imported successfully' => '', 'Information' => 'Informace', 'Install' => '', 'Invoked on' => 'Uděleno dne', @@ -113,19 +114,17 @@ 'Name' => 'Jmeno', 'New' => '@@Nový@@', 'No' => '@@Ne@@', + 'No comments' => '', 'No players in the server' => 'Žádní hráči na serveru', 'None' => 'Nikdo', 'Not applicable' => '@@Nebylo použito@@', - 'Object' => '', 'Password' => 'Heslo', 'Permanent' => 'Trvalý', 'Players' => 'Hráči', - 'Please select an option to administer.' => '', + 'Players blocked' => '', 'Please wait' => 'Prosím čekejte', 'Port' => 'Port', 'Powered by' => '@@Poháněno@@', - 'Protest Information' => 'Informace o odbanování', - 'Protest ban' => 'Žádost o odbanování', 'Query' => '', 'RCON' => '', 'RCON password' => 'RCON heslo', @@ -133,8 +132,10 @@ 'Reban' => '@@Znovu zabanovat@@', 'Refresh' => 'Obnovit', 'Remove' => 'Remove', + 'Remove from group' => '', 'Restore' => '@@Obnovit@@', 'Save' => 'Uložit', + 'Saved successfully' => '', 'Score' => 'Skóre', 'Search' => 'Hledat', 'Search bans' => 'Hledat bany', @@ -142,21 +143,17 @@ 'See the {link} for more details.' => '', 'Select' => '', 'Server' => 'Server', - 'Server Information' => 'Serverové informace', 'Server group' => 'Serverová skupina', 'Server groups' => 'Serverové skupiny', 'Server password' => '', 'Server permissions' => 'Serverová oprávnění', - 'Servers' => 'Servery', 'Servers in group' => 'Servery ve skupině', 'Show inactive bans' => 'Zobrazit neaktivní', 'Status' => '', 'Steam Community ID' => '', 'Steam ID' => '', 'Subject' => '', - 'Submission Information' => '', 'Submit' => 'Submit', - 'Submit ban' => 'Žádost o ban', 'Submitted on' => '@@Nahlášen dne@@', 'The following is a list of the permissions that you have on this system.' => '', 'The game server needs the following configuration to be able to communicate with the database.' => '', @@ -168,13 +165,13 @@ 'Timezone' => 'Časová zóna', 'Title' => 'Záhlaví', 'Total' => '@@Celkem@@', - 'Total admins' => 'Celkem adminů', + 'Total admins' => '@@Celkem adminů@@', 'Total bans' => 'Celkem banů', - 'Total demo size' => 'Celková velikost dem', - 'Total protests' => 'Celkem žádostí o odbanování', - 'Total servers' => 'Celkem serverů', 'Total blocked' => 'Celkem blokovaných připojení', - 'Total submissions' => 'Celkem žádostí o ban', + 'Total demo size' => '@@Celková velikost dem@@', + 'Total protests' => '@@Celkem žádostí o odbanování@@', + 'Total servers' => '@@Celkem serverů@@', + 'Total submissions' => '@@Celkem žádostí o ban@@', 'Type' => 'Typ', 'Type \'clr\' to clear the console' => '', 'URL' => '', @@ -184,14 +181,13 @@ 'Uninstall' => '', 'Unknown' => 'Neznámý', 'Version' => 'Verze', - 'Version Information' => 'Informace o verzi', 'View Steam Profile' => '', 'Warning' => 'Varování', 'Web group' => 'Webové skupina', 'Web groups' => '@@Webové skupiny@@', 'Web permissions' => 'Webové oprávnění', 'Welcome' => '@@Vítejte@@', - 'While you are spectating the offending player, press the ` key on your keyboard. Then type record [demoname] and hit enter. Also type sb_status for extra information in SteamBans servers. The file will be in your game folder.' => 'Zatímco sledujete daného hráče stiskněte klávesu ~ (pod Escape). Pak napište record [názevdema] a stiskněte Enter. Také můžete napsat sb_status pro další informace ze SteamBans serverů. Soubor bude uložen ve složce herního módu.', + 'While you are spectating the offending player, press the ` key on your keyboard. Then type record [demoname] and hit enter. Also type sb_status for extra information in SteamBans servers. The file will be in your game folder.' => '@@Zatímco sledujete daného hráče stiskněte klávesu ~ (pod Escape). Pak napište record [názevdema] a stiskněte Enter. Také můžete napsat sb_status pro další informace ze SteamBans serverů. Soubor bude uložen ve složce herního módu.@@', 'Yes' => '@@Ano@@', 'You can submit a demo or screenshot of a suspected cheater here. It will then be up for review by one of the admins.' => 'Zde můžeš vložit demo nebo screenshot, který usvědčuje cheatera a některý z adminů se tím bude zabývat.', 'You have the latest release.' => '', @@ -213,8 +209,8 @@ 'controllers.admin.bans.menu.submissions' => 'Žádost o ban', 'controllers.admin.bans.title' => 'Bany', 'controllers.admin.games.menu.add' => '', - 'controllers.admin.games.menu.map-image' => '', 'controllers.admin.games.menu.list' => '', + 'controllers.admin.games.menu.map-image' => '', 'controllers.admin.games.title' => '', 'controllers.admin.groups.menu.add' => 'Přidat skupinu', 'controllers.admin.groups.menu.import' => 'Importovat skupiny', @@ -312,6 +308,7 @@ 'models.SettingsForm.enable_submit' => '', 'models.SettingsForm.items_per_page' => '', 'models.SettingsForm.language' => 'Jazyk', + 'models.SettingsForm.mailer_from' => '', 'models.SettingsForm.password_min_length' => '', 'models.SettingsForm.smtp_host' => '', 'models.SettingsForm.smtp_password' => '', @@ -357,12 +354,12 @@ 'permissions.unban_own_bans' => 'Odbanovat valstní bany', 'views.admin.bans.protests.active.title' => '', 'views.admin.bans.protests.archive.title' => 'Archiv', - 'views.admin.bans.protests.grid.archive' => 'Archiv', + 'views.admin.bans.protests.grid.archive' => '@@Archiv@@', 'views.admin.bans.submissions.active.title' => '', 'views.admin.bans.submissions.archive.title' => 'Archiv', - 'views.admin.bans.submissions.grid.archive' => 'Archiv', - 'views.admin.settings.plugins.grid.settings' => 'Sastavení', + 'views.admin.bans.submissions.grid.archive' => '@@Archiv@@', 'views.admin.settings.help.steam_web_api_key' => "", + 'views.admin.settings.plugins.grid.settings' => 'Sastavení', 'week' => '@@týden@@', 'weeks' => 'týdny(ů)', '{n} day|{n} days' => '{n} den|{n} dny(ů)', diff --git a/web/application/messages/de/sourcebans.php b/web/application/messages/de/sourcebans.php index 05c89d9..a2726be 100644 --- a/web/application/messages/de/sourcebans.php +++ b/web/application/messages/de/sourcebans.php @@ -22,8 +22,8 @@ 'A new release is available.' => 'Eine neue Version ist verfügbar', 'Access' => 'Zugriff', 'Add comment' => 'Kommentar hinzufügen', + 'Add to group' => '', 'Admin' => 'Admin', - 'Admin Information' => 'Admin Informationen', 'Admins in group' => 'Admins in Gruppe', 'Advanced search' => 'Erweiterte Suche', 'All of the bans in the database can be viewed from here.' => 'Alle Banns in der Datenbank können hier eingesehen werden.', @@ -32,15 +32,15 @@ 'Archived' => 'Archiviert', 'Archived protests' => 'Archivierte Proteste', 'Archived submissions' => 'Archivierte Einsendungen', + 'Are you sure you want to add these items to {name}?' => '', 'Are you sure you want to kick {name}?' => 'Willst du {name} wirklich kicken?', + 'Are you sure you want to remove these items from {name}?' => '', 'Are you sure you want to uninstall this plugin?\nThis will delete all its data!' => 'Willst du dieses Plugin wirklich deinstallieren?\nDadurch werden all seine Informationen gelöscht!', 'Authentication type' => 'Autorisierungstyp', 'Author' => 'Autor', 'Back' => 'Zurück', 'Ban' => 'Bannen', - 'Ban Information' => 'Bann Informationen', 'Ban player' => 'Spieler bannen', - 'Bans' => 'Banns', 'By' => '@@von@@', 'Change' => 'Ändern', 'Click' => '@@Klick@@', @@ -51,7 +51,6 @@ 'Comments' => 'Kommentare', 'Confirm' => '@@Bestätigen@@', 'Confirm RCON password' => '@@RCON Passwort bestätigen@@', - 'Players blocked' => 'Spieler geblockt', 'Contact' => '@@Kontakt@@', 'Copy the {section} section below and place it on the game server in {file}, so that it looks similar to this:' => 'Kopiere den Teil {section} von unten und füge ihn in {file} auf dem Gameserver ein, so dass es ähnlich aussieht wie hier:', 'Country' => 'Land', @@ -60,6 +59,7 @@ 'Delete' => 'Löschen', 'Delete comment' => '@@Kommentar löschen@@', 'Demo' => 'Demo', + 'Demos' => '', 'Deny' => '@@Verbieten@@', 'Description' => 'Beschreibung', 'Disable' => 'Deaktivieren', @@ -79,12 +79,12 @@ 'File' => 'Datei', 'File does not exist.' => '@@Datei existiert nicht.@@', 'Filename' => 'Dateiname', - 'Flags' => 'Flags', 'Folder' => 'Ordner', 'Function' => 'Funktion', 'Game' => 'Spiel', 'General' => 'Allgemein', 'Group' => 'Gruppe', + 'Here you can change the permissions on any command, either globally, or for a specific group, without editing plugin source code.' => '', 'Here you can protest your ban. And prove your case as to why you should be unbanned.' => 'Hier kannst du gegen deinen Bann protestieren und belegen, warum du entbannt werden solltest.', 'Hide inactive bans' => 'Inaktive verstecken', 'Hostname' => 'Hostname', @@ -94,8 +94,9 @@ 'Identity' => 'Identität', 'Immunity level' => 'Immunitätslevel', 'Import' => 'Importieren', + 'Imported successfully' => '', 'Information' => 'Information', - 'Install' => 'Install', + 'Install' => 'Installieren', 'Invoked on' => 'Ausgesprochen am', 'Join game' => 'Verbinden', 'Kick player' => 'Spieler kicken', @@ -117,16 +118,13 @@ 'No players in the server' => 'Keine Spieler auf dem Server', 'None' => 'Keine', 'Not applicable' => '@@Nicht anwendbar@@', - 'Object' => 'Objekt', 'Password' => 'Passwort', 'Permanent' => 'Permanent', 'Players' => 'Spieler', - 'Please select an option to administer.' => 'Wähle bitte das Gebiet aus, das du administrieren möchtest.', + 'Players blocked' => 'Spieler geblockt', 'Please wait' => 'Bitte warten', 'Port' => 'Port', 'Powered by' => '@@Powered by@@', - 'Protest Information' => 'Protest Informationen', - 'Protest ban' => 'Bann protestieren', 'Query' => 'Abfrage', 'RCON' => 'RCON', 'RCON password' => 'RCON Passwort', @@ -134,29 +132,28 @@ 'Reban' => '@@Nochmal bannen@@', 'Refresh' => 'Erneuern', 'Remove' => 'Entfernen', + 'Remove from group' => '', 'Restore' => '@@Wiederherstellen@@', 'Save' => 'Speichern', + 'Saved successfully' => '', 'Score' => 'Punkte', 'Search' => 'Suchen', 'Search bans' => 'Banns durchsuchen', 'See' => 'Anschauen', + 'See the {link} for more details.' => '', 'Select' => 'Auswählen', 'Server' => 'Server', 'Server group' => 'Server Gruppe', 'Server groups' => 'Server Gruppen', - 'Server Information' => 'Server Informationen', 'Server password' => 'Serverpasswort', 'Server permissions' => 'Server Rechte', - 'Servers' => 'Server', 'Servers in group' => 'Server in Gruppe', 'Show inactive bans' => 'Zeige Inaktive', 'Status' => 'Status', 'Steam Community ID' => 'Steam Community ID', 'Steam ID' => 'Steam ID', - 'Subject' => '@@Subject@@', - 'Submission Information' => 'Einsendungsinformationen', + 'Subject' => '@@@@', 'Submit' => 'Senden', - 'Submit ban' => 'Bann einsenden', 'Submitted on' => '@@Eingesendet am@@', 'The following is a list of the permissions that you have on this system.' => '@@Die folgende Liste zeigt deine Rechte in diesem System.@@', 'The game server needs the following configuration to be able to communicate with the database.' => 'Der Gameserver muss wie folgt konfiguriert werden, um mit der Datenbank kommunizieren zu können.', @@ -168,23 +165,22 @@ 'Timezone' => 'Zeitzone', 'Title' => 'Title', 'Total' => '@@Insgesamt@@', - 'Total admins' => 'Admins insgesamt', + 'Total admins' => '@@Admins insgesamt@@', 'Total bans' => 'Banns insgesamt', - 'Total demo size' => 'Demogröße insgesamt', - 'Total protests' => 'Proteste insgesamt', - 'Total servers' => 'Server insgesamt', 'Total blocked' => 'Insgesamt Gestoppt', - 'Total submissions' => 'Einsendungen insgesamt', + 'Total demo size' => '@@Demogröße insgesamt@@', + 'Total protests' => '@@Proteste insgesamt@@', + 'Total servers' => '@@Server insgesamt@@', + 'Total submissions' => '@@Einsendungen insgesamt@@', 'Type' => 'Typ', 'Type \'clr\' to clear the console' => 'Schreibe \'clr\' um den Inhalt der Konsole zu löschen', 'URL' => 'URL', 'Unban' => 'Entbannen', 'Unban reason' => 'Entbanngrund', 'Unbanned by' => '@@Entbannt von@@', + 'Uninstall' => 'Deinstallieren', 'Unknown' => 'Unbekannt', - 'Unsupported format.' => '@@Unsupported format.@@', 'Version' => 'Version', - 'Version Information' => 'Version Informationen', 'View Steam Profile' => 'Steam-Profil anzeigen', 'Warning' => 'Warnung', 'Web group' => 'Web Gruppe', @@ -213,8 +209,8 @@ 'controllers.admin.bans.menu.submissions' => 'Bann Einsendungen', 'controllers.admin.bans.title' => 'Banns', 'controllers.admin.games.menu.add' => 'Game hinzufügen', - 'controllers.admin.games.menu.map-image' => 'Upload map image', 'controllers.admin.games.menu.list' => 'Games auflisten', + 'controllers.admin.games.menu.map-image' => '', 'controllers.admin.games.title' => 'Spiele', 'controllers.admin.groups.menu.add' => 'Gruppe hinzufügen', 'controllers.admin.groups.menu.import' => 'Gruppen importieren', @@ -312,6 +308,7 @@ 'models.SettingsForm.enable_submit' => 'Bann Einsendungen aktivieren', 'models.SettingsForm.items_per_page' => 'Einträge pro Seite', 'models.SettingsForm.language' => 'Sprache', + 'models.SettingsForm.mailer_from' => '', 'models.SettingsForm.password_min_length' => 'Min. Passwort Länge', 'models.SettingsForm.smtp_host' => 'SMTP Host', 'models.SettingsForm.smtp_password' => 'SMTP Passwort', @@ -357,12 +354,12 @@ 'permissions.unban_own_bans' => 'Eigene Banns entbannen', 'views.admin.bans.protests.active.title' => 'Aktiv', 'views.admin.bans.protests.archive.title' => 'Archiv', - 'views.admin.bans.protests.grid.archive' => 'Archivieren', + 'views.admin.bans.protests.grid.archive' => '@@Archivieren@@', 'views.admin.bans.submissions.active.title' => 'Aktiv', 'views.admin.bans.submissions.archive.title' => 'Archiv', - 'views.admin.bans.submissions.grid.archive' => 'Archivieren', - 'views.admin.settings.plugins.grid.settings' => 'Einstellungen', + 'views.admin.bans.submissions.grid.archive' => '@@Archivieren@@', 'views.admin.settings.help.steam_web_api_key' => "Einige Funktionen, Plugins oder Themen benötigen einen Steam Web API Schlüssel.\nRegistriere einen Schlüssel für deine Domain unter {link}.", + 'views.admin.settings.plugins.grid.settings' => 'Einstellungen', 'week' => '@@Woche@@', 'weeks' => 'Wochen', '{n} day|{n} days' => '{n} Tag|{n} Tage', diff --git a/web/application/messages/en/sourcebans.php b/web/application/messages/en/sourcebans.php index 08eb846..5e5d5e2 100644 --- a/web/application/messages/en/sourcebans.php +++ b/web/application/messages/en/sourcebans.php @@ -22,8 +22,8 @@ 'A new release is available.' => 'A new release is available.', 'Access' => 'Access', 'Add comment' => 'Add comment', + 'Add to group' => '', 'Admin' => 'Admin', - 'Admin Information' => 'Admin Information', 'Admins in group' => 'Admins in group', 'Advanced search' => 'Advanced search', 'All of the bans in the database can be viewed from here.' => 'All of the bans in the database can be viewed from here.', @@ -32,15 +32,15 @@ 'Archived' => 'Archived', 'Archived protests' => 'Archived protests', 'Archived submissions' => 'Archived submissions', + 'Are you sure you want to add these items to {name}?' => '', 'Are you sure you want to kick {name}?' => 'Are you sure you want to kick {name}?', + 'Are you sure you want to remove these items from {name}?' => '', 'Are you sure you want to uninstall this plugin?\nThis will delete all its data!' => 'Are you sure you want to uninstall this plugin?\nThis will delete all its data!', 'Authentication type' => 'Authentication type', 'Author' => 'Author', 'Back' => 'Back', 'Ban' => 'Ban', - 'Ban Information' => 'Ban Information', 'Ban player' => 'Ban player', - 'Bans' => 'Bans', 'By' => '@@By@@', 'Change' => 'Change', 'Click' => '@@Click@@', @@ -51,7 +51,6 @@ 'Comments' => 'Comments', 'Confirm' => '@@Confirm@@', 'Confirm RCON password' => '@@Confirm RCON password@@', - 'Players blocked' => 'Players blocked', 'Contact' => '@@Contact@@', 'Copy the {section} section below and place it on the game server in {file}, so that it looks similar to this:' => 'Copy the {section} section below and place it on the game server in {file}, so that it looks similar to this:', 'Country' => 'Country', @@ -60,6 +59,7 @@ 'Delete' => 'Delete', 'Delete comment' => '@@Delete comment@@', 'Demo' => 'Demo', + 'Demos' => '', 'Deny' => 'Deny', 'Description' => 'Description', 'Disable' => 'Disable', @@ -79,7 +79,6 @@ 'File' => 'File', 'File does not exist.' => '@@File does not exist.@@', 'Filename' => 'Filename', - 'Flags' => 'Flags', 'Folder' => 'Folder', 'Function' => 'Function', 'Game' => 'Game', @@ -95,6 +94,7 @@ 'Identity' => 'Identity', 'Immunity level' => 'Immunity level', 'Import' => 'Import', + 'Imported successfully' => '', 'Information' => 'Information', 'Install' => 'Install', 'Invoked on' => 'Invoked on', @@ -118,16 +118,13 @@ 'No players in the server' => 'No players in the server', 'None' => 'None', 'Not applicable' => '@@Not applicable@@', - 'Object' => 'Object', 'Password' => 'Password', 'Permanent' => 'Permanent', 'Players' => 'Players', - 'Please select an option to administer.' => 'Please select an option to administer.', + 'Players blocked' => 'Players blocked', 'Please wait' => 'Please wait', 'Port' => 'Port', 'Powered by' => '@@Powered by@@', - 'Protest Information' => 'Protest Information', - 'Protest ban' => 'Protest ban', 'Query' => 'Query', 'RCON' => 'RCON', 'RCON password' => 'RCON password', @@ -135,8 +132,10 @@ 'Reban' => '@@Reban@@', 'Refresh' => 'Refresh', 'Remove' => 'Remove', + 'Remove from group' => '', 'Restore' => '@@Restore@@', 'Save' => 'Save', + 'Saved successfully' => '', 'Score' => 'Score', 'Search' => 'Search', 'Search bans' => 'Search bans', @@ -144,21 +143,17 @@ 'See the {link} for more details.' => 'See the {link} for more details.', 'Select' => 'Select', 'Server' => 'Server', - 'Server Information' => 'Server Information', 'Server group' => 'Server group', 'Server groups' => 'Server groups', 'Server password' => 'Server password', 'Server permissions' => 'Server permissions', - 'Servers' => 'Servers', 'Servers in group' => 'Servers in group', 'Show inactive bans' => 'Show inactive bans', 'Status' => 'Status', 'Steam Community ID' => 'Steam Community ID', 'Steam ID' => 'Steam ID', 'Subject' => '@@Subject@@', - 'Submission Information' => 'Submission Information', 'Submit' => 'Submit', - 'Submit ban' => 'Submit ban', 'Submitted on' => '@@Submitted on@@', 'The following is a list of the permissions that you have on this system.' => '@@The following is a list of the permissions that you have on this system.@@', 'The game server needs the following configuration to be able to communicate with the database.' => 'The game server needs the following configuration to be able to communicate with the database.', @@ -170,13 +165,13 @@ 'Timezone' => 'Timezone', 'Title' => 'Title', 'Total' => '@@Total@@', - 'Total admins' => 'Total admins', + 'Total admins' => '@@Total admins@@', 'Total bans' => 'Total bans', - 'Total demo size' => 'Total demo size', - 'Total protests' => 'Total protests', - 'Total servers' => 'Total servers', 'Total blocked' => 'Total blocked', - 'Total submissions' => 'Total submissions', + 'Total demo size' => '@@Total demo size@@', + 'Total protests' => '@@Total protests@@', + 'Total servers' => '@@Total servers@@', + 'Total submissions' => '@@Total submissions@@', 'Type' => 'Type', 'Type \'clr\' to clear the console' => 'Type \'clr\' to clear the console', 'URL' => 'URL', @@ -186,7 +181,6 @@ 'Uninstall' => 'Uninstall', 'Unknown' => 'Unknown', 'Version' => 'Version', - 'Version Information' => 'Version Information', 'View Steam Profile' => 'View Steam Profile', 'Warning' => 'Warning', 'Web group' => 'Web group', @@ -215,8 +209,8 @@ 'controllers.admin.bans.menu.submissions' => 'Ban submissions', 'controllers.admin.bans.title' => 'Bans', 'controllers.admin.games.menu.add' => 'Add game', - 'controllers.admin.games.menu.map-image' => 'Upload map image', 'controllers.admin.games.menu.list' => 'List games', + 'controllers.admin.games.menu.map-image' => 'Upload map image', 'controllers.admin.games.title' => 'Games', 'controllers.admin.groups.menu.add' => 'Add group', 'controllers.admin.groups.menu.import' => 'Import groups', @@ -361,15 +355,14 @@ 'permissions.unban_own_bans' => 'Unban own bans', 'views.admin.bans.protests.active.title' => 'Active', 'views.admin.bans.protests.archive.title' => 'Archive', - 'views.admin.bans.protests.grid.archive' => 'Archive', + 'views.admin.bans.protests.grid.archive' => '@@Archive@@', 'views.admin.bans.submissions.active.title' => 'Active', 'views.admin.bans.submissions.archive.title' => 'Archive', - 'views.admin.bans.submissions.grid.archive' => 'Archive', - 'views.admin.settings.plugins.grid.settings' => 'Settings', + 'views.admin.bans.submissions.grid.archive' => '@@Archive@@', 'views.admin.settings.help.steam_web_api_key' => "Some features, plugins or themes require a Steam Web API Key.\nRegister one for your domain name at {link}.", + 'views.admin.settings.plugins.grid.settings' => 'Settings', 'week' => '@@week@@', 'weeks' => 'weeks', - '{n} comment|{n} comments' => '{n} comment|{n} comments', '{n} day|{n} days' => '{n} day|{n} days', '{n} hour|{n} hours' => '{n} hour|{n} hours', '{n} minute|{n} minutes' => '{n} minute|{n} minutes', diff --git a/web/application/messages/nl/sourcebans.php b/web/application/messages/nl/sourcebans.php index 52d0c3a..3394f97 100644 --- a/web/application/messages/nl/sourcebans.php +++ b/web/application/messages/nl/sourcebans.php @@ -22,8 +22,8 @@ 'A new release is available.' => 'Een nieuwe release is beschikbaar.', 'Access' => 'Toegang', 'Add comment' => 'Opmerking toevoegen', + 'Add to group' => '', 'Admin' => 'Admin', - 'Admin Information' => 'Admin Informatie', 'Admins in group' => 'Admins in groep', 'Advanced search' => 'Geavanceerd zoeken', 'All of the bans in the database can be viewed from here.' => 'All of the bans in the database can be viewed from here.', @@ -32,15 +32,15 @@ 'Archived' => 'Gearchiveerd', 'Archived protests' => 'Gearchiveerde protesten', 'Archived submissions' => 'Gearchiveerde submissies', + 'Are you sure you want to add these items to {name}?' => '', 'Are you sure you want to kick {name}?' => 'Ben je zeker dat je {name} wilt kicken?', + 'Are you sure you want to remove these items from {name}?' => '', 'Are you sure you want to uninstall this plugin?\nThis will delete all its data!' => 'Ben je zeker dat je deze plugin wil deïnstalleren?\nDit zal alle gegevens verwijderen!', 'Authentication type' => 'Authenticatie type', 'Author' => 'Auteur', 'Back' => 'Terug', 'Ban' => 'Bannen', - 'Ban Information' => 'Ban Informatie', 'Ban player' => 'Ban speler', - 'Bans' => 'Bans', 'By' => '@@Door@@', 'Change' => 'Verander', 'Click' => '@@Klik@@', @@ -51,7 +51,6 @@ 'Comments' => 'Opmerkingen', 'Confirm' => '@@Bevestig@@', 'Confirm RCON password' => '@@Bevestig RCON wachtwoord@@', - 'Players blocked' => 'Spelers geblokkeerd', 'Contact' => '@@Contact@@', 'Copy the {section} section below and place it on the game server in {file}, so that it looks similar to this:' => 'Kopieer de onderstaande {section} sectie en plaats deze op de gameserver in {file}, zodat het lijkt op het volgende:', 'Country' => 'Land', @@ -60,6 +59,7 @@ 'Delete' => 'Verwijderen', 'Delete comment' => '@@Opmerking verwijderen@@', 'Demo' => 'Demo', + 'Demos' => '', 'Deny' => 'Weigeren', 'Description' => 'Omschrijving', 'Disable' => 'Uitschakelen', @@ -79,7 +79,6 @@ 'File' => 'Bestand', 'File does not exist.' => '@@Bestand bestaat niet.@@', 'Filename' => 'Bestandsnaam', - 'Flags' => 'Permissies', 'Folder' => 'Map', 'Function' => 'Functie', 'Game' => 'Spel', @@ -119,16 +118,13 @@ 'No players in the server' => 'Geen spelers in de server', 'None' => 'Geen', 'Not applicable' => '@@Niet van toepassing@@', - 'Object' => 'Object', 'Password' => 'Wachtwoord', 'Permanent' => 'Permanent', 'Players' => 'Spelers', - 'Please select an option to administer.' => 'Please select an option to administer.', + 'Players blocked' => 'Spelers geblokkeerd', 'Please wait' => 'Even geduld', 'Port' => 'Poort', 'Powered by' => '@@Aangedreven door@@', - 'Protest Information' => 'Protest Informatie', - 'Protest ban' => 'Ban protesteren', 'Query' => 'Query', 'RCON' => 'RCON', 'RCON password' => 'RCON wachtwoord', @@ -136,6 +132,7 @@ 'Reban' => '@@Herbannen@@', 'Refresh' => 'Vernieuwen', 'Remove' => 'Verwijder', + 'Remove from group' => '', 'Restore' => '@@Herstellen@@', 'Save' => 'Opslaan', 'Saved successfully' => 'Succesvol opgeslagen', @@ -146,21 +143,17 @@ 'See the {link} for more details.' => 'Zie de {link} voor meer details.', 'Select' => 'Selecteer', 'Server' => 'Server', - 'Server Information' => 'Server Informatie', 'Server group' => 'Server groep', 'Server groups' => 'Server groepen', 'Server password' => 'Server wachtwoord', 'Server permissions' => 'Server permissies', - 'Servers' => 'Servers', 'Servers in group' => 'Servers in groep', 'Show inactive bans' => 'Inactieve bans weergeven', 'Status' => 'Status', 'Steam Community ID' => 'Steam Community ID', 'Steam ID' => 'Steam ID', 'Subject' => '@@Onderwerp@@', - 'Submission Information' => 'Submissie Informatie', 'Submit' => 'Indienen', - 'Submit ban' => 'Ban indienen', 'Submitted on' => '@@Submitted on@@', 'The following is a list of the permissions that you have on this system.' => '@@The following is a list of the permissions that you have on this system.@@', 'The game server needs the following configuration to be able to communicate with the database.' => 'De gameserver heeft de volgende configuratie nodig om met de database te kunnen communiceren.', @@ -172,13 +165,13 @@ 'Timezone' => 'Tijdzone', 'Title' => 'Titel', 'Total' => '@@Aantal@@', - 'Total admins' => 'Aantal admins', + 'Total admins' => '@@Aantal admins@@', 'Total bans' => 'Aantal bans', - 'Total demo size' => 'Totale demo grootte', - 'Total protests' => 'Aantal protesten', - 'Total servers' => 'Aantal servers', 'Total blocked' => 'Aantal geblokkeerd', - 'Total submissions' => 'Aantal submissies', + 'Total demo size' => '@@Totale demo grootte@@', + 'Total protests' => '@@Aantal protesten@@', + 'Total servers' => '@@Aantal servers@@', + 'Total submissions' => '@@Aantal submissies@@', 'Type' => 'Type', 'Type \'clr\' to clear the console' => 'Typ \'clr\' om de console te legen', 'URL' => 'URL', @@ -188,7 +181,6 @@ 'Uninstall' => 'Deïnstalleren', 'Unknown' => 'Onbekend', 'Version' => 'Versie', - 'Version Information' => 'Versie Informatie', 'View Steam Profile' => 'Steam-profiel weergeven', 'Warning' => 'Waarschuwing', 'Web group' => 'Web groep', @@ -217,8 +209,8 @@ 'controllers.admin.bans.menu.submissions' => 'Ban submissies', 'controllers.admin.bans.title' => 'Bans', 'controllers.admin.games.menu.add' => 'Spel toevoegen', - 'controllers.admin.games.menu.map-image' => 'Map-afbeelding uploaden', 'controllers.admin.games.menu.list' => 'Spellen weergeven', + 'controllers.admin.games.menu.map-image' => 'Map-afbeelding uploaden', 'controllers.admin.games.title' => 'Spellen', 'controllers.admin.groups.menu.add' => 'Groep toevoegen', 'controllers.admin.groups.menu.import' => 'Groepen importeren', @@ -251,7 +243,7 @@ 'controllers.site.error.title' => 'Foutmelding', 'controllers.site.login.title' => 'Inloggen', 'controllers.site.logout.title' => 'Uitloggen', - 'controllers.site.lostPassword.body' => "Hello {name},\n\nYour password reset was successful.\nYour password was changed to: {password}\n\nLogin to your SourceBans account and change your password in {link}.", + 'controllers.site.lostPassword.body' => "", 'controllers.site.lostPassword.subject' => 'SourceBans wachtwoord reset', 'controllers.site.lostPassword.title' => 'Wachtwoord vergeten', 'controllers.site.protestban.title' => 'Ban protesteren', @@ -300,7 +292,7 @@ 'models.LoginForm.rememberMe' => 'Onthoud mij', 'models.LoginForm.username' => 'Gebruikersnaam', 'models.LostPasswordForm.email' => 'E-mailadres', - 'models.LostPasswordForm.reset.body' => "Hallo {name},\n\nyou have requested to have your password reset for your SourceBans account.\nTo complete this process, please click the following link.\n\n{link}\n\nNOTE: If you did not request this reset, then simply ignore this email.", + 'models.LostPasswordForm.reset.body' => "", 'models.LostPasswordForm.reset.subject' => 'SourceBans wachtwoord reset', 'models.SBBan.rules.err_unique' => '{attribute} "{value}" is al geband.', 'models.SBProtest.rules.err_not_banned' => '{attribute} "{value}" is momenteel niet geband.', @@ -363,15 +355,14 @@ 'permissions.unban_own_bans' => 'Eigen bans unbannen', 'views.admin.bans.protests.active.title' => 'Actief', 'views.admin.bans.protests.archive.title' => 'Archief', - 'views.admin.bans.protests.grid.archive' => 'Archiveren', + 'views.admin.bans.protests.grid.archive' => '@@Archiveren@@', 'views.admin.bans.submissions.active.title' => 'Actief', 'views.admin.bans.submissions.archive.title' => 'Archief', - 'views.admin.bans.submissions.grid.archive' => 'Archiveren', - 'views.admin.settings.plugins.grid.settings' => 'Instellingen', + 'views.admin.bans.submissions.grid.archive' => '@@Archiveren@@', 'views.admin.settings.help.steam_web_api_key' => "Sommige functies, plugins of thema's vereisen een Steam Web API-key.\nRegistreer er één voor je domeinnaam op {link}.", + 'views.admin.settings.plugins.grid.settings' => 'Instellingen', 'week' => '@@week@@', 'weeks' => 'weken', - '{n} comment|{n} comments' => '{n} opmerking|{n} opmerkingen', '{n} day|{n} days' => '{n} dag|{n} dagen', '{n} hour|{n} hours' => '{n} uur|{n} uren', '{n} minute|{n} minutes' => '{n} minuut|{n} minuten', diff --git a/web/application/messages/ru/sourcebans.php b/web/application/messages/ru/sourcebans.php index 37b43da..1a1f9e2 100644 --- a/web/application/messages/ru/sourcebans.php +++ b/web/application/messages/ru/sourcebans.php @@ -21,9 +21,9 @@ '

Here you will be able to submit a ban for a player who is breaking the rules of the gameserver. When submitting a ban we request you to fill out all the fields to be as descriptive as possible in your comments. This will ensure that your ban submission is processed much faster.

For a short explanation on how to create a demo, click here.

' => '@@

Здесь Вы можете отправить заявку на блокировку игрока, который нарушает правила Вашего сервера. При заполнении заявки, излагайте наиболее точные и объективные причины. В таком случае Ваша заявка будет рассмотрена намного быстрее.

Чтобы получить помощь по созданию демо-записи, нажмите сюда.

@@', 'A new release is available.' => 'Доступен новый релиз.', 'Access' => 'Доступ', - 'Add comment' => '@@Добавить комментарий@@', + 'Add comment' => 'Добавить комментарий', + 'Add to group' => '', 'Admin' => 'Администратор', - 'Admin Information' => 'Информация об администраторе', 'Admins in group' => 'Администраторов в группе', 'Advanced search' => 'Расширенный поиск', 'All of the bans in the database can be viewed from here.' => 'Здесь Вы можете посмотреть все баны, находящиеся в базе данных.', @@ -32,25 +32,25 @@ 'Archived' => 'Перемещено в архив', 'Archived protests' => 'Архив протестов', 'Archived submissions' => 'Архив заявок', + 'Are you sure you want to add these items to {name}?' => '', 'Are you sure you want to kick {name}?' => 'Вы уверены, что хотите отключить {name}?', + 'Are you sure you want to remove these items from {name}?' => '', 'Are you sure you want to uninstall this plugin?\nThis will delete all its data!' => 'Вы уверены, что хотите удалить плагин?\nУдаление сотрёт все данные!', 'Authentication type' => 'Тип аутентификации', 'Author' => 'Автор', 'Back' => 'Назад', 'Ban' => 'Бан', - 'Ban Information' => 'Информация о бане', 'Ban player' => 'Забанить игрока', - 'Bans' => 'Баны', 'By' => '@@От@@', 'Change' => 'Изменить', 'Click' => '@@Нажать@@', + 'Close' => '', 'Command' => 'Команда', 'Command executed' => 'Команда выполнена', 'Comment' => '@@Комментарий@@', - 'Comments' => '@@Комментарии@@', + 'Comments' => 'Комментарии', 'Confirm' => '@@Подтвердить@@', 'Confirm RCON password' => '@@Подтвердите пароль RCON@@', - 'Players blocked' => 'Заблокировано игроков', 'Contact' => '@@Связаться@@', 'Copy the {section} section below and place it on the game server in {file}, so that it looks similar to this:' => 'Скопируйте секцию {section} ниже и поместите эти данные в {file}, чтобы выглядело вот так:', 'Country' => 'Страна', @@ -59,6 +59,7 @@ 'Delete' => 'Удалить', 'Delete comment' => '@@Удалить комментарий@@', 'Demo' => 'Демо-запись', + 'Demos' => '', 'Deny' => 'Запретить', 'Description' => 'Описание', 'Disable' => 'Отключить', @@ -78,7 +79,6 @@ 'File' => 'Файл', 'File does not exist.' => '@@Файл не существует.@@', 'Filename' => 'Имя файла', - 'Flags' => 'Флаги', 'Folder' => 'Папка', 'Function' => 'Функция', 'Game' => 'Игра', @@ -94,6 +94,7 @@ 'Identity' => 'Идентификатор', 'Immunity level' => 'Уровень иммунитета', 'Import' => 'Импорт', + 'Imported successfully' => '', 'Information' => 'Информация', 'Install' => 'Установка', 'Invoked on' => 'Выдано', @@ -113,19 +114,17 @@ 'Name' => 'Имя', 'New' => '@@Новый@@', 'No' => '@@Нет@@', + 'No comments' => '', 'No players in the server' => 'Нет игроков на сервере', 'None' => 'Нет', 'Not applicable' => '@@Нельзя применить@@', - 'Object' => 'Объект', 'Password' => 'Пароль', 'Permanent' => 'Перманент', 'Players' => 'Игроки', - 'Please select an option to administer.' => 'Выберите опцию, которую хотите изменять.', + 'Players blocked' => 'Заблокировано игроков', 'Please wait' => 'Подождите', 'Port' => 'Порт', 'Powered by' => '@@Под управлением@@', - 'Protest Information' => 'Информация о протесте', - 'Protest ban' => 'Протест бана', 'Query' => 'Запрос', 'RCON' => 'RCON', 'RCON password' => 'RCON-пароль', @@ -133,8 +132,10 @@ 'Reban' => '@@Забанить снова@@', 'Refresh' => 'Обновить', 'Remove' => 'Удалить', + 'Remove from group' => '', 'Restore' => '@@Восстановить@@', 'Save' => 'Сохранить', + 'Saved successfully' => '', 'Score' => 'Счёт', 'Search' => 'Поиск', 'Search bans' => 'Поиск банов', @@ -142,21 +143,17 @@ 'See the {link} for more details.' => 'Смотрите {link} для более подробной информацией.', 'Select' => 'Выбрать', 'Server' => 'Сервер', - 'Server Information' => 'Информация о сервере', 'Server group' => 'Группа сервера', 'Server groups' => 'Группы сервера', 'Server password' => 'Пароль сервера', 'Server permissions' => 'Права доступа сервера', - 'Servers' => 'Серверы', 'Servers in group' => 'Серверы в группе', 'Show inactive bans' => 'Показывать неактивные баны', 'Status' => 'Статус', 'Steam Community ID' => 'Steam ID сообщества', 'Steam ID' => 'Steam ID', 'Subject' => '@@Тема@@', - 'Submission Information' => 'Информация о заявке', 'Submit' => 'Отправить', - 'Submit ban' => 'Отправить бан', 'Submitted on' => '@@Отправлено@@', 'The following is a list of the permissions that you have on this system.' => '@@Далее представлен список Ваших полномочий в системе.@@', 'The game server needs the following configuration to be able to communicate with the database.' => 'Серверу требуется следующая конфигурация для установления связи с базой данных.', @@ -168,13 +165,13 @@ 'Timezone' => 'Часовой пояс', 'Title' => 'Заголовок', 'Total' => '@@Всего@@', - 'Total admins' => 'Всего администраторов', + 'Total admins' => '@@Всего администраторов@@', 'Total bans' => 'Всего банов', - 'Total demo size' => 'Общий размер демо-записей', - 'Total protests' => 'Всего протестов', - 'Total servers' => 'Всего серверов', 'Total blocked' => 'Всего заблокировано', - 'Total submissions' => 'Всего заявок', + 'Total demo size' => '@@Общий размер демо-записей@@', + 'Total protests' => '@@Всего протестов@@', + 'Total servers' => '@@Всего серверов@@', + 'Total submissions' => '@@Всего заявок@@', 'Type' => 'Тип', 'Type \'clr\' to clear the console' => 'Введите \'clr\', чтобы очистить консоль', 'URL' => 'URL', @@ -184,7 +181,6 @@ 'Uninstall' => 'Удалить', 'Unknown' => 'Неизвестно', 'Version' => 'Версия', - 'Version Information' => 'Информация о версии', 'View Steam Profile' => 'Посмотреть профиль Steam', 'Warning' => 'Внимание', 'Web group' => 'Веб-группа', @@ -212,8 +208,8 @@ 'controllers.admin.bans.menu.submissions' => 'Заявки на бан', 'controllers.admin.bans.title' => 'Баны', 'controllers.admin.games.menu.add' => 'Добавить игру', - 'controllers.admin.games.menu.map-image' => 'Загрузить изображение карты', 'controllers.admin.games.menu.list' => 'Список игр', + 'controllers.admin.games.menu.map-image' => 'Загрузить изображение карты', 'controllers.admin.games.title' => 'Игры', 'controllers.admin.groups.menu.add' => 'Добавить группу', 'controllers.admin.groups.menu.import' => 'Импортировать группы', @@ -294,15 +290,13 @@ 'models.LoginForm.rememberMe' => 'Запомнить меня', 'models.LoginForm.username' => 'Имя пользователя', 'models.LostPasswordForm.email' => 'Адрес email', - 'models.LostPasswordForm.reset.body' => "{name},\nВы запросили смену пароля для своего аккаунта SourceBans.\nПерейдите по ссылке ниже чтобы продолжить.\n\n{link}\n\nВНИМНИЕ: Если Вы не запрашивали сброса, пожалуйста, не переходите по ссылке.", + 'models.LostPasswordForm.reset.body' => "{name},\n\nВы запросили смену пароля для своего аккаунта SourceBans.\nПерейдите по ссылке ниже чтобы продолжить.\n\n{link}\n\nВНИМНИЕ: Если Вы не запрашивали сброса, пожалуйста, не переходите по ссылке.", 'models.LostPasswordForm.reset.subject' => 'Сброс пароля SourceBans', 'models.SBBan.rules.err_unique' => '{attribute} "{value}" уже забанен(а).', 'models.SBProtest.rules.err_not_banned' => '{attribute} "{value}" на данный момент не забанен(а).', 'models.SBSubmission.rules.err_unique' => '{attribute} "{value}" уже имеет активную заявку.', 'models.SettingsForm.bans_hide_admin' => 'Скрывать имена администраторов', 'models.SettingsForm.bans_hide_ip' => 'Спрятать IP-адреса', - 'models.SettingsForm.theme' => 'Тема', - 'models.SettingsForm.steam_web_api_key' => 'Ключ Steam Web API', 'models.SettingsForm.bans_public_export' => 'Включить публичный экспорт', 'models.SettingsForm.dashboard_blocks_popup' => 'Включить всплывающую информацию для игроков с баном', 'models.SettingsForm.dashboard_title' => 'Заголовок', @@ -313,13 +307,15 @@ 'models.SettingsForm.enable_submit' => 'Включить приём заявок на бан', 'models.SettingsForm.items_per_page' => 'Банов на страницу', 'models.SettingsForm.language' => 'Язык', + 'models.SettingsForm.mailer_from' => '', 'models.SettingsForm.password_min_length' => 'Минимальная длина пароля', 'models.SettingsForm.smtp_host' => 'SMTP-хост', 'models.SettingsForm.smtp_password' => 'Пароль от SMTP', 'models.SettingsForm.smtp_port' => 'Порт SMTP', 'models.SettingsForm.smtp_secure' => 'SMTP-безопасность', 'models.SettingsForm.smtp_username' => 'Имя пользователя SMTP', - 'models.SettingsForm.steam_web_aТема', + 'models.SettingsForm.steam_web_api_key' => 'Ключ Steam Web API', + 'models.SettingsForm.theme' => 'Тема', 'models.SettingsForm.timezone' => 'Часовой пояс', 'month' => '@@месяц@@', 'months' => 'месяцы', @@ -357,12 +353,12 @@ 'permissions.unban_own_bans' => 'Разбанить собственные баны', 'views.admin.bans.protests.active.title' => 'Активные', 'views.admin.bans.protests.archive.title' => 'Архив', - 'views.admin.bans.protests.grid.archive' => 'Архив', + 'views.admin.bans.protests.grid.archive' => '@@Архив@@', 'views.admin.bans.submissions.active.title' => 'Активные', 'views.admin.bans.submissions.archive.title' => 'Архив', - 'views.admin.bans.submissions.grid.archive' => 'Архив', - 'views.admin.settings.plugins.grid.settings' => 'Настройки', + 'views.admin.bans.submissions.grid.archive' => '@@Архив@@', 'views.admin.settings.help.steam_web_api_key' => "Некоторые возможности, темы или компоненты могут иметь необходимость использовать ключ Steam Web API.\nЗарегистрируйте свой ключ здесь: {link}.", + 'views.admin.settings.plugins.grid.settings' => 'Настройки', 'week' => '@@неделя@@', 'weeks' => 'недели', '{n} day|{n} days' => '{n} день(дня)|{n} дней', diff --git a/web/application/models/SBAdmin.php b/web/application/models/SBAdmin.php index 8fc51c9..ce33a2a 100644 --- a/web/application/models/SBAdmin.php +++ b/web/application/models/SBAdmin.php @@ -101,7 +101,7 @@ public function rules() array('group_id', 'numerical', 'integerOnly'=>true), array('name, identity', 'length', 'max'=>64), array('name', 'unique'), - array('identity', 'SBAdminIdentityValidator'), + array('identity', 'application.validators.SBAdminIdentityValidator'), array('new_password, server_password', 'length', 'max'=>64, 'min'=>SourceBans::app()->settings->password_min_length), array('email', 'email'), array('email', 'length', 'max'=>128), diff --git a/web/application/models/SBBan.php b/web/application/models/SBBan.php index 05e987d..d5c9ffc 100644 --- a/web/application/models/SBBan.php +++ b/web/application/models/SBBan.php @@ -91,7 +91,7 @@ public function rules() array('type, reason, length', 'required'), array('type, length', 'numerical', 'integerOnly'=>true), array('steam, ip, name', 'default', 'setOnEmpty'=>true), - array('steam, ip', 'SBBanTypeValidator'), + array('steam, ip', 'application.validators.SBBanTypeValidator'), array('name', 'length', 'max'=>64), array('reason, unban_reason', 'length', 'max'=>255), // The following rule is used by search(). @@ -249,6 +249,14 @@ public function behaviors() 'class' => 'zii.behaviors.CTimestampBehavior', 'updateAttribute' => null, ), + 'UserIdBehavior' => array( + 'class' => 'application.behaviors.UserIdBehavior', + 'attributes' => 'admin_id', + ), + 'UserIpBehavior' => array( + 'class' => 'application.behaviors.UserIpBehavior', + 'attributes' => 'admin_ip', + ), ); } @@ -456,15 +464,6 @@ protected function beforeFind() protected function beforeSave() { - if($this->isNewRecord) - { - if(!Yii::app()->user->isGuest) - { - $this->admin_id = Yii::app()->user->id; - } - - $this->admin_ip = Yii::app()->request->serverHostAddress; - } if(!empty($this->steam)) { $this->steam = strtoupper($this->steam); diff --git a/web/application/models/SBComment.php b/web/application/models/SBComment.php index f7eed7f..bc78b7d 100644 --- a/web/application/models/SBComment.php +++ b/web/application/models/SBComment.php @@ -138,19 +138,15 @@ public function behaviors() 'CTimestampBehavior'=>array( 'class'=>'zii.behaviors.CTimestampBehavior', ), + 'UserIdBehavior' => array( + 'class' => 'application.behaviors.UserIdBehavior', + 'attributes' => 'admin_id', + ), ); } protected function beforeSave() { - if($this->isNewRecord) - { - if(!Yii::app()->user->isGuest) - { - $this->admin_id = Yii::app()->user->id; - } - } - return parent::beforeSave(); } } \ No newline at end of file diff --git a/web/application/models/SBLog.php b/web/application/models/SBLog.php index 1d46df6..e87104c 100644 --- a/web/application/models/SBLog.php +++ b/web/application/models/SBLog.php @@ -135,6 +135,14 @@ public function behaviors() 'class' => 'zii.behaviors.CTimestampBehavior', 'updateAttribute' => null, ), + 'UserIdBehavior' => array( + 'class' => 'application.behaviors.UserIdBehavior', + 'attributes' => 'admin_id', + ), + 'UserIpBehavior' => array( + 'class' => 'application.behaviors.UserIpBehavior', + 'attributes' => 'admin_ip', + ), ); } @@ -153,12 +161,6 @@ protected function beforeSave() { if($this->isNewRecord) { - if(!Yii::app()->user->isGuest) - { - $this->admin_id = Yii::app()->user->id; - } - - $this->admin_ip = Yii::app()->request->serverHostAddress; $this->function = $this->_getTraces(); $this->query = Yii::app()->request->queryString; } diff --git a/web/application/models/SBOverride.php b/web/application/models/SBOverride.php index d53d5bd..d9ee486 100644 --- a/web/application/models/SBOverride.php +++ b/web/application/models/SBOverride.php @@ -82,7 +82,7 @@ public function attributeLabels() return array( 'type' => Yii::t('sourcebans', 'Type'), 'name' => Yii::t('sourcebans', 'Name'), - 'flags' => Yii::t('sourcebans', 'Flags'), + 'flags' => Yii::t('sourcebans', 'Server permissions'), ); } diff --git a/web/application/models/SBPlugin.php b/web/application/models/SBPlugin.php index 7d56374..2d34bda 100644 --- a/web/application/models/SBPlugin.php +++ b/web/application/models/SBPlugin.php @@ -76,6 +76,7 @@ public function rules() array('class', 'required'), array('status', 'numerical', 'integerOnly'=>true), array('class', 'length', 'max'=>255), + array('class', 'unique'), // The following rule is used by search(). // Please remove those attributes that should not be searched. array('class, status', 'safe', 'on'=>'search'), diff --git a/web/application/models/SBProtest.php b/web/application/models/SBProtest.php index b3c8aec..0c9adc7 100644 --- a/web/application/models/SBProtest.php +++ b/web/application/models/SBProtest.php @@ -62,7 +62,7 @@ public function rules() array('ban_steam, ban_ip', 'default', 'setOnEmpty'=>true), array('ban_steam', 'match', 'pattern'=>SourceBans::STEAM_PATTERN), array('ban_ip', 'match', 'pattern'=>SourceBans::IP_PATTERN), - array('ban_steam, ban_ip', 'SBProtestBanValidator', 'className'=>'SBBan', 'message'=>Yii::t('sourcebans','models.SBProtest.rules.err_not_banned'), 'criteria'=>array( + array('ban_steam, ban_ip', 'application.validators.SBProtestBanValidator', 'className'=>'SBBan', 'message'=>Yii::t('sourcebans','models.SBProtest.rules.err_not_banned'), 'criteria'=>array( 'scopes'=>'active', )), array('ban_id', 'safe'), diff --git a/web/application/models/SBSubmission.php b/web/application/models/SBSubmission.php index e791062..1e74638 100644 --- a/web/application/models/SBSubmission.php +++ b/web/application/models/SBSubmission.php @@ -74,7 +74,7 @@ public function rules() array('steam, ip', 'unique', 'message'=>Yii::t('sourcebans','models.SBSubmission.rules.err_unique'), 'criteria'=>array( 'scopes'=>'active', )), - array('steam, ip', 'SBSubmitBanValidator', 'className'=>'SBBan', 'message'=>Yii::t('sourcebans','models.SBBan.rules.err_unique'), 'criteria'=>array( + array('steam, ip', 'application.validators.SBSubmitBanValidator', 'className'=>'SBBan', 'message'=>Yii::t('sourcebans','models.SBBan.rules.err_unique'), 'criteria'=>array( 'scopes'=>'active', )), array('reason', 'length', 'max'=>255), diff --git a/web/application/components/Helpers.php b/web/application/utils/Helpers.php similarity index 100% rename from web/application/components/Helpers.php rename to web/application/utils/Helpers.php diff --git a/web/application/components/ISMCListener.php b/web/application/utils/ISMCListener.php similarity index 100% rename from web/application/components/ISMCListener.php rename to web/application/utils/ISMCListener.php diff --git a/web/application/components/KeyValues.php b/web/application/utils/KeyValues.php similarity index 95% rename from web/application/components/KeyValues.php rename to web/application/utils/KeyValues.php index 08c4b3f..f093fc8 100644 --- a/web/application/components/KeyValues.php +++ b/web/application/utils/KeyValues.php @@ -2,7 +2,7 @@ /** * Tree-based Valve KeyValues parser * - * @author GameConnect + * @author GameConnect * @copyright (C)2007-2013 GameConnect.net. All rights reserved. * @link http://www.sourcebans.net * @@ -82,8 +82,8 @@ public function load($string) { $string = file_get_contents($string); } - - // Use token_get_all() to easily ignore comments and whitespace + + // Use token_get_all() to easily ignore comments and whitespace $tokens = token_get_all(""); $data = $this->_parse($tokens); // Strip root section @@ -118,8 +118,8 @@ public function serialize() 'name' => $this->_name, )); } - - /** + + /** * Returns an array representation of the data * * @return array The array representation of the data @@ -202,9 +202,9 @@ private function _parse(&$tokens) { $data = array(); $key = null; - - // Use each() so the array cursor is also advanced - // when the function is called recursively + + // Use each() so the array cursor is also advanced + // when the function is called recursively while(list(, $token) = each($tokens)) { // New section diff --git a/web/application/components/LocaleData.php b/web/application/utils/LocaleData.php similarity index 99% rename from web/application/components/LocaleData.php rename to web/application/utils/LocaleData.php index 266ddef..cd52b13 100644 --- a/web/application/components/LocaleData.php +++ b/web/application/utils/LocaleData.php @@ -9,7 +9,7 @@ * @package sourcebans.components * @since 2.0 */ -class LocaleData extends CApplicationComponent +class LocaleData { public static function getCountries() { diff --git a/web/application/components/SMCParser.php b/web/application/utils/SMCParser.php similarity index 100% rename from web/application/components/SMCParser.php rename to web/application/utils/SMCParser.php diff --git a/web/application/components/ServerQuery.php b/web/application/utils/ServerQuery.php similarity index 100% rename from web/application/components/ServerQuery.php rename to web/application/utils/ServerQuery.php diff --git a/web/application/components/ServerRcon.php b/web/application/utils/ServerRcon.php similarity index 100% rename from web/application/components/ServerRcon.php rename to web/application/utils/ServerRcon.php diff --git a/web/application/components/SteamCommunity.php b/web/application/utils/SteamCommunity.php similarity index 99% rename from web/application/components/SteamCommunity.php rename to web/application/utils/SteamCommunity.php index e3bd862..eb7a6e2 100644 --- a/web/application/components/SteamCommunity.php +++ b/web/application/utils/SteamCommunity.php @@ -90,6 +90,8 @@ private static function _request($url, $data = array()) $result = curl_exec($ch); $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE); + curl_close($ch); + if($httpCode == 200) return $result; } diff --git a/web/application/components/SteamGame.php b/web/application/utils/SteamGame.php similarity index 100% rename from web/application/components/SteamGame.php rename to web/application/utils/SteamGame.php diff --git a/web/application/components/SteamGroup.php b/web/application/utils/SteamGroup.php similarity index 100% rename from web/application/components/SteamGroup.php rename to web/application/utils/SteamGroup.php diff --git a/web/application/components/SteamProfile.php b/web/application/utils/SteamProfile.php similarity index 99% rename from web/application/components/SteamProfile.php rename to web/application/utils/SteamProfile.php index d96afb5..b9bc9d6 100644 --- a/web/application/components/SteamProfile.php +++ b/web/application/utils/SteamProfile.php @@ -230,7 +230,7 @@ private function _requestData() { $this->_data['webLinks'][] = (object)array( 'title' => (string)$webLink->title, - 'link' => (string)$w->link, + 'link' => (string)$webLink->link, ); } } diff --git a/web/application/components/SBAdminIdentityValidator.php b/web/application/validators/SBAdminIdentityValidator.php similarity index 100% rename from web/application/components/SBAdminIdentityValidator.php rename to web/application/validators/SBAdminIdentityValidator.php diff --git a/web/application/components/SBBanTypeValidator.php b/web/application/validators/SBBanTypeValidator.php similarity index 100% rename from web/application/components/SBBanTypeValidator.php rename to web/application/validators/SBBanTypeValidator.php diff --git a/web/application/components/SBProtestBanValidator.php b/web/application/validators/SBProtestBanValidator.php similarity index 100% rename from web/application/components/SBProtestBanValidator.php rename to web/application/validators/SBProtestBanValidator.php diff --git a/web/application/components/SBSubmitBanValidator.php b/web/application/validators/SBSubmitBanValidator.php similarity index 100% rename from web/application/components/SBSubmitBanValidator.php rename to web/application/validators/SBSubmitBanValidator.php diff --git a/web/themes/bootstrap/views/admin/settings.php b/web/themes/bootstrap/views/admin/settings.php index 2b1003b..71f7c8b 100644 --- a/web/themes/bootstrap/views/admin/settings.php +++ b/web/themes/bootstrap/views/admin/settings.php @@ -11,20 +11,7 @@
widget('zii.widgets.grid.CGridView', array( 'id'=>'plugins-grid', - 'dataProvider'=>new CArrayDataProvider($plugins, array( - 'keyField'=>'class', - 'sort'=>array( - 'attributes'=>array( - 'author', - 'name', - 'version', - '*', - ), - 'defaultOrder'=>array( - 'name'=>CSort::SORT_ASC, - ), - ), - )), + 'dataProvider'=>$plugins, 'columns'=>array( array( 'header'=>Yii::t('sourcebans', 'Name'), diff --git a/web/themes/bootstrap/views/servers/config.php b/web/themes/bootstrap/views/servers/config.php index c909ed0..7d83ff9 100644 --- a/web/themes/bootstrap/views/servers/config.php +++ b/web/themes/bootstrap/views/servers/config.php @@ -1,8 +1,5 @@ db->connectionString, $dsn); -$db = array_combine($dsn[1], $dsn[2]); ?>