diff --git a/CONTRIBUTING.md b/.github/CONTRIBUTING.md similarity index 100% rename from CONTRIBUTING.md rename to .github/CONTRIBUTING.md diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md new file mode 100644 index 00000000..394aae05 --- /dev/null +++ b/.github/ISSUE_TEMPLATE.md @@ -0,0 +1,11 @@ +OS: +*Override this line with the exact operating system you are running! (e.g. "Win 7 SP1", "OS X 10.8.5", "Ubuntu 15.10" ...)* + +Cockatrice version: +*Put your Cockatrice version number & build date here! You find them inside the app: `Help` --> `About Cockatrice` (e.g. "2d53ce9 (2016-02-18)")* + +___ +
+ + +*Explain your Issue/Request/Suggestion in detail here!* diff --git a/CMakeLists.txt b/CMakeLists.txt index 1bbb7b84..bcd4416a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -74,6 +74,8 @@ endif() # Define proper compilation flags IF(MSVC) # Visual Studio: + # Support from Windows XP + SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SUBSYSTEM:WINDOWS,5.01") # Maximum optimization set(CMAKE_CXX_FLAGS_RELEASE "/Ox /MD") # Generate complete debugging information diff --git a/TODO.md b/TODO.md index c7530e17..1efc5a12 100644 --- a/TODO.md +++ b/TODO.md @@ -10,13 +10,6 @@ Note that "improve" and "write" always also means: "document and comment" ##Scripts * Write example init script for servatrice. -##Improve usermanual: -* Improve Layout, Text, Screenshots; nearly everything is still quick n dirty copy and paste. -* Add missing TODOs -* Translate the Documentation -* Rename the picture filenames to something more meaningful. -* Create an index, lists of tables/figures/... - ##Create developer documentation: * Create developer manual * Add comments to code diff --git a/cockatrice/src/dlg_creategame.cpp b/cockatrice/src/dlg_creategame.cpp index 611a9fef..1db2cdd6 100644 --- a/cockatrice/src/dlg_creategame.cpp +++ b/cockatrice/src/dlg_creategame.cpp @@ -116,9 +116,9 @@ DlgCreateGame::DlgCreateGame(TabRoom *_room, const QMap &_gameType rememberGameSettings->setChecked(settingsCache->getRememberGameSettings()); descriptionEdit->setText(settingsCache->getGameDescription()); maxPlayersEdit->setValue(settingsCache->getMaxPlayers()); - onlyBuddiesCheckBox->setChecked(settingsCache->getOnlyBuddies()); if (room && room->getUserInfo()->user_level() & ServerInfo_User::IsRegistered) { + onlyBuddiesCheckBox->setChecked(settingsCache->getOnlyBuddies()); onlyRegisteredCheckBox->setChecked(settingsCache->getOnlyRegistered()); } else { onlyBuddiesCheckBox->setEnabled(false); @@ -193,7 +193,7 @@ void DlgCreateGame::actReset() passwordEdit->setText(""); onlyBuddiesCheckBox->setChecked(false); - onlyRegisteredCheckBox->setChecked(true); + onlyRegisteredCheckBox->setChecked(room && room->getUserInfo()->user_level() & ServerInfo_User::IsRegistered); spectatorsAllowedCheckBox->setChecked(true); spectatorsNeedPasswordCheckBox->setChecked(false); diff --git a/cockatrice/src/sequenceEdit/ui_shortcutstab.h b/cockatrice/src/sequenceEdit/ui_shortcutstab.h index d642a9fc..ec0c10d6 100644 --- a/cockatrice/src/sequenceEdit/ui_shortcutstab.h +++ b/cockatrice/src/sequenceEdit/ui_shortcutstab.h @@ -1473,10 +1473,10 @@ public: groupBox_2->setTitle(QApplication::translate("shortcutsTab", "Deck Editor", 0)); lbl_TabDeckEditor_aAnalyzeDeck->setText(QApplication::translate("shortcutsTab", "Analyze deck", 0)); lbl_TabDeckEditor_aLoadDeckFromClipboard->setText(QApplication::translate("shortcutsTab", "Load deck (clipboard)", 0)); - lbl_TabDeckEditor_aClearFilterAll->setText(QApplication::translate("shortcutsTab", "Clerar all filters", 0)); + lbl_TabDeckEditor_aClearFilterAll->setText(QApplication::translate("shortcutsTab", "Clear all filters", 0)); lbl_TabDeckEditor_aNewDeck->setText(QApplication::translate("shortcutsTab", "New deck", 0)); - lbl_TabDeckEditor_aClearFilterOne->setText(QApplication::translate("shortcutsTab", "Clear one filter", 0)); - lbl_TabDeckEditor_aOpenCustomFolder->setText(QApplication::translate("shortcutsTab", "Open custom folder", 0)); + lbl_TabDeckEditor_aClearFilterOne->setText(QApplication::translate("shortcutsTab", "Clear selected filter", 0)); + lbl_TabDeckEditor_aOpenCustomFolder->setText(QApplication::translate("shortcutsTab", "Open custom pic folder", 0)); lbl_TabDeckEditor_aClose->setText(QApplication::translate("shortcutsTab", "Close", 0)); lbl_TabDeckEditor_aPrintDeck->setText(QApplication::translate("shortcutsTab", "Print deck", 0)); lbl_TabDeckEditor_aEditSets->setText(QApplication::translate("shortcutsTab", "Edit sets", 0)); diff --git a/cockatrice/src/settings/layoutssettings.cpp b/cockatrice/src/settings/layoutssettings.cpp index a7d2c749..de301b7b 100644 --- a/cockatrice/src/settings/layoutssettings.cpp +++ b/cockatrice/src/settings/layoutssettings.cpp @@ -78,6 +78,39 @@ const QByteArray LayoutsSettings::getGamePlayAreaGeometry() return getValue("layouts/gameplayarea_geometry").toByteArray(); } +const QSize LayoutsSettings::getGameCardInfoSize() +{ + QVariant previous = getValue("layouts/gameplayarea_CardInfoSize"); + return previous == QVariant() ? QSize(250,360) : previous.toSize(); +} + +void LayoutsSettings::setGameCardInfoSize(const QSize &value) +{ + setValue(value,"layouts/gameplayarea_CardInfoSize"); +} + +const QSize LayoutsSettings::getGameMessageLayoutSize() +{ + QVariant previous = getValue("layouts/gameplayarea_MessageLayoutSize"); + return previous == QVariant() ? QSize(250,250) : previous.toSize(); +} + +void LayoutsSettings::setGameMessageLayoutSize(const QSize &value) +{ + setValue(value,"layouts/gameplayarea_MessageLayoutSize"); +} + +const QSize LayoutsSettings::getGamePlayerListSize() +{ + QVariant previous = getValue("layouts/gameplayarea_PlayerListSize"); + return previous == QVariant() ? QSize(250,50) : previous.toSize(); +} + +void LayoutsSettings::setGamePlayerListSize(const QSize &value) +{ + setValue(value,"layouts/gameplayarea_PlayerListSize"); +} + void LayoutsSettings::setReplayPlayAreaGeometry(const QByteArray &value) { setValue(value,"layouts/replayplayarea_geometry"); @@ -97,3 +130,47 @@ const QByteArray LayoutsSettings::getReplayPlayAreaGeometry() { return getValue("layouts/replayplayarea_geometry").toByteArray(); } + +const QSize LayoutsSettings::getReplayCardInfoSize() +{ + QVariant previous = getValue("layouts/replayplayarea_CardInfoSize"); + return previous == QVariant() ? QSize(250,360) : previous.toSize(); +} + +void LayoutsSettings::setReplayCardInfoSize(const QSize &value) +{ + setValue(value,"layouts/replayplayarea_CardInfoSize"); +} + +const QSize LayoutsSettings::getReplayMessageLayoutSize() +{ + QVariant previous = getValue("layouts/replayplayarea_MessageLayoutSize"); + return previous == QVariant() ? QSize(250,200) : previous.toSize(); +} + +void LayoutsSettings::setReplayMessageLayoutSize(const QSize &value) +{ + setValue(value,"layouts/replayplayarea_MessageLayoutSize"); +} + +const QSize LayoutsSettings::getReplayPlayerListSize() +{ + QVariant previous = getValue("layouts/replayplayarea_PlayerListSize"); + return previous == QVariant() ? QSize(250,50) : previous.toSize(); +} + +void LayoutsSettings::setReplayPlayerListSize(const QSize &value) +{ + setValue(value,"layouts/replayplayarea_PlayerListSize"); +} + +const QSize LayoutsSettings::getReplayReplaySize() +{ + QVariant previous = getValue("layouts/replayplayarea_ReplaySize"); + return previous == QVariant() ? QSize(900,100) : previous.toSize(); +} + +void LayoutsSettings::setReplayReplaySize(const QSize &value) +{ + setValue(value,"layouts/replayplayarea_ReplaySize"); +} \ No newline at end of file diff --git a/cockatrice/src/settings/layoutssettings.h b/cockatrice/src/settings/layoutssettings.h index b6282c90..d67ec1aa 100644 --- a/cockatrice/src/settings/layoutssettings.h +++ b/cockatrice/src/settings/layoutssettings.h @@ -15,20 +15,38 @@ public: void setDeckEditorCardSize(const QSize &value); void setDeckEditorDeckSize(const QSize &value); void setDeckEditorFilterSize(const QSize &value); + void setGamePlayAreaGeometry(const QByteArray &value); void setGamePlayAreaState(const QByteArray &value); + void setGameCardInfoSize(const QSize &value); + void setGameMessageLayoutSize(const QSize &value); + void setGamePlayerListSize(const QSize &value); + void setReplayPlayAreaGeometry(const QByteArray &value); void setReplayPlayAreaState(const QByteArray &value); + void setReplayCardInfoSize(const QSize &value); + void setReplayMessageLayoutSize(const QSize &value); + void setReplayPlayerListSize(const QSize &value); + void setReplayReplaySize(const QSize &value); const QByteArray getDeckEditorLayoutState(); const QByteArray getDeckEditorGeometry(); const QSize getDeckEditorCardSize(); const QSize getDeckEditorDeckSize(); const QSize getDeckEditorFilterSize(); + const QByteArray getGamePlayAreaLayoutState(); const QByteArray getGamePlayAreaGeometry(); + const QSize getGameCardInfoSize(); + const QSize getGameMessageLayoutSize(); + const QSize getGamePlayerListSize(); + const QByteArray getReplayPlayAreaLayoutState(); const QByteArray getReplayPlayAreaGeometry(); + const QSize getReplayCardInfoSize(); + const QSize getReplayMessageLayoutSize(); + const QSize getReplayPlayerListSize(); + const QSize getReplayReplaySize(); signals: public slots: diff --git a/cockatrice/src/tab_game.cpp b/cockatrice/src/tab_game.cpp index 0f8d8050..075f9880 100644 --- a/cockatrice/src/tab_game.cpp +++ b/cockatrice/src/tab_game.cpp @@ -362,6 +362,7 @@ TabGame::TabGame(TabSupervisor *_tabSupervisor, GameReplay *_replay) refreshShortcuts(); messageLog->logReplayStarted(gameInfo.game_id()); + this->installEventFilter(this); QTimer::singleShot(0, this, SLOT(loadLayout())); } @@ -410,6 +411,7 @@ TabGame::TabGame(TabSupervisor *_tabSupervisor, QList &_client for (int i = gameInfo.game_types_size() - 1; i >= 0; i--) gameTypes.append(roomGameTypes.find(gameInfo.game_types(i)).value()); + this->installEventFilter(this); QTimer::singleShot(0, this, SLOT(loadLayout())); } @@ -426,14 +428,7 @@ void TabGame::emitUserEvent() { TabGame::~TabGame() { if(replay) - { - settingsCache->layouts().setReplayPlayAreaState(saveState()); - settingsCache->layouts().setReplayPlayAreaGeometry(saveGeometry()); delete replay; - } else { - settingsCache->layouts().setGamePlayAreaState(saveState()); - settingsCache->layouts().setGamePlayAreaGeometry(saveGeometry()); - } QMapIterator i(players); while (i.hasNext()) @@ -445,13 +440,13 @@ TabGame::~TabGame() void TabGame::retranslateUi() { - QString tabText = getTabText() + " - "; + QString tabText = " | " + (replay ? tr("Replay") : tr("Game")) + " #" + QString::number(gameInfo.game_id()); - cardInfoDock->setWindowTitle((cardInfoDock->isWindow() ? tabText : QString()) + tr("Card Info")); - playerListDock->setWindowTitle((playerListDock->isWindow() ? tabText : QString()) + tr("Player List")); - messageLayoutDock->setWindowTitle((messageLayoutDock->isWindow() ? tabText : QString()) + tr("Messages")); + cardInfoDock->setWindowTitle(tr("Card Info") + (cardInfoDock->isWindow() ? tabText : QString())); + playerListDock->setWindowTitle(tr("Player List") + (playerListDock->isWindow() ? tabText : QString())); + messageLayoutDock->setWindowTitle(tr("Messages") + (messageLayoutDock->isWindow() ? tabText : QString())); if(replayDock) - replayDock->setWindowTitle((replayDock->isWindow() ? tabText : QString()) + tr("Replay Timeline")); + replayDock->setWindowTitle(tr("Replay Timeline") + (replayDock->isWindow() ? tabText : QString())); if (phasesMenu) { for (int i = 0; i < phaseActions.size(); ++i) @@ -1170,7 +1165,7 @@ QString TabGame::getTabText() const QString tabText; if (replay) - tabText.append(tr("REPLAY ")); + tabText.append(tr("Replay") + " "); if (!gameTypeInfo.isEmpty()) tabText.append(gameTypeInfo + " "); if (!gameDesc.isEmpty()) { @@ -1335,9 +1330,25 @@ void TabGame::loadLayout() { restoreGeometry(settingsCache->layouts().getReplayPlayAreaGeometry()); restoreState(settingsCache->layouts().getReplayPlayAreaLayoutState()); + + cardInfoDock->setMinimumSize(settingsCache->layouts().getReplayCardInfoSize()); + cardInfoDock->setMaximumSize(settingsCache->layouts().getReplayCardInfoSize()); + messageLayoutDock->setMinimumSize(settingsCache->layouts().getReplayMessageLayoutSize()); + messageLayoutDock->setMaximumSize(settingsCache->layouts().getReplayMessageLayoutSize()); + playerListDock->setMinimumSize(settingsCache->layouts().getReplayPlayerListSize()); + playerListDock->setMaximumSize(settingsCache->layouts().getReplayPlayerListSize()); + replayDock->setMinimumSize(settingsCache->layouts().getReplayReplaySize()); + replayDock->setMaximumSize(settingsCache->layouts().getReplayReplaySize()); } else { restoreGeometry(settingsCache->layouts().getGamePlayAreaGeometry()); restoreState(settingsCache->layouts().getGamePlayAreaLayoutState()); + + cardInfoDock->setMinimumSize(settingsCache->layouts().getGameCardInfoSize()); + cardInfoDock->setMaximumSize(settingsCache->layouts().getGameCardInfoSize()); + messageLayoutDock->setMinimumSize(settingsCache->layouts().getGameMessageLayoutSize()); + messageLayoutDock->setMaximumSize(settingsCache->layouts().getGameMessageLayoutSize()); + playerListDock->setMinimumSize(settingsCache->layouts().getGamePlayerListSize()); + playerListDock->setMaximumSize(settingsCache->layouts().getGamePlayerListSize()); } aCardInfoDockVisible->setChecked(cardInfoDock->isVisible()); @@ -1358,6 +1369,26 @@ void TabGame::loadLayout() aReplayDockFloating->setEnabled(aReplayDockVisible->isChecked()); aReplayDockFloating->setChecked(replayDock->isFloating()); } + + QTimer::singleShot(100, this, SLOT(freeDocksSize())); +} + +void TabGame::freeDocksSize() +{ + cardInfoDock->setMinimumSize(100, 100); + cardInfoDock->setMaximumSize(5000, 5000); + + messageLayoutDock->setMinimumSize(100, 100); + messageLayoutDock->setMaximumSize(5000, 5000); + + playerListDock->setMinimumSize(100,100); + playerListDock->setMaximumSize(5000,5000); + + if(replayDock) + { + replayDock->setMinimumSize(100,100); + replayDock->setMaximumSize(5000,5000); + } } void TabGame::actResetLayout() @@ -1389,7 +1420,25 @@ void TabGame::actResetLayout() addDockWidget(Qt::BottomDockWidgetArea, replayDock); aReplayDockVisible->setChecked(true); aReplayDockFloating->setChecked(false); + + cardInfoDock->setMinimumSize(250,360); + cardInfoDock->setMaximumSize(250,360); + messageLayoutDock->setMinimumSize(250,200); + messageLayoutDock->setMaximumSize(250,200); + playerListDock->setMinimumSize(250,50); + playerListDock->setMaximumSize(250,50); + replayDock->setMinimumSize(900,100); + replayDock->setMaximumSize(900,100); + } else { + cardInfoDock->setMinimumSize(250,360); + cardInfoDock->setMaximumSize(250,360); + messageLayoutDock->setMinimumSize(250,250); + messageLayoutDock->setMaximumSize(250,250); + playerListDock->setMinimumSize(250,50); + playerListDock->setMaximumSize(250,50); } + + QTimer::singleShot(100, this, SLOT(freeDocksSize())); } void TabGame::createPlayAreaWidget(bool bReplay) @@ -1595,6 +1644,23 @@ bool TabGame::eventFilter(QObject * o, QEvent * e) } } + if( o == this && e->type() == QEvent::Hide){ + if(replay) + { + settingsCache->layouts().setReplayPlayAreaState(saveState()); + settingsCache->layouts().setReplayPlayAreaGeometry(saveGeometry()); + settingsCache->layouts().setReplayCardInfoSize(cardInfoDock->size()); + settingsCache->layouts().setReplayMessageLayoutSize(messageLayoutDock->size()); + settingsCache->layouts().setReplayPlayerListSize(playerListDock->size()); + settingsCache->layouts().setReplayReplaySize(replayDock->size()); + } else { + settingsCache->layouts().setGamePlayAreaState(saveState()); + settingsCache->layouts().setGamePlayAreaGeometry(saveGeometry()); + settingsCache->layouts().setGameCardInfoSize(cardInfoDock->size()); + settingsCache->layouts().setGameMessageLayoutSize(messageLayoutDock->size()); + settingsCache->layouts().setGamePlayerListSize(playerListDock->size()); + } + } return false; } diff --git a/cockatrice/src/tab_game.h b/cockatrice/src/tab_game.h index bed00b04..52644583 100644 --- a/cockatrice/src/tab_game.h +++ b/cockatrice/src/tab_game.h @@ -223,6 +223,7 @@ private slots: void loadLayout(); void actCompleterChanged(); void actResetLayout(); + void freeDocksSize(); bool eventFilter(QObject *o, QEvent *e); void dockVisibleTriggered(); diff --git a/cockatrice/translations/cockatrice_de.ts b/cockatrice/translations/cockatrice_de.ts index 36a30b4d..f0428f85 100644 --- a/cockatrice/translations/cockatrice_de.ts +++ b/cockatrice/translations/cockatrice_de.ts @@ -1501,34 +1501,34 @@ Möchten Sie Ihren Speicherort der Datenbank aktualisieren? Error - + Fehler Cockatrice was not built with SSL support, so cannot download updates! Please visit the download page and update manually. - + Ihre Version von Cockatrice hat keine SSL-Unterstützung, dadurch ist das Herunterladen von Aktualisierungen nicht möglich! Bitte besuchen Sie die Downloadseite und aktualisieren Sie manuell. Your version of Cockatrice is out of date, but there are no packages available for your operating system. You may have to use a developer build or build from source yourself. Please visit the download page. - + Ihre Cockatrice Version ist nicht mehr aktuell, jedoch sind keine Installationspakete für Ihr Betriebssystem erhältlich. Sie müssen eventuell einen Entwicklungsbuild verwenden, oder den Quellcode für einen eigenen Build verwenden. Bitte besuchen Sie die Downloadseite. Cockatrice Update - + Cockatrice Aktualisierung Your version of Cockatrice is up to date. - + Ihre Version von Cockatrice ist aktuell. Update Error - + Aktualisierungsfehler @@ -1795,18 +1795,18 @@ Möchten Sie Ihren Speicherort der Datenbank aktualisieren? Primary download URL: - + Primäre URL zum Herunterladen: Fallback download URL: - + Ersatz-URL zum Herunterladen: Reset - + Zurücksetzen @@ -1995,7 +1995,7 @@ Login läuft. Cockatrice Webpage - + Cockatrice Webseite @@ -2334,7 +2334,7 @@ Lokale Version ist %1, Serverversion ist %2. &Update Cockatrice - + Cockatrice akt&ualisieren @@ -2702,24 +2702,24 @@ Sie müssen den Aktivierungstoken aus der Aktivierungsemail verwenden Heads (1) - + Kopf (1) Tails (2) - + Zahl (2) %1 flipped a coin. It landed as %2. female - + %1 warf eine Münze. Es fiel %2. %1 flipped a coin. It landed as %2. male - + %1 warf eine Münze. Es fiel %2. @@ -4727,21 +4727,21 @@ Lesen Sie mehr über das Ändern der Editionsreihenfolge oder die Deaktivierung &View - + Ansicht Visible - + Sichtbar Floating - + Schwebend @@ -4887,25 +4887,25 @@ Bitte geben Sie einen Namen ein: Card Info - + Karteninformationen Player List - + Spielerliste Messages - + Nachrichten Replay Timeline - + Zeitleiste der Aufzeichnung @@ -4970,7 +4970,7 @@ Bitte geben Sie einen Namen ein: &View - + Ansicht @@ -4978,7 +4978,7 @@ Bitte geben Sie einen Namen ein: Visible - + Sichtbar @@ -4986,12 +4986,12 @@ Bitte geben Sie einen Namen ein: Floating - + Schwebend Reset layout - + Darstellung zurücksetzen diff --git a/cockatrice/translations/cockatrice_pl.ts b/cockatrice/translations/cockatrice_pl.ts index a96eb26b..d525ed52 100644 --- a/cockatrice/translations/cockatrice_pl.ts +++ b/cockatrice/translations/cockatrice_pl.ts @@ -22,12 +22,12 @@ Theme settings - + Ustawienia motywu użytkownika Current theme: - + Bieżący motyw: @@ -257,7 +257,7 @@ Informacja ta zachowywana jest dla moderatorów i nie jest widoczna dla zbanowan Color(s): - + Kolor(y): @@ -305,7 +305,7 @@ Informacja ta zachowywana jest dla moderatorów i nie jest widoczna dla zbanowan Color(s): - + Kolor(y): @@ -710,12 +710,12 @@ Informacja ta zachowywana jest dla moderatorów i nie jest widoczna dla zbanowan Previous Host - + Poprzedni Host New Host - + Nowy Host @@ -725,7 +725,7 @@ Informacja ta zachowywana jest dla moderatorów i nie jest widoczna dla zbanowan Enter host name - + Wprowadź nazwę Hosta @@ -765,7 +765,7 @@ Informacja ta zachowywana jest dla moderatorów i nie jest widoczna dla zbanowan The player name can't be empty. - + Nazwa użytkownika nie może być pusta @@ -971,17 +971,17 @@ To remove your current avatar, confirm without choosing a new image. Browse... - + Przeglądaj... Change avatar - + Zmień awatar Open Image - + Otwórz plik obrazu @@ -999,27 +999,27 @@ To remove your current avatar, confirm without choosing a new image. Old password: - + Bieżące hasło: New password: - + Nowe hasło: Confirm new password: - + Potwierdź nowe hasło: Change password - + Zmień hasło Error - + Błąd @@ -1277,7 +1277,7 @@ Upewnij się, że 'Dodatek zawierający tokeny' jest włączony w okni Password (again): - + Hasło (ponownie): @@ -1287,7 +1287,7 @@ Upewnij się, że 'Dodatek zawierający tokeny' jest włączony w okni Email (again): - + Email (ponownie): @@ -1334,7 +1334,7 @@ Upewnij się, że 'Dodatek zawierający tokeny' jest włączony w okni The player name can't be empty. - + Nazwa użytkownika nie może być pusta @@ -1484,7 +1484,7 @@ Would you like to change your database location setting? Shortcuts - + Skróty @@ -1492,7 +1492,7 @@ Would you like to change your database location setting? Error - + Błąd @@ -5027,7 +5027,7 @@ Wprowadź nazwę: Error - + Błąd @@ -5333,7 +5333,7 @@ The more information you put in, the more specific your results will be. Error - + Błąd @@ -5602,12 +5602,12 @@ Please refrain from engaging in this activity or further actions may be taken ag Change password - + Zmień hasło Change avatar - + Zmień awatar @@ -5677,7 +5677,7 @@ Please refrain from engaging in this activity or further actions may be taken ag Error - + Błąd @@ -5818,7 +5818,7 @@ Please refrain from engaging in this activity or further actions may be taken ag Error - + Błąd diff --git a/oracle/translations/oracle_pl.ts b/oracle/translations/oracle_pl.ts index 3c60bac9..f7745b72 100644 --- a/oracle/translations/oracle_pl.ts +++ b/oracle/translations/oracle_pl.ts @@ -122,7 +122,7 @@ You will need to specify a URL or a filename that will be used as a source. Error - + Błąd Downloading (0MB) @@ -257,7 +257,7 @@ You will need to specify a URL or a filename that will be used as a source. Error - + Błąd The file could not be saved to %1 diff --git a/servatrice/scripts/linux/maint_replays b/servatrice/scripts/linux/maint_replays index bee3d0b0..c0f7fb43 100644 --- a/servatrice/scripts/linux/maint_replays +++ b/servatrice/scripts/linux/maint_replays @@ -1,8 +1,9 @@ #!/bin/bash -# SCHEDULE WITH CRONTAB BASED ON TIME PERIOD REPLAYS SHOULD BE SAVED UNTIL (EX: SCHEDULE ONCE A WEEK TO KEEP A WEEKS WORTH OF REPLAYS IN THE DB) - +# SCHEDULE WITH CRONTAB DAILY DBNAME="servatrice" #set this to the database name used TABLEPREFIX="cockatrice" #set this to the prefix used for the table names in the database (do not inclue the _) SQLCONFFILE="./mysql.cnf" #set this to the path that contains the mysql.cnf file -mysql --defaults-file=$SQLCONFFILE -h localhost -e 'truncate table ""$DBNAME"".""$TABLEPREFIX""_replays;truncate table ""$DBNAME"".""$TABLEPREFIX""_replays_access' +mysql --defaults-file=$SQLCONFFILE -h localhost -e 'delete from servatrice.cockatrice_games where time_finished < DATE_SUB(now(), INTERVAL 8 DAY)' +mysql --defaults-file=$SQLCONFFILE -h localhost -e 'delete from servatrice.cockatrice_replays where id_game NOT IN (select id from servatrice.cockatrice_games)' +mysql --defaults-file=$SQLCONFFILE -h localhost -e 'delete from servatrice.cockatrice_replays_access where id_game NOT IN (select id from servatrice.cockatrice_games)'