Esempio n. 1
0
		public function uninstall() {
			Symphony::Configuration()->remove('cdi');
			Symphony::Configuration()->write();
			
			CdiMaster::uninstall();
			CdiSlave::uninstall();
			CdiDBSync::uninstall();
			CdiDumpDB::uninstall();
			return true;
		}
Esempio n. 2
0
			} else if(CdiUtil::isCdiDBSync()) {
				CdiDBSync::uninstall();
				CdiDBSync::install();
			}
			$result["status"] = 'success';
		} catch(Exception $e) {
			$result["status"] = "error";
			$result["message"] = $e->getMessage();
			Symphony::Log()->pushToLog('[CDI] ' . $e->getMessage(), E_ERROR, true);
		}
	}

	// Clean the database backup list when cdi_clear_restore action is called
	else if(isset($_POST["action"]["cdi_clear_restore"])) {
		try {
			CdiDumpDB::uninstall();
			CdiDumpDB::install();
			$result["status"] = 'success';
		} catch(Exception $e) {
			$result["status"] = "error";
			$result["message"] = $e->getMessage();
			Symphony::Log()->pushToLog('[CDI] ' . $e->getMessage(), E_ERROR, true);
		}
	}
	
	// CDI Export
	else if(isset($_POST["action"]["cdi_export"])) {
		try {
			if(isset($_POST['ref']) && $_POST['ref'] == "overwrite"){
				Symphony::Configuration()->set('manual-backup-overwrite', 'yes', 'cdi');
			} else {