Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Changing PUN_ROOT to use absolute paths, this solves some issues with…

… APC when stat=0, as well as generally being good practice.
  • Loading branch information...
commit f5ee8363628ebb668214fab17c73f7c7cef7c2bc 1 parent 62b80a1
Jamie Furness authored December 07, 2010
2  admin_bans.php
@@ -9,7 +9,7 @@
9 9
 // Tell header.php to use the admin template
10 10
 define('PUN_ADMIN_CONSOLE', 1);
11 11
 
12  
-define('PUN_ROOT', './');
  12
+define('PUN_ROOT', dirname(__FILE__).'/');
13 13
 require PUN_ROOT.'include/common.php';
14 14
 require PUN_ROOT.'include/common_admin.php';
15 15
 
2  admin_categories.php
@@ -9,7 +9,7 @@
9 9
 // Tell header.php to use the admin template
10 10
 define('PUN_ADMIN_CONSOLE', 1);
11 11
 
12  
-define('PUN_ROOT', './');
  12
+define('PUN_ROOT', dirname(__FILE__).'/');
13 13
 require PUN_ROOT.'include/common.php';
14 14
 require PUN_ROOT.'include/common_admin.php';
15 15
 
2  admin_censoring.php
@@ -9,7 +9,7 @@
9 9
 // Tell header.php to use the admin template
10 10
 define('PUN_ADMIN_CONSOLE', 1);
11 11
 
12  
-define('PUN_ROOT', './');
  12
+define('PUN_ROOT', dirname(__FILE__).'/');
13 13
 require PUN_ROOT.'include/common.php';
14 14
 require PUN_ROOT.'include/common_admin.php';
15 15
 
2  admin_forums.php
@@ -9,7 +9,7 @@
9 9
 // Tell header.php to use the admin template
10 10
 define('PUN_ADMIN_CONSOLE', 1);
11 11
 
12  
-define('PUN_ROOT', './');
  12
+define('PUN_ROOT', dirname(__FILE__).'/');
13 13
 require PUN_ROOT.'include/common.php';
14 14
 require PUN_ROOT.'include/common_admin.php';
15 15
 
2  admin_groups.php
@@ -9,7 +9,7 @@
9 9
 // Tell header.php to use the admin template
10 10
 define('PUN_ADMIN_CONSOLE', 1);
11 11
 
12  
-define('PUN_ROOT', './');
  12
+define('PUN_ROOT', dirname(__FILE__).'/');
13 13
 require PUN_ROOT.'include/common.php';
14 14
 require PUN_ROOT.'include/common_admin.php';
15 15
 
2  admin_index.php
@@ -9,7 +9,7 @@
9 9
 // Tell header.php to use the admin template
10 10
 define('PUN_ADMIN_CONSOLE', 1);
11 11
 
12  
-define('PUN_ROOT', './');
  12
+define('PUN_ROOT', dirname(__FILE__).'/');
13 13
 require PUN_ROOT.'include/common.php';
14 14
 require PUN_ROOT.'include/common_admin.php';
15 15
 
2  admin_loader.php
@@ -9,7 +9,7 @@
9 9
 // Tell header.php to use the admin template
10 10
 define('PUN_ADMIN_CONSOLE', 1);
11 11
 
12  
-define('PUN_ROOT', './');
  12
+define('PUN_ROOT', dirname(__FILE__).'/');
13 13
 require PUN_ROOT.'include/common.php';
14 14
 require PUN_ROOT.'include/common_admin.php';
15 15
 
2  admin_maintenance.php
@@ -11,7 +11,7 @@
11 11
 // Tell common.php that we don't want output buffering
12 12
 define('PUN_DISABLE_BUFFERING', 1);
13 13
 
14  
-define('PUN_ROOT', './');
  14
+define('PUN_ROOT', dirname(__FILE__).'/');
15 15
 require PUN_ROOT.'include/common.php';
16 16
 require PUN_ROOT.'include/common_admin.php';
17 17
 
2  admin_options.php
@@ -9,7 +9,7 @@
9 9
 // Tell header.php to use the admin template
10 10
 define('PUN_ADMIN_CONSOLE', 1);
11 11
 
12  
-define('PUN_ROOT', './');
  12
+define('PUN_ROOT', dirname(__FILE__).'/');
13 13
 require PUN_ROOT.'include/common.php';
14 14
 require PUN_ROOT.'include/common_admin.php';
15 15
 
2  admin_permissions.php
@@ -9,7 +9,7 @@
9 9
 // Tell header.php to use the admin template
