From 0a816a4376f1746fd9e7c48f44da93da1e33b491 Mon Sep 17 00:00:00 2001
From: jsatoh <junichi@rworks.jp>
Date: Fri, 7 Dec 2012 06:36:22 +0000
Subject: [PATCH] 2012-12-07  Junichi Satoh  <junichi@rworks.jp>

	* index.php: Fixed undefined function error in case of login
	failures without enterprise.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7236 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
---
 pandora_console/ChangeLog | 5 +++++
 pandora_console/index.php | 8 +++++---
 2 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog
index 7bed5752d3..2a42bfce6b 100644
--- a/pandora_console/ChangeLog
+++ b/pandora_console/ChangeLog
@@ -1,3 +1,8 @@
+2012-12-07  Junichi Satoh  <junichi@rworks.jp>
+
+	* index.php: Fixed undefined function error in case of login
+	failures without enterprise.
+
 2012-12-06 Miguel de Dios <miguel.dedios@artica.es>
 	
 	* include/functions_agents.php, include/functions_html.php,
diff --git a/pandora_console/index.php b/pandora_console/index.php
index 4f0a1d712c..2895f5573b 100644
--- a/pandora_console/index.php
+++ b/pandora_console/index.php
@@ -21,7 +21,7 @@ if (function_exists ('mb_internal_encoding')) {
 
 // Set to 1 to do not check for installer or config file (for development!).
 // Activate gives more error information, not useful for production sites
-$develop_bypass = 0;
+$develop_bypass = 1;
 
 if ($develop_bypass != 1) {
 	// If no config file, automatically try to install
@@ -289,12 +289,14 @@ elseif (! isset ($config['id_user']) && isset ($_GET["login"])) {
 	else { //login wrong
 		$blocked = false;
 		
-		if (!is_user_admin($nick) || $config['enable_pass_policy_admin']) {
+		if ((!is_user_admin($nick) || $config['enable_pass_policy_admin']) && defined('PANDORA_ENTERPRISE')) {
 			$blocked = login_check_blocked($nick);
 		}
 		
 		if (!$blocked) {
-			login_check_failed($nick); //Checks failed attempts
+			if (defined('PANDORA_ENTERPRISE')) {
+				login_check_failed($nick); //Checks failed attempts
+			}
 			$login_failed = true;
 			require_once ('general/login_page.php');
 			db_pandora_audit("Logon Failed", "Invalid login: ".$nick, $nick);