Ticket #5316: mythtv-5316-disable_automatic_backups_setting.patch
File mythtv-5316-disable_automatic_backups_setting.patch, 1.7 KB (added by , 16 years ago) |
---|
-
programs/mythtv-setup/backendsettings.cpp
165 165 return bs; 166 166 } 167 167 168 static GlobalCheckBox *DisableAutomaticBackup() 169 { 170 GlobalCheckBox *gc = new GlobalCheckBox("DisableAutomaticBackup"); 171 gc->setLabel(QObject::tr("Disable Automatic Database Backup")); 172 gc->setValue(false); 173 gc->setHelpText(QObject::tr("This will prevent Myth from backing up the " 174 "database before upgrades. If disabled, " 175 "you should have your own backup strategy " 176 "in place.")); 177 return gc; 178 }; 179 168 180 static HostCheckBox *DisableFirewireReset() 169 181 { 170 182 HostCheckBox *hc = new HostCheckBox("DisableFirewireReset"); … … 721 733 fm->addChild(HDRingbufferSize()); 722 734 group2->addChild(fm); 723 735 group2->addChild(MiscStatusScript()); 736 group2->addChild(DisableAutomaticBackup()); 724 737 group2->addChild(DisableFirewireReset()); 725 738 addChild(group2); 726 739 -
libs/libmyth/dbutil.cpp
162 162 */ 163 163 bool DBUtil::BackupDB(QString &filename) 164 164 { 165 filename = ""; 166 if (gContext->GetNumSetting("DisableAutomaticBackup", 0)) 167 { 168 VERBOSE(VB_IMPORTANT, "Database backups disabled. Skipping backup."); 169 return true; 170 } 171 165 172 bool result = false; 166 173 MSqlQuery query(MSqlQuery::InitCon()); 167 174