mirror of
https://github.com/wavelog/wavelog.git
synced 2026-03-22 10:24:14 +00:00
Revert "Merge pull request #369 from g7vjr/master"
This reverts commit1beb0613d6, reversing changes made to51419ad9e0.
This commit is contained in:
@@ -148,40 +148,6 @@ class Update extends CI_Controller {
|
||||
return $count;
|
||||
}
|
||||
|
||||
public function update_clublog_scp() {
|
||||
|
||||
$strFile = "./updates/clublog_scp.txt";
|
||||
$url = "https://cdn.clublog.org/clublog.scp.gz";
|
||||
set_time_limit(300);
|
||||
|
||||
$this->update_status("Downloading Club Log SCP file");
|
||||
$gz = gzopen($url, 'r');
|
||||
if ($gz)
|
||||
{
|
||||
$data = "";
|
||||
while (!gzeof($gz)) {
|
||||
$data .= gzgetc($gz);
|
||||
}
|
||||
gzclose($gz);
|
||||
file_put_contents($strFile, $data);
|
||||
|
||||
if (file_exists($strFile))
|
||||
{
|
||||
$nCount = count(file($strFile));
|
||||
if ($nCount > 0)
|
||||
{
|
||||
$this->update_status("DONE: " . number_format($nCount) . " callsigns loaded" );
|
||||
} else {
|
||||
$this->update_status("FAILED: Empty file");
|
||||
}
|
||||
} else {
|
||||
$this->update_status("FAILED: Could not create Club Log SCP file locally");
|
||||
}
|
||||
} else {
|
||||
$this->update_status("FAILED: Could not connect to Club Log");
|
||||
}
|
||||
}
|
||||
|
||||
// Updates the DXCC & Exceptions from the Club Log Cty.xml file.
|
||||
public function dxcc() {
|
||||
$this->update_status("Downloading file");
|
||||
@@ -206,7 +172,7 @@ class Update extends CI_Controller {
|
||||
|
||||
file_put_contents('./updates/cty.xml', $data);
|
||||
|
||||
// Clear the tables, ready for new data
|
||||
// Clear the tables, ready for new data
|
||||
$this->db->empty_table("dxcc_entities");
|
||||
$this->db->empty_table("dxcc_exceptions");
|
||||
$this->db->empty_table("dxcc_prefixes");
|
||||
@@ -240,6 +206,7 @@ class Update extends CI_Controller {
|
||||
file_put_contents('./updates/status.html', $html);
|
||||
}
|
||||
|
||||
|
||||
private function fix_migrations(){
|
||||
$res = $this->db->query("select version from migrations");
|
||||
if ($res->num_rows() >0){
|
||||
|
||||
Reference in New Issue
Block a user