Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=homepage-ng.git;a=commitdiff;h=9c80baeddc5dde39a090a08a1214d80b811dc404

commit 9c80baeddc5dde39a090a08a1214d80b811dc404
Author: PacMiam <[email protected]>
Date:   Mon Jan 6 14:20:15 2014 +0100

* hide warning and add a test for setcookie

diff --git a/frugalware/.htaccess b/frugalware/.htaccess
index 1e3ba62..a04d081 100644
--- a/frugalware/.htaccess
+++ b/frugalware/.htaccess
@@ -5,6 +5,13 @@
</Files>

AddDefaultCharset utf-8
+
+php_flag display_startup_errors off
+php_flag display_errors off
+php_flag html_errors off
+php_value docref_root 0
+php_value docref_ext 0
+
Options +FollowSymlinks
RewriteEngine on

diff --git a/frugalware/header.php b/frugalware/header.php
index 1bf7929..8c44b93 100644
--- a/frugalware/header.php
+++ b/frugalware/header.php
@@ -1,11 +1,10 @@
-<!DOCTYPE html>
-
<?php
include("lib/header.inc.php");
$data = genHeader();

$rsspath = $fwng_root;
?>
+<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml"; xml:lang="<?php echo $lang; ?>" 
lang="<?php echo $lang; ?>">

diff --git a/frugalware/lib/functions.inc.php b/frugalware/lib/functions.inc.php
index 386328b..83e4fc1 100644
--- a/frugalware/lib/functions.inc.php
+++ b/frugalware/lib/functions.inc.php
@@ -302,7 +302,13 @@ function getlang($forcelanguage="")
{
// if the previous setting is not the same as the new, we set the new into 
cookie
$lang = $nlang;
-                setcookie("fwcurrlang", $lang, time()+3*365*24*3600, 
$fwng_root);
+
+                try {
+                    setcookie("fwcurrlang", $lang, time()+3*365*24*3600, 
$fwng_root);
+                }
+                catch (Exception $e) {
+                    echo $e;
+                }
}
}
}
@@ -315,7 +321,13 @@ function getlang($forcelanguage="")
$lang=$_GET["lang"];
if($forcelanguage!="")
$lang=$forcelanguage;
-            setcookie("fwcurrlang", $lang, time()+3*365*24*3600, $fwng_root);
+
+            try {
+                setcookie("fwcurrlang", $lang, time()+3*365*24*3600, 
$fwng_root);
+            }
+            catch (Exception $e) {
+                echo $e;
+            }
}
else
{
_______________________________________________
Frugalware-git mailing list
[email protected]
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to