amon key
[contractdashboard.git] / lib / common.inc.php
blob:a/lib/common.inc.php -> blob:b/lib/common.inc.php
--- a/lib/common.inc.php
+++ b/lib/common.inc.php
@@ -11,7 +11,7 @@
 }

 

 define('ROOT', pathinfo(__FILE__, PATHINFO_DIRNAME));

-if (strstr($_SERVER['PHP_SELF'], "labs/")) {

+if (strstr($_SERVER['PHP_SELF'], "labs/") || strstr($_SERVER['PHP_SELF'], "admin/")) {

     $basePath = "../";

 }

 require $basePath."lib/amon-php/amon.php";

@@ -22,7 +22,8 @@
 

 require ROOT . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'openid.php';

 $openid = new LightOpenID($_SERVER['HTTP_HOST']);

-

+// you have to open the session to be able to modify or remove it

+session_start();

 function login() {

     global $openid;

     if (!$openid->mode) {

@@ -54,7 +55,7 @@
 function databaseError($errMsg) {

     if ($errMsg[2] != "") {

         echo '<div class="alert-message error">';

-        Amon::log(print_r($errMsg, true), array('error'));

+        Amon::log(print_r($errMsg, true).print_r($_REQUEST, true).print_r($_SERVER, true), array('error'));

         die(print_r($errMsg, true));

         echo "</div>";

     }