|
@@ -1,4 +1,5 @@
|
1
|
1
|
<?php
|
|
2
|
+ob_start();
|
2
|
3
|
if(!defined('entry') || !entry) die('Not a valid page');
|
3
|
4
|
/*
|
4
|
5
|
* Created on Sep 15, 2007
|
|
@@ -24,6 +25,10 @@
|
24
|
25
|
* classes/imgsize.php
|
25
|
26
|
*/
|
26
|
27
|
|
|
28
|
+error_reporting (E_ALL);
|
|
29
|
+ini_set('display_errors', '1');
|
|
30
|
+
|
|
31
|
+
|
27
|
32
|
// PHP settings specific to Gelato
|
28
|
33
|
ini_set('pcre.backtrack_limit', '10000');
|
29
|
34
|
// Globals to be used throughout the application
|
|
@@ -31,12 +36,14 @@ define('Absolute_Path', dirname(__FILE__).DIRECTORY_SEPARATOR);
|
31
|
36
|
$installed = true;
|
32
|
37
|
$configFile = Absolute_Path.'config.php';
|
33
|
38
|
|
34
|
|
-if(strpos($_SERVER['REQUEST_URI'],'/admin'))$dir = "../"; else $dir = "";
|
|
39
|
+$dir = (strpos($_SERVER['REQUEST_URI'],'/admin')) ? "../" : "";
|
|
40
|
+
|
35
|
41
|
if (!file_exists($configFile) and basename($_SERVER['PHP_SELF'])!='install.php'){
|
36
|
|
- header("Location: {$dir}install.php");exit;
|
37
|
|
-}else{
|
38
|
|
- include(Absolute_Path.'classes/install.class.php');
|
39
|
|
- $install = new Install();
|
|
42
|
+ header("Location: {$dir}install.php");
|
|
43
|
+ exit;
|
|
44
|
+} else {
|
|
45
|
+ include(Absolute_Path.'classes/install.class.php');
|
|
46
|
+ $install = new Install();
|
40
|
47
|
if(!$install->is_gelato_installed()){
|
41
|
48
|
if(basename($_SERVER['PHP_SELF'])!='install.php'){
|
42
|
49
|
header("Location: {$dir}install.php");exit;
|
|
@@ -45,8 +52,9 @@ if (!file_exists($configFile) and basename($_SERVER['PHP_SELF'])!='install.php')
|
45
|
52
|
}
|
46
|
53
|
}
|
47
|
54
|
|
48
|
|
-if($installed)
|
|
55
|
+if($installed) {
|
49
|
56
|
require($configFile);
|
|
57
|
+}
|
50
|
58
|
|
51
|
59
|
require_once("classes/configuration.class.php");
|
52
|
60
|
require_once("classes/textile.class.php");
|
|
@@ -62,16 +70,18 @@ require_once(Absolute_Path.'classes'.DIRECTORY_SEPARATOR.'gettext.class.php');
|
62
|
70
|
require_once(Absolute_Path.'classes'.DIRECTORY_SEPARATOR.'lang.functions.php');
|
63
|
71
|
|
64
|
72
|
if($installed){
|
|
73
|
+
|
65
|
74
|
// Globals to be used throughout the application
|
66
|
75
|
$user = new user();
|
67
|
76
|
$tumble = new gelato();
|
68
|
77
|
$conf = new configuration();
|
69
|
78
|
$db = new Conexion_Mysql(DB_name, DB_Server, DB_User, DB_Password);
|
70
|
|
-
|
|
79
|
+
|
71
|
80
|
session_start();
|
72
|
|
-
|
73
|
|
- $feeds = new feeds();
|
74
|
|
- $feeds->updateFeeds();
|
|
81
|
+
|
|
82
|
+ $feeds = new feeds();
|
|
83
|
+ $feeds->updateFeeds();
|
75
|
84
|
unset($feeds);
|
76
|
85
|
}
|
77
|
86
|
?>
|
|
87
|
+
|