Просмотр исходного кода

Fixed a bug with a duplicated constants.

Victor De la Rocha 16 лет назад
Родитель
Сommit
77cb58b951
2 измененных файлов с 10 добавлено и 11 удалено
  1. 2 2
      classes/install.class.php
  2. 8 9
      entry.php

+ 2 - 2
classes/install.class.php Просмотреть файл

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

+ 8 - 9
entry.php Просмотреть файл

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