1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-02 20:57:26 +02:00

Plugin upgrade fix and install stats added.

This commit is contained in:
Cameron
2015-04-24 20:19:18 -07:00
parent aded604827
commit 1e12220959
2 changed files with 21 additions and 1 deletions

View File

@@ -1671,7 +1671,7 @@ class e107plugin
$sql = e107::getDb(); $sql = e107::getDb();
// Add or Remove Table -------------- // Add or Remove Table --------------
if($function == 'install' || $function = 'uninstall') if($function == 'install' || $function == 'uninstall')
{ {
$contents = file_get_contents($sqlFile); $contents = file_get_contents($sqlFile);

View File

@@ -486,6 +486,9 @@ class e_install
\n"; \n";
$e_forms->add_plain_html($output); $e_forms->add_plain_html($output);
$this->finish_form(); $this->finish_form();
$this->add_button("submit", LANINS_035); $this->add_button("submit", LANINS_035);
$this->template->SetTag("stage_content", $page_info.$e_forms->return_form()); $this->template->SetTag("stage_content", $page_info.$e_forms->return_form());
@@ -1211,6 +1214,8 @@ class e_install
$this->finish_form(); $this->finish_form();
$this->add_button("submit", LANINS_035); $this->add_button("submit", LANINS_035);
$this->template->SetTag("stage_content", $page.$e_forms->return_form()); $this->template->SetTag("stage_content", $page.$e_forms->return_form());
$this->logLine('Stage 7 completed'); $this->logLine('Stage 7 completed');
@@ -1273,12 +1278,27 @@ class e_install
} }
$this->finish_form(); $this->finish_form();
$this->stats();
$this->template->SetTag("stage_content", "<div class='alert alert-block alert-{$alertType}'>".$page."</div>".$e_forms->return_form()); $this->template->SetTag("stage_content", "<div class='alert alert-block alert-{$alertType}'>".$page."</div>".$e_forms->return_form());
$this->logLine('Stage 8 completed'); $this->logLine('Stage 8 completed');
e107::getMessage()->reset(false, false, true); e107::getMessage()->reset(false, false, true);
} }
protected function stats()
{
global $e_forms;
$data = array('name'=>$this->previous_steps['prefs']['sitename'], 'theme'=>$this->previous_steps['prefs']['sitetheme'], 'language'=>$this->previous_steps['language'], 'url'=>$_SERVER['HTTP_REFERER']);;
$base = base64_encode(http_build_query($data, null, '&'));
$url = "http://e107.org/e-install/".$base;
$e_forms->add_plain_html("<img src='".$url."' style='width:1px; height:1px' />");
}
/** /**
* htaccess - handle the .htaccess file * htaccess - handle the .htaccess file
* *