Merge remote-tracking branch 'origin/master' into better-picurl-error-handling

This commit is contained in:
Daenyth 2014-07-02 18:53:59 -04:00
commit 062786fb85
6 changed files with 16 additions and 1 deletions

1
.gitignore vendored
View file

@ -2,3 +2,4 @@ tags
build*
*.qm
.directory
mysql.cnf

View file

@ -241,7 +241,7 @@ void MainWindow::loginError(Response::ResponseCode r, QString reasonStr, quint32
{
switch (r) {
case Response::RespWrongPassword:
QMessageBox::critical(this, tr("Error"), tr("Invalid login data."));
QMessageBox::critical(this, tr("Error"), tr("Incorrect username or password. Please check your authentication information and try again."));
break;
case Response::RespWouldOverwriteOldSession:
QMessageBox::critical(this, tr("Error"), tr("There is already an active session using this user name.\nPlease close that session first and re-login."));

View file

@ -197,6 +197,11 @@ int OracleImporter::importTextSpoiler(CardSet *set, const QVariant &data)
cardText = map.contains("text") ? map.value("text").toString() : QString("");
cardId = map.contains("multiverseid") ? map.value("multiverseid").toInt() : 0;
cardLoyalty = map.contains("loyalty") ? map.value("loyalty").toInt() : 0;
// Distinguish Vanguard cards from regular cards of the same name.
if (map.value("layout") == "vanguard") {
cardName += " Avatar";
}
}
CardInfo *card = addCard(set->getShortName(), cardName, false, cardId, cardCost, cardType, cardPT, cardLoyalty, cardText.split("\n"));

View file

@ -0,0 +1,3 @@
#!/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)
mysql --defaults-file=./mysql.cnf -h localhost -e 'truncate table servatrice.cockatrice_replays;truncate table servatrice.cockatrice_replays_access'

View file

@ -0,0 +1,3 @@
#!/bin/bash
# SCHEDULE WITH CRONTAB TO RUN ONCE A MONTH
mysql --defaults-file=./mysql.cnf -h localhost -e "delete from servatrice.cockatrice_sessions where start_time < DATE_SUB(now(), INTERVAL 1 MONTH)"

View file

@ -0,0 +1,3 @@
[client]
user={db_username}
password={db_password}