Skip to content

Commit

Permalink
Version 1.9.16 rc1: Re-enabled logged in feature (#46)
Browse files Browse the repository at this point in the history
  • Loading branch information
cmllr committed Dec 22, 2014
1 parent 77f0cbe commit 6163b31
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Includes/Kernel/Kernel.Program.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ class Kernel{
* The programs version
* Structurized in {1.9.X-codenameorbranch-state}
*/
public $Version = "1.9.15-Lenticularis-beta2-1";
public $Version = "1.9.16-Lenticularis-rc1-0";//"1.9.15-Lenticularis-rc1-0";
/**
* The programs release date
*/
Expand Down
1 change: 1 addition & 0 deletions Language/de.lng
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ user_create_admin_fail = "Benutzer anlegen fehlgeschlagen.";
enabled_user = "Benutzer aktiv";
Source = "Quelle";
Unstable = "Entwicklungs- oder Vorabversion.";
RC ="Release Candidate Version"
Stable = "Herzlichen Glüwunsch, Sie benutzen eine stabile Redundancy - Version!";
Lang = "Sprache";
Search_Description= "Die Suche findet jede Datei und jedes Verzeichnis, welche den Suchbegriff beinhalten.";
Expand Down
2 changes: 1 addition & 1 deletion Language/en.lng
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ admin_admin = "Administrator";

Unstable = "Development version";
Stable = "Congratulations, you are using the latest version of Redundancy.";

RC ="Release Candidate Version"
Files_Name = "Name";
Files_Uploaded ="Uploaded";
Files_Size = "Size";
Expand Down
2 changes: 1 addition & 1 deletion index.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
ob_start();

//Set the cookies if needed
//$router->CookieInteraction();
$router->CookieInteraction();
?>
<!DOCTYPE html>

Expand Down
9 changes: 6 additions & 3 deletions nys/Nys.Router.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,15 @@ public function __construct(){
* Interacts with the cookies, creates or deletes them (if needed)
*/
public function CookieInteraction(){
//If the logged in feature is requested, set the cookie
if (isset($_SESSION["StayLoggedIn"])){
setcookie("SessionData", $_SESSION["Token"]);
setcookie("SessionDataLang", $_SESSION["Language"]);
setcookie("SessionData", $_SESSION["Token"]);//,time()+5);
setcookie("SessionDataLang", $_SESSION["Language"]);//,time()+5);
unset($_SESSION["StayLoggedIn"]);
}

//If the session cookie is not empty
if (!empty($_COOKIE["SessionData"])){
//If any route except logout is requested and the token is empty, fill it with the values from the cookie
if(!isset($_GET["logout"])){
//only set the token if it is not saved already.
if (!isset($_SESSION["Token"]) ||empty($_SESSION["Token"])){
Expand All @@ -64,6 +66,7 @@ public function CookieInteraction(){
}
}
else{
//If logout is requested, kill the cookie (SESSION will be killed in Controller)
unset($_COOKIE["SessionData"]);
unset($_COOKIE["SessionDataLang"]);
// empty value and expiration one hour before
Expand Down
6 changes: 4 additions & 2 deletions nys/Views/Info.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,11 @@
<td>
<?php
if (strpos($version,"eol") !== false)
echo "<span class=\"label label-danger\">".$GLOBALS["Language"]->EOL."</span>";
else if (strpos($version,"dev") !== false || strpos($version,"beta") !== false)
echo "<span class=\"label label-danger\">".$GLOBALS["Language"]->EOL."</span>";
else if (strpos($version,"beta") !== false)
echo "<span class=\"label label-warning\">".$GLOBALS["Language"]->Unstable."</span>";
else if (strpos($version,"rc") !== false)
echo "<span class=\"label label-warning\">".$GLOBALS["Language"]->RC."</span>";
else
echo "<span class=\"label label-success\">".$GLOBALS["Language"]->Stable."</span>";
?>
Expand Down
4 changes: 3 additions & 1 deletion nys/Views/StartPage.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@
<?php
if (strpos($version,"eol") !== false)
echo "<span class=\"label label-danger\">".$GLOBALS["Language"]->EOL."</span>";
else if (strpos($version,"dev") !== false || strpos($version,"beta") !== false)
else if (strpos($version,"beta") !== false)
echo "<span class=\"label label-warning\">".$GLOBALS["Language"]->Unstable."</span>";
else if (strpos($version,"rc") !== false)
echo "<span class=\"label label-warning\">".$GLOBALS["Language"]->RC."</span>";
else
echo "<span class=\"label label-success\">".$GLOBALS["Language"]->Stable."</span>";

Expand Down

0 comments on commit 6163b31

Please sign in to comment.