10 10
 define('PUN_ADMIN_CONSOLE', 1);
11 11
 
12  
-define('PUN_ROOT', './');
  12
+define('PUN_ROOT', dirname(__FILE__).'/');
13 13
 require PUN_ROOT.'include/common.php';
14 14
 require PUN_ROOT.'include/common_admin.php';
15 15
 
2  admin_prune.php
@@ -9,7 +9,7 @@
9 9
 // Tell header.php to use the admin template
10 10
 define('PUN_ADMIN_CONSOLE', 1);
11 11
 
12  
-define('PUN_ROOT', './');
  12
+define('PUN_ROOT', dirname(__FILE__).'/');
13 13
 require PUN_ROOT.'include/common.php';
14 14
 require PUN_ROOT.'include/common_admin.php';
15 15
 
2  admin_ranks.php
@@ -9,7 +9,7 @@
9 9
 // Tell header.php to use the admin template
10 10
 define('PUN_ADMIN_CONSOLE', 1);
11 11
 
12  
-define('PUN_ROOT', './');
  12
+define('PUN_ROOT', dirname(__FILE__).'/');
13 13
 require PUN_ROOT.'include/common.php';
14 14
 require PUN_ROOT.'include/common_admin.php';
15 15
 
4  admin_reports.php
@@ -9,7 +9,7 @@
9 9
 // Tell header.php to use the admin template
10 10
 define('PUN_ADMIN_CONSOLE', 1);
11 11
 
12  
-define('PUN_ROOT', './');
  12
+define('PUN_ROOT', dirname(__FILE__).'/');
13 13
 require PUN_ROOT.'include/common.php';
14 14
 require PUN_ROOT.'include/common_admin.php';
15 15
 
@@ -173,4 +173,4 @@
173 173
 </div>
174 174
 <?php
175 175
 
176  
-require PUN_ROOT.'footer.php';
  176
+require PUN_ROOT.'footer.php';
2  admin_users.php
@@ -9,7 +9,7 @@
9 9
 // Tell header.php to use the admin template
10 10
 define('PUN_ADMIN_CONSOLE', 1);
11 11
 
12  
-define('PUN_ROOT', './');
  12
+define('PUN_ROOT', dirname(__FILE__).'/');
13 13
 require PUN_ROOT.'include/common.php';
14 14
 require PUN_ROOT.'include/common_admin.php';
15 15
 
2  db_update.php
@@ -34,7 +34,7 @@
34 34
 if (!function_exists('version_compare') || version_compare(PHP_VERSION, MIN_PHP_VERSION, '<'))
35 35
 	exit('You are running PHP version '.PHP_VERSION.'. FluxBB '.UPDATE_TO.' requires at least PHP '.MIN_PHP_VERSION.' to run properly. You must upgrade your PHP installation before you can continue.');
36 36
 
37  
-define('PUN_ROOT', './');
  37
+define('PUN_ROOT', dirname(__FILE__).'/');
38 38
 
39 39
 // Attempt to load the configuration file config.php
40 40
 if (file_exists(PUN_ROOT.'config.php'))
2  delete.php
@@ -6,7 +6,7 @@
6 6
  * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher
7 7
  */
8 8
 
9  
-define('PUN_ROOT', './');
  9
+define('PUN_ROOT', dirname(__FILE__).'/');
10 10
 require PUN_ROOT.'include/common.php';
11 11
 
12 12
 
2  edit.php
@@ -6,7 +6,7 @@
6 6
  * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher
7 7
  */
8 8
 
9  
-define('PUN_ROOT', './');
  9
+define('PUN_ROOT', dirname(__FILE__).'/');
10 10
 require PUN_ROOT.'include/common.php';
11 11
 
12 12
 
2  extern.php
@@ -57,7 +57,7 @@
57 57
 define('PUN_QUIET_VISIT', 1);
58 58
 
59 59
 if (!defined('PUN_ROOT'))
60  
-	define('PUN_ROOT', './');
  60
+	define('PUN_ROOT', dirname(__FILE__).'/');
61 61
 require PUN_ROOT.'include/common.php';
62 62
 
63 63
 // The length at which topic subjects will be truncated (for HTML output)
2  help.php
@@ -9,7 +9,7 @@
9 9
 // Tell header.php to use the help template
10 10
 define('PUN_HELP', 1);
11 11
 
12  
-define('PUN_ROOT', './');
  12
+define('PUN_ROOT', dirname(__FILE__).'/');
13 13
 require PUN_ROOT.'include/common.php';
14 14
 
15 15
 
