1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
|
diff -up ocsreports/install.php.var ocsreports/install.php
--- ocsreports/install.php.var 2011-10-31 08:42:38.914660647 +0100
+++ ocsreports/install.php 2011-10-31 08:44:55.353669573 +0100
@@ -96,9 +96,9 @@ if( isset($_POST["name"])) {
else
$instOk = true;
}
-if( $hnd = @fopen("dbconfig.inc.php", "r") ) {
+if( $hnd = @fopen(CONF_MYSQL, "r") ) {
fclose($hnd);
- require("dbconfig.inc.php");
+ require(CONF_MYSQL);
if (defined('COMPTE_BASE')) { // Upgrade from 2.0.x
$valNme = COMPTE_BASE;
} else if (isset($_SESSION["COMPTE_BASE"])) { // Upgrade from 1.3.x
@@ -188,7 +188,7 @@ if($_POST["fin"]=="fin") {
. "</b><br></font></center>";
echo "<br><center><font color=red><b>" . $l->g(2065) . "</b></font></center>";
- unlink("dbconfig.inc.php");
+ unlink(CONF_MYSQL);
}
else {
msg_success("<b>" . $l->g(2050) . "</b><br><br><b><a href='index.php'>" . $l->g(2051) . "</a></b>");
@@ -197,7 +197,7 @@ if($_POST["fin"]=="fin") {
}
-if(!$ch = @fopen("dbconfig.inc.php","w")) {
+if(!$ch = @fopen(CONF_MYSQL,"w")) {
echo "<br><center><font color=red><b>" . $l->g(2052) . "</b></font></center>";
die();
}
@@ -424,7 +424,7 @@ if( ! $erralter ) {
if($nberr) {
echo "<br><center><font color=red><b>" . $l->g(2065) . "</b></font></center>";
- unlink("dbconfig.inc.php");
+ unlink(CONF_MYSQL);
die();
}
$nberr=0;
@@ -469,7 +469,7 @@ foreach($filenames as $fil) {
" " . $l->g(2068) .
"</b></font></center>";
echo "<br><center><font color=red><b>" . $l->g(2065) . "</b></font></center>";
- unlink("dbconfig.inc.php");
+ unlink(CONF_MYSQL);
die();
}
echo "<br><center><font color=red><b>" . $l->g(2001) .
@@ -505,7 +505,7 @@ else
if($nberr) {
echo "<br><center><font color=red><b>" . $l->g(2065) . "</b></font></center>";
- unlink("dbconfig.inc.php");
+ unlink(CONF_MYSQL);
die();
}
diff -up ocsreports/require/header.php.var ocsreports/require/header.php
--- ocsreports/require/header.php.var 2011-10-31 08:42:31.249548540 +0100
+++ ocsreports/require/header.php 2011-10-31 08:43:52.704407954 +0100
@@ -25,7 +25,6 @@ if(substr($_SERVER['DOCUMENT_ROOT'],-1)
}else{
define("DOCUMENT_ROOT",$_SERVER['DOCUMENT_ROOT']);
}
-//echo DOCUMENT_ROOT."<br>".DOCUMENT_REAL_ROOT;
//print_r($_SERVER);
if ($_SESSION['OCS']['LOG_GUI'] == 1){
@@ -72,14 +71,14 @@ if (isset($_POST['LOGOUT']) and $_POST['
}
/***************************************************** First installation checking *********************************************************/
-if( (!$fconf=@fopen("dbconfig.inc.php","r"))
+if( (!$fconf=@fopen(CONF_MYSQL,"r"))
|| (!function_exists('session_start'))
|| (!function_exists('mysql_connect')) ) {
require('install.php');
die();
}
else{
- require_once('dbconfig.inc.php');
+ require_once(CONF_MYSQL);
fclose($fconf);
}
|