Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 175875 | Differences between
and this patch

Collapse All | Expand All

(-)eclipse.org-common/system/app.class.php (-3 / +20 lines)
Lines 21-26 Link Here
21
	# Description: Functions and modules related to the application
21
	# Description: Functions and modules related to the application
22
	#
22
	#
23
	# HISTORY:
23
	# HISTORY:
24
	#		2007-03-13: added WWW_PREFIX functionality, and default class constructor
24
	#
25
	#
25
	#*****************************************************************************
26
	#*****************************************************************************
26
27
Lines 35-44 Link Here
35
	var $PUB_DOWNLOAD_URL   = "http://download.eclipse.org";
36
	var $PUB_DOWNLOAD_URL   = "http://download.eclipse.org";
36
	var $DOWNLOAD_BASE_PATH = "/home/data/httpd/download.eclipse.org";
37
	var $DOWNLOAD_BASE_PATH = "/home/data/httpd/download.eclipse.org";
37
	
38
	
39
	var $WWW_PREFIX			= "";  # default is relative
40
	
38
	var $ExtraHtmlHeaders   = "";
41
	var $ExtraHtmlHeaders   = "";
39
	
42
	
40
	var $THEME_LIST 		=  array("", "Phoenix", "Miasma", "Blue", "Industrial","Lazarus");
43
	var $THEME_LIST 		=  array("", "Phoenix", "Miasma", "Blue", "Industrial","Lazarus");
41
	
44
	
45
	# Default constructor
46
	function App() {
47
		# Set value for WWW_PREFIX
48
		if($_SERVER['SERVER_NAME'] != "www.eclipse.org") {
49
			$this->WWW_PREFIX = "http://www.eclipse.org";
50
		}
51
	}
52
	
53
	
42
	function getAppVersion() {
54
	function getAppVersion() {
43
		return $this->APPVERSION;
55
		return $this->APPVERSION;
44
	}
56
	}
Lines 66-71 Link Here
66
		return $this->DEFAULT_ROW_HEIGHT;
78
		return $this->DEFAULT_ROW_HEIGHT;
67
	}
79
	}
68
	
80
	
81
	
69
	function sendXMLHeader() {
82
	function sendXMLHeader() {
70
		header("Content-type: text/xml");
83
		header("Content-type: text/xml");
71
	}
84
	}
Lines 82-87 Link Here
82
		return $this->PUB_DOWNLOAD_URL;
95
		return $this->PUB_DOWNLOAD_URL;
83
	}
96
	}
84
	
97
	
98
	function getWWWPrefix() {
99
		return $this->WWW_PREFIX;
100
	}
101
	
85
	function getUserLanguage() {
102
	function getUserLanguage() {
86
		/* @return: String
103
		/* @return: String
87
		 * 
104
		 * 
Lines 140-146 Link Here
140
		 * 
157
		 * 
141
		 */
158
		 */
142
		
159
		
143
		$currentScript 	= $_SERVER['SCRIPT_NAME'];
160
		$currentScript 	= $_SERVER['SCRIPT_FILENAME'];
144
		$strLen 		= strlen($currentScript);
161
		$strLen 		= strlen($currentScript);
145
		$found 			= false;
162
		$found 			= false;
146
		$antiLooper		= 0;
163
		$antiLooper		= 0;
Lines 150-157 Link Here
150
		
167
		
151
		
168
		
152
		while($strLen > 1 && ! $found) {
169
		while($strLen > 1 && ! $found) {
153
			$currentScript 	= substr($_SERVER['SCRIPT_NAME'], 0, strrpos($currentScript, "/"));
170
			$currentScript 	= substr($_SERVER['SCRIPT_FILENAME'], 0, strrpos($currentScript, "/"));
154
			$testPath 		= $_SERVER['DOCUMENT_ROOT'] . $currentScript . "/_projectCommon.php";
171
			$testPath 		= $currentScript . "/_projectCommon.php";
155
			
172
			
156
			if(file_exists($testPath)) {	
173
			if(file_exists($testPath)) {	
157
				$found 	= true;
174
				$found 	= true;

Return to bug 175875