Add support for new versions
diff --git a/downloads/4.0.php b/downloads/4.0.php
index b4d62fe..ffb60bf 100644
--- a/downloads/4.0.php
+++ b/downloads/4.0.php
@@ -5,6 +5,8 @@
$App = new App();
$Nav = new Nav();
$Menu = new Menu();
-$keywords = 'eclipse, statet, downloads, statet 4.0';
+
+$statetVersion= "4.0";
+$keywords= 'eclipse, statet, downloads, statet ${statetVersion}';
require("_download-statet.php");
diff --git a/downloads/_download-statet.php b/downloads/_download-statet.php
index ad52a6f..f76101e 100644
--- a/downloads/_download-statet.php
+++ b/downloads/_download-statet.php
@@ -19,8 +19,6 @@
}
}
-$statetVersion = basename($App->getScriptName(), '.php');
-
if(!isset($keywords) OR $keywords == '') {
$keywords = "eclipse, statet, news, new and noteworthy";
}
@@ -36,8 +34,8 @@
'text' => '<i class="fa fa-home"></i> StatET'
);
-$Nav->addNavSeparator("StatET 4.0", "");
-$Nav->addCustomNav("New and Noteworthy", "/statet/news/noteworthy-4.0.php", "_self", 1);
+$Nav->addNavSeparator("StatET ${statetVersion}", "");
+$Nav->addCustomNav("New and Noteworthy", "/statet/news/noteworthy-${statetVersion}.php", "_self", 1);
$Nav->addNavSeparator("StatET", "/statet/");
$Nav->addCustomNav("Mailing List: statet-users", "https://accounts.eclipse.org/mailing-list/statet-users", "_self", 3);
diff --git a/news/_noteworthy-statet.php b/news/_noteworthy-statet.php
index e650aa0..1d24f27 100644
--- a/news/_noteworthy-statet.php
+++ b/news/_noteworthy-statet.php
@@ -30,7 +30,7 @@
$themeVariables['btn_cfa'] = array(
'hide' => FALSE,
- 'href' => '/statet/downloads/4.0.php',
+ 'href' => "/statet/downloads/${statetVersion}.php",
'text' => '<i class="fa fa-download"></i> Download StatET'
);
diff --git a/news/noteworthy-4.0.php b/news/noteworthy-4.0.php
index 9f85f40..13c0da4 100644
--- a/news/noteworthy-4.0.php
+++ b/news/noteworthy-4.0.php
@@ -5,5 +5,8 @@
$App = new App();
$Nav = new Nav();
$Menu = new Menu();
-$keywords = 'eclipse, statet, news, new and noteworthy, statet 4.0';
+
+$statetVersion= "4.0";
+$keywords= 'eclipse, statet, news, new and noteworthy, statet ${statetVersion}';
+
require("_noteworthy-statet.php");