2  index.php
@@ -6,7 +6,7 @@
6 6
  * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher
7 7
  */
8 8
 
9  
-define('PUN_ROOT', './');
  9
+define('PUN_ROOT', dirname(__FILE__).'/');
10 10
 require PUN_ROOT.'include/common.php';
11 11
 
12 12
 
2  install.php
@@ -20,7 +20,7 @@
20 20
 define('PUN_SEARCH_MAX_WORD', 20);
21 21
 
22 22
 
23  
-define('PUN_ROOT', './');
  23
+define('PUN_ROOT', dirname(__FILE__).'/');
24 24
 
25 25
 // If we've been passed a default language, use it
26 26
 $default_lang = isset($_POST['req_default_lang']) ? trim($_POST['req_default_lang']) : 'English';
2  login.php
@@ -9,7 +9,7 @@
9 9
 if (isset($_GET['action']))
10 10
 	define('PUN_QUIET_VISIT', 1);
11 11
 
12  
-define('PUN_ROOT', './');
  12
+define('PUN_ROOT', dirname(__FILE__).'/');
13 13
 require PUN_ROOT.'include/common.php';
14 14
 
15 15
 
2  misc.php
@@ -9,7 +9,7 @@
9 9
 if (isset($_GET['action']))
10 10
 	define('PUN_QUIET_VISIT', 1);
11 11
 
12  
-define('PUN_ROOT', './');
  12
+define('PUN_ROOT', dirname(__FILE__).'/');
13 13
 require PUN_ROOT.'include/common.php';
14 14
 
15 15
 
2  moderate.php
@@ -6,7 +6,7 @@
6 6
  * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher
7 7
  */
8 8
 
9  
-define('PUN_ROOT', './');
  9
+define('PUN_ROOT', dirname(__FILE__).'/');
10 10
 require PUN_ROOT.'include/common.php';
11 11
 
12 12
 
2  post.php
@@ -6,7 +6,7 @@
6 6
  * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher
7 7
  */
8 8
 
9  
-define('PUN_ROOT', './');
  9
+define('PUN_ROOT', dirname(__FILE__).'/');
10 10
 require PUN_ROOT.'include/common.php';
11 11
 
12 12
 
4  profile.php
@@ -6,7 +6,7 @@
6 6
  * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher
7 7
  */
8 8
 
9  
-define('PUN_ROOT', './');
  9
+define('PUN_ROOT', dirname(__FILE__).'/');
10 10
 require PUN_ROOT.'include/common.php';
11 11
 
12 12
 // Include UTF-8 function
@@ -1734,4 +1734,4 @@
1734 1734
 <?php
1735 1735
 
1736 1736
 	require PUN_ROOT.'footer.php';
1737  
-}
  1737
+}
2  register.php
@@ -6,7 +6,7 @@
6 6
  * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher
7 7
  */
8 8
 
9  
-define('PUN_ROOT', './');
  9
+define('PUN_ROOT', dirname(__FILE__).'/');
10 10
 require PUN_ROOT.'include/common.php';
11 11
 
12 12
 
2  search.php
@@ -9,7 +9,7 @@
9 9
 // The contents of this file are very much inspired by the file search.php
10 10
 // from the phpBB Group forum software phpBB2 (http://www.phpbb.com)
11 11
 
12  
-define('PUN_ROOT', './');
  12
+define('PUN_ROOT', dirname(__FILE__).'/');
13 13
 require PUN_ROOT.'include/common.php';
14 14
 
15 15
 // Load the search.php language file
2  userlist.php
@@ -6,7 +6,7 @@
6 6
  * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher
7 7
  */
8 8
 
9  
-define('PUN_ROOT', './');
  9
+define('PUN_ROOT', dirname(__FILE__).'/');
10 10
 require PUN_ROOT.'include/common.php';
11 11
 
12 12
 
2  viewforum.php
@@ -6,7 +6,7 @@
6 6
  * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher
7 7
  */
8 8
 
9  
-define('PUN_ROOT', './');
  9
+define('PUN_ROOT', dirname(__FILE__).'/');
10 10
 require PUN_ROOT.'include/common.php';
11 11
 
12 12
 
2  viewtopic.php
@@ -6,7 +6,7 @@
6 6
  * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher
7 7
  */
8 8
 
9  
-define('PUN_ROOT', './');
  9
+define('PUN_ROOT', dirname(__FILE__).'/');
10 10
 require PUN_ROOT.'include/common.php';
11 11
 
12 12
 

0 notes on commit f5ee836

Please sign in to comment.
Something went wrong with that request. Please try again.