Browse Source

Fixed a bug with a duplicated constants.

Victor De la Rocha 16 years ago
parent
commit
77cb58b951
2 changed files with 10 additions and 11 deletions
  1. 2 2
      classes/install.class.php
  2. 8 9
      entry.php

+ 2 - 2
classes/install.class.php View File

49
     }
49
     }
50
 
50
 
51
 	function install_db(){
51
 	function install_db(){
52
-		require('config.php');
52
+		require_once(Absolute_Path.'config.php');
53
 		$db = new Conexion_Mysql(DB_name, DB_Server, DB_User, DB_Password);
53
 		$db = new Conexion_Mysql(DB_name, DB_Server, DB_User, DB_Password);
54
 		$sqlStr = array();
54
 		$sqlStr = array();
55
 
55
 
158
 
158
 
159
 	function is_gelato_installed(){
159
 	function is_gelato_installed(){
160
 		if(file_exists(Absolute_Path.'config.php')) {
160
 		if(file_exists(Absolute_Path.'config.php')) {
161
-			@include(Absolute_Path."config.php");
161
+			include_once(Absolute_Path."config.php");
162
 			if (!$this->check_for_config()){
162
 			if (!$this->check_for_config()){
163
 				return false;
163
 				return false;
164
 			} else {
164
 			} else {

+ 8 - 9
entry.php View File

28
 error_reporting (E_ALL);
28
 error_reporting (E_ALL);
29
 ini_set('display_errors', '1');
29
 ini_set('display_errors', '1');
30
 
30
 
31
- 
32
 // PHP settings specific to Gelato
31
 // PHP settings specific to Gelato
33
 ini_set('pcre.backtrack_limit', '10000');
32
 ini_set('pcre.backtrack_limit', '10000');
34
 // Globals to be used throughout the application
33
 // Globals to be used throughout the application
41
 if (!file_exists($configFile) and basename($_SERVER['PHP_SELF'])!='install.php'){
40
 if (!file_exists($configFile) and basename($_SERVER['PHP_SELF'])!='install.php'){
42
 	header("Location: {$dir}install.php");
41
 	header("Location: {$dir}install.php");
43
 	exit;
42
 	exit;
44
-} else {	
45
-	include(Absolute_Path.'classes/install.class.php');	
46
-	$install = new Install();	
43
+} else {
44
+	include_once(Absolute_Path.'classes/install.class.php');
45
+	$install = new Install();
47
 	if(!$install->is_gelato_installed()){
46
 	if(!$install->is_gelato_installed()){
48
 		if(basename($_SERVER['PHP_SELF'])!='install.php'){
47
 		if(basename($_SERVER['PHP_SELF'])!='install.php'){
49
 				header("Location: {$dir}install.php");exit;
48
 				header("Location: {$dir}install.php");exit;
53
 }
52
 }
54
 
53
 
55
 if($installed) {
54
 if($installed) {
56
-	require($configFile);
55
+	require_once($configFile);
57
 }
56
 }
58
 
57
 
59
 require_once("classes/configuration.class.php");
58
 require_once("classes/configuration.class.php");
76
 	$tumble = new gelato();
75
 	$tumble = new gelato();
77
 	$conf = new configuration();
76
 	$conf = new configuration();
78
 	$db = new Conexion_Mysql(DB_name, DB_Server, DB_User, DB_Password);
77
 	$db = new Conexion_Mysql(DB_name, DB_Server, DB_User, DB_Password);
79
-	
78
+
80
 	session_start();
79
 	session_start();
81
-	
82
-	$feeds = new feeds();	
83
-	$feeds->updateFeeds();	
80
+
81
+	$feeds = new feeds();
82
+	$feeds->updateFeeds();
84
 	unset($feeds);
83
 	unset($feeds);
85
 }
84
 }
86
 ?>
85
 ?>