@@ -44,12 +44,12 @@ discard block |
||
44 | 44 | define("ACTIVE_STATUS", "ACTIVE"); |
45 | 45 | |
46 | 46 | class PackageManagerComm{ |
47 | - /** |
|
48 | - * Initialize the soap client and store in the $GLOBALS object for use |
|
49 | - * |
|
50 | - * @param login designates whether we want to try to login after we initialize or not |
|
51 | - */ |
|
52 | - function initialize($login = true){ |
|
47 | + /** |
|
48 | + * Initialize the soap client and store in the $GLOBALS object for use |
|
49 | + * |
|
50 | + * @param login designates whether we want to try to login after we initialize or not |
|
51 | + */ |
|
52 | + function initialize($login = true){ |
|
53 | 53 | if(empty($GLOBALS['SugarDepot'])){ |
54 | 54 | $GLOBALS['log']->debug('USING HTTPS TO CONNECT TO HEARTBEAT'); |
55 | 55 | $soap_client = new nusoapclient(HTTPS_URL, false); |
@@ -60,91 +60,91 @@ discard block |
||
60 | 60 | if($login && empty($_SESSION['SugarDepotSessionID'])){ |
61 | 61 | PackageManagerComm::login(); |
62 | 62 | } |
63 | - } |
|
63 | + } |
|
64 | 64 | |
65 | - /** |
|
66 | - * Check for errors in the response or error_str |
|
67 | - */ |
|
68 | - function errorCheck(){ |
|
69 | - if(!empty($GLOBALS['SugarDepot']->error_str)){ |
|
70 | - $GLOBALS['log']->fatal($GLOBALS['SugarDepot']->error_str); |
|
71 | - $GLOBALS['log']->fatal($GLOBALS['SugarDepot']->response); |
|
72 | - } |
|
73 | - } |
|
65 | + /** |
|
66 | + * Check for errors in the response or error_str |
|
67 | + */ |
|
68 | + function errorCheck(){ |
|
69 | + if(!empty($GLOBALS['SugarDepot']->error_str)){ |
|
70 | + $GLOBALS['log']->fatal($GLOBALS['SugarDepot']->error_str); |
|
71 | + $GLOBALS['log']->fatal($GLOBALS['SugarDepot']->response); |
|
72 | + } |
|
73 | + } |
|
74 | 74 | |
75 | - /** |
|
76 | - * Set the credentials for use during login |
|
77 | - * |
|
78 | - * @param username Mambo username |
|
79 | - * @param password Mambo password |
|
80 | - * @param download_key User's download key |
|
81 | - */ |
|
82 | - function setCredentials($username, $password, $download_key){ |
|
75 | + /** |
|
76 | + * Set the credentials for use during login |
|
77 | + * |
|
78 | + * @param username Mambo username |
|
79 | + * @param password Mambo password |
|
80 | + * @param download_key User's download key |
|
81 | + */ |
|
82 | + function setCredentials($username, $password, $download_key){ |
|
83 | 83 | $_SESSION['SugarDepotUsername'] = $username; |
84 | 84 | $_SESSION['SugarDepotPassword'] = $password; |
85 | 85 | $_SESSION['SugarDepotDownloadKey'] = $download_key; |
86 | - } |
|
86 | + } |
|
87 | 87 | |
88 | - /** |
|
89 | - * Clears out the session so we can reauthenticate. |
|
90 | - */ |
|
91 | - function clearSession(){ |
|
92 | - $_SESSION['SugarDepotSessionID'] = null; |
|
93 | - unset($_SESSION['SugarDepotSessionID']); |
|
94 | - } |
|
95 | - ///////////////////////////////////////////////////////// |
|
96 | - ////////// BEGIN: Base Functions for Communicating with the depot |
|
97 | - /** |
|
98 | - * Login to the depot |
|
99 | - * |
|
100 | - * @return true if successful, false otherwise |
|
101 | - */ |
|
102 | - function login($terms_checked = true){ |
|
103 | - if(empty($_SESSION['SugarDepotSessionID'])){ |
|
104 | - global $license; |
|
105 | - $GLOBALS['log']->debug("Begin SugarDepot Login"); |
|
106 | - PackageManagerComm::initialize(false); |
|
107 | - require('sugar_version.php'); |
|
108 | - require('config.php'); |
|
109 | - $credentials = PackageManager::getCredentials(); |
|
110 | - if(empty($license))loadLicense(); |
|
111 | - $info = sugarEncode('2813', serialize(getSystemInfo(true))); |
|
112 | - $pm = new PackageManager(); |
|
113 | - $installed = $pm->buildInstalledReleases(); |
|
114 | - $installed = base64_encode(serialize($installed)); |
|
115 | - $params = array('installed_modules' => $installed, 'terms_checked' => $terms_checked, 'system_name' => $credentials['system_name']); |
|
116 | - $terms_version = (!empty($_SESSION['SugarDepot_TermsVersion']) ? $_SESSION['SugarDepot_TermsVersion'] : ''); |
|
117 | - if(!empty($terms_version)) |
|
118 | - $params['terms_version'] = $terms_version; |
|
88 | + /** |
|
89 | + * Clears out the session so we can reauthenticate. |
|
90 | + */ |
|
91 | + function clearSession(){ |
|
92 | + $_SESSION['SugarDepotSessionID'] = null; |
|
93 | + unset($_SESSION['SugarDepotSessionID']); |
|
94 | + } |
|
95 | + ///////////////////////////////////////////////////////// |
|
96 | + ////////// BEGIN: Base Functions for Communicating with the depot |
|
97 | + /** |
|
98 | + * Login to the depot |
|
99 | + * |
|
100 | + * @return true if successful, false otherwise |
|
101 | + */ |
|
102 | + function login($terms_checked = true){ |
|
103 | + if(empty($_SESSION['SugarDepotSessionID'])){ |
|
104 | + global $license; |
|
105 | + $GLOBALS['log']->debug("Begin SugarDepot Login"); |
|
106 | + PackageManagerComm::initialize(false); |
|
107 | + require('sugar_version.php'); |
|
108 | + require('config.php'); |
|
109 | + $credentials = PackageManager::getCredentials(); |
|
110 | + if(empty($license))loadLicense(); |
|
111 | + $info = sugarEncode('2813', serialize(getSystemInfo(true))); |
|
112 | + $pm = new PackageManager(); |
|
113 | + $installed = $pm->buildInstalledReleases(); |
|
114 | + $installed = base64_encode(serialize($installed)); |
|
115 | + $params = array('installed_modules' => $installed, 'terms_checked' => $terms_checked, 'system_name' => $credentials['system_name']); |
|
116 | + $terms_version = (!empty($_SESSION['SugarDepot_TermsVersion']) ? $_SESSION['SugarDepot_TermsVersion'] : ''); |
|
117 | + if(!empty($terms_version)) |
|
118 | + $params['terms_version'] = $terms_version; |
|
119 | 119 | |
120 | - $result = $GLOBALS['SugarDepot']->call('depotLogin', array(array('user_name' => $credentials['username'], 'password' => $credentials['password']),'info'=>$info, 'params' => $params)); |
|
121 | - PackageManagerComm::errorCheck(); |
|
122 | - if(!is_array($result)) |
|
123 | - $_SESSION['SugarDepotSessionID'] = $result; |
|
124 | - $GLOBALS['log']->debug("End SugarDepot Login"); |
|
125 | - return $result; |
|
126 | - } |
|
127 | - else |
|
128 | - return $_SESSION['SugarDepotSessionID']; |
|
129 | - } |
|
120 | + $result = $GLOBALS['SugarDepot']->call('depotLogin', array(array('user_name' => $credentials['username'], 'password' => $credentials['password']),'info'=>$info, 'params' => $params)); |
|
121 | + PackageManagerComm::errorCheck(); |
|
122 | + if(!is_array($result)) |
|
123 | + $_SESSION['SugarDepotSessionID'] = $result; |
|
124 | + $GLOBALS['log']->debug("End SugarDepot Login"); |
|
125 | + return $result; |
|
126 | + } |
|
127 | + else |
|
128 | + return $_SESSION['SugarDepotSessionID']; |
|
129 | + } |
|
130 | 130 | |
131 | - /** |
|
132 | - * Logout from the depot |
|
133 | - */ |
|
134 | - function logout(){ |
|
131 | + /** |
|
132 | + * Logout from the depot |
|
133 | + */ |
|
134 | + function logout(){ |
|
135 | 135 | PackageManagerComm::initialize(); |
136 | 136 | $result = $GLOBALS['SugarDepot']->call('depotLogout', array('session_id' => $_SESSION['SugarDepotSessionID'])); |
137 | - } |
|
137 | + } |
|
138 | 138 | |
139 | - /** |
|
140 | - * Get all promotions from the depot |
|
141 | - */ |
|
142 | - function getPromotion(){ |
|
139 | + /** |
|
140 | + * Get all promotions from the depot |
|
141 | + */ |
|
142 | + function getPromotion(){ |
|
143 | 143 | PackageManagerComm::initialize(); |
144 | 144 | //check for fault first and then return |
145 | 145 | $name_value_list = $GLOBALS['SugarDepot']->call('depotGetPromotion', array('session_id' => $_SESSION['SugarDepotSessionID'])); |
146 | 146 | return $name_value_list; |
147 | - } |
|
147 | + } |
|
148 | 148 | |
149 | 149 | /** |
150 | 150 | * A generic function which given a category_id some filter will |
@@ -154,11 +154,11 @@ discard block |
||
154 | 154 | * @param filter a filter which will limit theh number of results returned |
155 | 155 | * @return categories_and_packages |
156 | 156 | * @see categories_and_packages |
157 | - */ |
|
157 | + */ |
|
158 | 158 | function getCategoryPackages($category_id, $filter = array()){ |
159 | 159 | PackageManagerComm::initialize(); |
160 | 160 | //check for fault |
161 | - return $GLOBALS['SugarDepot']->call('depotGetCategoriesPackages', array('session_id' => $_SESSION['SugarDepotSessionID'], 'category_id' => $category_id, 'filter' => $filter)); |
|
161 | + return $GLOBALS['SugarDepot']->call('depotGetCategoriesPackages', array('session_id' => $_SESSION['SugarDepotSessionID'], 'category_id' => $category_id, 'filter' => $filter)); |
|
162 | 162 | } |
163 | 163 | |
164 | 164 | /** |
@@ -182,11 +182,11 @@ discard block |
||
182 | 182 | * @param filter a filter which will limit theh number of results returned |
183 | 183 | * @return packages |
184 | 184 | * @see packages |
185 | - */ |
|
185 | + */ |
|
186 | 186 | function getPackages($category_id, $filter = array()){ |
187 | 187 | PackageManagerComm::initialize(); |
188 | 188 | //check for fault |
189 | - return $GLOBALS['SugarDepot']->call('depotGetPackages', array('session_id' => $_SESSION['SugarDepotSessionID'], 'category_id' => $category_id, 'filter' => $filter)); |
|
189 | + return $GLOBALS['SugarDepot']->call('depotGetPackages', array('session_id' => $_SESSION['SugarDepotSessionID'], 'category_id' => $category_id, 'filter' => $filter)); |
|
190 | 190 | } |
191 | 191 | |
192 | 192 | /** |
@@ -196,11 +196,11 @@ discard block |
||
196 | 196 | * @param package_id the package id which the release belongs to |
197 | 197 | * @return packages |
198 | 198 | * @see packages |
199 | - */ |
|
199 | + */ |
|
200 | 200 | function getReleases($category_id, $package_id, $filter = array()){ |
201 | 201 | PackageManagerComm::initialize(); |
202 | - //check for fault |
|
203 | - return $GLOBALS['SugarDepot']->call('depotGetReleases', array('session_id' => $_SESSION['SugarDepotSessionID'], 'category_id' => $category_id, 'package_id' => $package_id, 'filter' => $filter)); |
|
202 | + //check for fault |
|
203 | + return $GLOBALS['SugarDepot']->call('depotGetReleases', array('session_id' => $_SESSION['SugarDepotSessionID'], 'category_id' => $category_id, 'package_id' => $package_id, 'filter' => $filter)); |
|
204 | 204 | } |
205 | 205 | |
206 | 206 | /** |
@@ -211,11 +211,11 @@ discard block |
||
211 | 211 | * @param release_id the release we want to download |
212 | 212 | * @return download |
213 | 213 | * @see download |
214 | - */ |
|
214 | + */ |
|
215 | 215 | function download($category_id, $package_id, $release_id){ |
216 | 216 | PackageManagerComm::initialize(); |
217 | - //check for fault |
|
218 | - return $GLOBALS['SugarDepot']->call('depotDownloadRelease', array('session_id' => $_SESSION['SugarDepotSessionID'], 'category_id' => $category_id, 'package_id' => $package_id, 'release_id' => $release_id)); |
|
217 | + //check for fault |
|
218 | + return $GLOBALS['SugarDepot']->call('depotDownloadRelease', array('session_id' => $_SESSION['SugarDepotSessionID'], 'category_id' => $category_id, 'package_id' => $package_id, 'release_id' => $release_id)); |
|
219 | 219 | } |
220 | 220 | |
221 | 221 | /** |
@@ -228,8 +228,8 @@ discard block |
||
228 | 228 | */ |
229 | 229 | function addDownload($category_id, $package_id, $release_id){ |
230 | 230 | PackageManagerComm::initialize(); |
231 | - //check for fault |
|
232 | - return $GLOBALS['SugarDepot']->call('depotAddDownload', array('session_id' => $_SESSION['SugarDepotSessionID'], 'category_id' => $category_id, 'package_id' => $package_id, 'release_id' => $release_id, 'download_key' => '123')); |
|
231 | + //check for fault |
|
232 | + return $GLOBALS['SugarDepot']->call('depotAddDownload', array('session_id' => $_SESSION['SugarDepotSessionID'], 'category_id' => $category_id, 'package_id' => $package_id, 'release_id' => $release_id, 'download_key' => '123')); |
|
233 | 233 | } |
234 | 234 | |
235 | 235 | /** |
@@ -240,9 +240,9 @@ discard block |
||
240 | 240 | */ |
241 | 241 | static public function performDownload($filename){ |
242 | 242 | PackageManagerComm::initialize(); |
243 | - //check for fault |
|
244 | - $GLOBALS['log']->debug("Performing download from depot: Session ID: ".$_SESSION['SugarDepotSessionID']." Filename: ".$filename); |
|
245 | - return PackageManagerDownloader::download($_SESSION['SugarDepotSessionID'], $filename); |
|
243 | + //check for fault |
|
244 | + $GLOBALS['log']->debug("Performing download from depot: Session ID: ".$_SESSION['SugarDepotSessionID']." Filename: ".$filename); |
|
245 | + return PackageManagerDownloader::download($_SESSION['SugarDepotSessionID'], $filename); |
|
246 | 246 | } |
247 | 247 | |
248 | 248 | /** |
@@ -254,14 +254,14 @@ discard block |
||
254 | 254 | * @return documents |
255 | 255 | */ |
256 | 256 | function getDocumentation($package_id, $release_id){ |
257 | - PackageManagerComm::initialize(); |
|
258 | - //check for fault |
|
259 | - return $GLOBALS['SugarDepot']->call('depotGetDocumentation', array('session_id' => $_SESSION['SugarDepotSessionID'], 'package_id' => $package_id, 'release_id' => $release_id)); |
|
257 | + PackageManagerComm::initialize(); |
|
258 | + //check for fault |
|
259 | + return $GLOBALS['SugarDepot']->call('depotGetDocumentation', array('session_id' => $_SESSION['SugarDepotSessionID'], 'package_id' => $package_id, 'release_id' => $release_id)); |
|
260 | 260 | } |
261 | 261 | |
262 | 262 | function getTermsAndConditions(){ |
263 | - PackageManagerComm::initialize(false); |
|
264 | - return $GLOBALS['SugarDepot']->call('depotTermsAndConditions',array()); |
|
263 | + PackageManagerComm::initialize(false); |
|
264 | + return $GLOBALS['SugarDepot']->call('depotTermsAndConditions',array()); |
|
265 | 265 | } |
266 | 266 | |
267 | 267 | /** |
@@ -270,32 +270,32 @@ discard block |
||
270 | 270 | * @param document_id the document the user has clicked on |
271 | 271 | */ |
272 | 272 | function downloadedDocumentation($document_id){ |
273 | - PackageManagerComm::initialize(); |
|
274 | - //check for fault |
|
275 | - $GLOBALS['log']->debug("Logging Document: ".$document_id); |
|
276 | - $GLOBALS['SugarDepot']->call('depotDownloadedDocumentation', array('session_id' => $_SESSION['SugarDepotSessionID'], 'document_id' => $document_id)); |
|
273 | + PackageManagerComm::initialize(); |
|
274 | + //check for fault |
|
275 | + $GLOBALS['log']->debug("Logging Document: ".$document_id); |
|
276 | + $GLOBALS['SugarDepot']->call('depotDownloadedDocumentation', array('session_id' => $_SESSION['SugarDepotSessionID'], 'document_id' => $document_id)); |
|
277 | 277 | } |
278 | 278 | |
279 | - /** |
|
280 | - * Send the list of installed objects, could be patches, or modules, .. to the depot and allow the depot to send back |
|
281 | - * a list of corresponding updates |
|
282 | - * |
|
283 | - * @param objects_to_check an array of name_value_lists which contain the appropriate values |
|
284 | - * which will allow the depot to check for updates |
|
285 | - * |
|
286 | - * @return array of name_value_lists of corresponding updates |
|
287 | - */ |
|
288 | - function checkForUpdates($objects_to_check){ |
|
289 | - PackageManagerComm::initialize(); |
|
290 | - //check for fault |
|
291 | - return $GLOBALS['SugarDepot']->call('depotCheckForUpdates', array('session_id' => $_SESSION['SugarDepotSessionID'], 'objects' => $objects_to_check)); |
|
292 | - } |
|
293 | - /** |
|
294 | - * Ping the server to determine if we have established proper communication |
|
279 | + /** |
|
280 | + * Send the list of installed objects, could be patches, or modules, .. to the depot and allow the depot to send back |
|
281 | + * a list of corresponding updates |
|
282 | + * |
|
283 | + * @param objects_to_check an array of name_value_lists which contain the appropriate values |
|
284 | + * which will allow the depot to check for updates |
|
295 | 285 | * |
296 | - * @return true if we can communicate with the server and false otherwise |
|
297 | - */ |
|
298 | - function isAlive(){ |
|
286 | + * @return array of name_value_lists of corresponding updates |
|
287 | + */ |
|
288 | + function checkForUpdates($objects_to_check){ |
|
289 | + PackageManagerComm::initialize(); |
|
290 | + //check for fault |
|
291 | + return $GLOBALS['SugarDepot']->call('depotCheckForUpdates', array('session_id' => $_SESSION['SugarDepotSessionID'], 'objects' => $objects_to_check)); |
|
292 | + } |
|
293 | + /** |
|
294 | + * Ping the server to determine if we have established proper communication |
|
295 | + * |
|
296 | + * @return true if we can communicate with the server and false otherwise |
|
297 | + */ |
|
298 | + function isAlive(){ |
|
299 | 299 | PackageManagerComm::initialize(false); |
300 | 300 | |
301 | 301 | $status = $GLOBALS['SugarDepot']->call('sugarPing', array()); |
@@ -304,9 +304,9 @@ discard block |
||
304 | 304 | }else{ |
305 | 305 | return true; |
306 | 306 | } |
307 | - } |
|
308 | - ////////// END: Base Functions for Communicating with the depot |
|
309 | - //////////////////////////////////////////////////////// |
|
307 | + } |
|
308 | + ////////// END: Base Functions for Communicating with the depot |
|
309 | + //////////////////////////////////////////////////////// |
|
310 | 310 | } |
311 | 311 | |
312 | 312 | ?> |
@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | - if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
2 | + if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
3 | 3 | |
4 | 4 | $suitecrm_version = '7.5.1'; |
5 | 5 | $suitecrm_timestamp = '2015-01-26 17:00'; |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | - if(!defined('sugarEntry'))define('sugarEntry', true); |
|
2 | + if(!defined('sugarEntry'))define('sugarEntry', true); |
|
3 | 3 | /********************************************************************************* |
4 | 4 | * SugarCRM Community Edition is a customer relationship management program developed by |
5 | 5 | * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc. |
@@ -40,10 +40,10 @@ discard block |
||
40 | 40 | |
41 | 41 | @session_start(); |
42 | 42 | if(isset($_REQUEST['clear_session']) || !empty($_SESSION['loginAttempts'])) { |
43 | - session_destroy(); |
|
44 | - header('Location: install.php'); |
|
45 | - echo 'session clean, page refresh...'; |
|
46 | - exit; |
|
43 | + session_destroy(); |
|
44 | + header('Location: install.php'); |
|
45 | + echo 'session clean, page refresh...'; |
|
46 | + exit; |
|
47 | 47 | } |
48 | 48 | |
49 | 49 | // recover smtp settings |
@@ -53,12 +53,12 @@ discard block |
||
53 | 53 | |
54 | 54 | //session_destroy(); |
55 | 55 | if (version_compare(phpversion(),'5.2.0') < 0) { |
56 | - $msg = 'Minimum PHP version required is 5.2.0. You are using PHP version '. phpversion(); |
|
56 | + $msg = 'Minimum PHP version required is 5.2.0. You are using PHP version '. phpversion(); |
|
57 | 57 | die($msg); |
58 | 58 | } |
59 | 59 | $session_id = session_id(); |
60 | 60 | if(empty($session_id)){ |
61 | - @session_start(); |
|
61 | + @session_start(); |
|
62 | 62 | } |
63 | 63 | $GLOBALS['installing'] = true; |
64 | 64 | define('SUGARCRM_IS_INSTALLING', $GLOBALS['installing']); |
@@ -88,9 +88,9 @@ discard block |
||
88 | 88 | $locale = new Localization(); |
89 | 89 | |
90 | 90 | if(get_magic_quotes_gpc() == 1) { |
91 | - $_REQUEST = array_map("stripslashes_checkstrings", $_REQUEST); |
|
92 | - $_POST = array_map("stripslashes_checkstrings", $_POST); |
|
93 | - $_GET = array_map("stripslashes_checkstrings", $_GET); |
|
91 | + $_REQUEST = array_map("stripslashes_checkstrings", $_REQUEST); |
|
92 | + $_POST = array_map("stripslashes_checkstrings", $_POST); |
|
93 | + $_GET = array_map("stripslashes_checkstrings", $_GET); |
|
94 | 94 | } |
95 | 95 | |
96 | 96 | |
@@ -109,53 +109,53 @@ discard block |
||
109 | 109 | /////////////////////////////////////////////////////////////////////////////// |
110 | 110 | //// INSTALLER LANGUAGE |
111 | 111 | function getSupportedInstallLanguages(){ |
112 | - $supportedLanguages = array( |
|
113 | - 'en_us' => 'English (US)', |
|
114 | - ); |
|
115 | - if(file_exists('install/lang.config.php')){ |
|
116 | - include('install/lang.config.php'); |
|
117 | - if(!empty($config['languages'])){ |
|
118 | - |
|
119 | - foreach($config['languages'] as $k=>$v){ |
|
120 | - if(file_exists('install/language/' . $k . '.lang.php')){ |
|
121 | - $supportedLanguages[$k] = $v; |
|
122 | - } |
|
123 | - } |
|
124 | - } |
|
125 | - } |
|
126 | - return $supportedLanguages; |
|
112 | + $supportedLanguages = array( |
|
113 | + 'en_us' => 'English (US)', |
|
114 | + ); |
|
115 | + if(file_exists('install/lang.config.php')){ |
|
116 | + include('install/lang.config.php'); |
|
117 | + if(!empty($config['languages'])){ |
|
118 | + |
|
119 | + foreach($config['languages'] as $k=>$v){ |
|
120 | + if(file_exists('install/language/' . $k . '.lang.php')){ |
|
121 | + $supportedLanguages[$k] = $v; |
|
122 | + } |
|
123 | + } |
|
124 | + } |
|
125 | + } |
|
126 | + return $supportedLanguages; |
|
127 | 127 | } |
128 | 128 | $supportedLanguages = getSupportedInstallLanguages(); |
129 | 129 | |
130 | 130 | // after install language is selected, use that pack |
131 | 131 | $default_lang = 'en_us'; |
132 | 132 | if(!isset($_POST['language']) && (!isset($_SESSION['language']) && empty($_SESSION['language']))) { |
133 | - if(isset($_SERVER['HTTP_ACCEPT_LANGUAGE']) && !empty($_SERVER['HTTP_ACCEPT_LANGUAGE'])) { |
|
134 | - $lang = parseAcceptLanguage(); |
|
135 | - if(isset($supportedLanguages[$lang])) { |
|
136 | - $_POST['language'] = $lang; |
|
137 | - } else { |
|
138 | - $_POST['language'] = $default_lang; |
|
139 | - } |
|
140 | - } |
|
133 | + if(isset($_SERVER['HTTP_ACCEPT_LANGUAGE']) && !empty($_SERVER['HTTP_ACCEPT_LANGUAGE'])) { |
|
134 | + $lang = parseAcceptLanguage(); |
|
135 | + if(isset($supportedLanguages[$lang])) { |
|
136 | + $_POST['language'] = $lang; |
|
137 | + } else { |
|
138 | + $_POST['language'] = $default_lang; |
|
139 | + } |
|
140 | + } |
|
141 | 141 | } |
142 | 142 | |
143 | 143 | if(isset($_POST['language'])) { |
144 | - $_SESSION['language'] = str_replace('-','_',$_POST['language']); |
|
144 | + $_SESSION['language'] = str_replace('-','_',$_POST['language']); |
|
145 | 145 | } |
146 | 146 | |
147 | 147 | $current_language = isset($_SESSION['language']) ? $_SESSION['language'] : $default_lang; |
148 | 148 | |
149 | 149 | if(file_exists("install/language/{$current_language}.lang.php")) { |
150 | - require_once("install/language/{$current_language}.lang.php"); |
|
150 | + require_once("install/language/{$current_language}.lang.php"); |
|
151 | 151 | } else { |
152 | - require_once("install/language/{$default_lang}.lang.php"); |
|
152 | + require_once("install/language/{$default_lang}.lang.php"); |
|
153 | 153 | } |
154 | 154 | |
155 | 155 | if($current_language != 'en_us') { |
156 | - $my_mod_strings = $mod_strings; |
|
157 | - include('install/language/en_us.lang.php'); |
|
158 | - $mod_strings = sugarLangArrayMerge($mod_strings, $my_mod_strings); |
|
156 | + $my_mod_strings = $mod_strings; |
|
157 | + include('install/language/en_us.lang.php'); |
|
158 | + $mod_strings = sugarLangArrayMerge($mod_strings, $my_mod_strings); |
|
159 | 159 | } |
160 | 160 | |
161 | 161 | $app_list_strings = return_app_list_strings_language($current_language); |
@@ -269,7 +269,7 @@ discard block |
||
269 | 269 | $errors = ''; |
270 | 270 | if( isset($validation_errors) && is_array($validation_errors)){ |
271 | 271 | if( count($validation_errors) > 0 ){ |
272 | - // $errors = '<div id="errorMsgs">'; |
|
272 | + // $errors = '<div id="errorMsgs">'; |
|
273 | 273 | $errors .= '<p>'.$mod_strings['LBL_SITECFG_FIX_ERRORS'].'</p><ul>'; |
274 | 274 | foreach( $validation_errors as $error ){ |
275 | 275 | $errors .= '<li class="error">' . $error . '</li>'; |
@@ -298,7 +298,7 @@ discard block |
||
298 | 298 | |
299 | 299 | //maintaining the install_type if earlier set to custom |
300 | 300 | if(isset($_REQUEST['install_type']) && $_REQUEST['install_type'] == 'custom'){ |
301 | - $_SESSION['install_type'] = $_REQUEST['install_type']; |
|
301 | + $_SESSION['install_type'] = $_REQUEST['install_type']; |
|
302 | 302 | } |
303 | 303 | |
304 | 304 | //set the default settings into session |
@@ -377,15 +377,15 @@ discard block |
||
377 | 377 | $_SESSION['cache_dir'] = isset($sugar_config['cache_dir']) ? $sugar_config['cache_dir'] : 'cache/'; |
378 | 378 | } |
379 | 379 | |
380 | - //$workflow[] = 'confirmSettings.php'; |
|
380 | + //$workflow[] = 'confirmSettings.php'; |
|
381 | 381 | $workflow[] = 'performSetup.php'; |
382 | 382 | |
383 | - if(!isset($_SESSION['oc_install']) || $_SESSION['oc_install'] == false){ |
|
383 | + if(!isset($_SESSION['oc_install']) || $_SESSION['oc_install'] == false){ |
|
384 | 384 | if(isset($_SESSION['install_type']) && !empty($_SESSION['install_type']) && $_SESSION['install_type']=='custom'){ |
385 | 385 | //$workflow[] = 'download_patches.php'; |
386 | 386 | $workflow[] = 'download_modules.php'; |
387 | 387 | } |
388 | - } |
|
388 | + } |
|
389 | 389 | |
390 | 390 | //$workflow[] = 'register.php'; |
391 | 391 | $workflow[] = 'complete_install.php'; |
@@ -409,7 +409,7 @@ discard block |
||
409 | 409 | case 'SilentInstall': |
410 | 410 | $next_step = 9999; |
411 | 411 | break; |
412 | - case 'oc_convert': |
|
412 | + case 'oc_convert': |
|
413 | 413 | $next_step = 9191; |
414 | 414 | break; |
415 | 415 | } |
@@ -464,9 +464,9 @@ discard block |
||
464 | 464 | |
465 | 465 | if(isset($next_step) && isset($workflow[$next_step]) && !in_array($workflow[$next_step],$exclude_files) && isset($sugar_config['installer_locked']) && $sugar_config['installer_locked'] == true) { |
466 | 466 | $the_file = 'installDisabled.php'; |
467 | - $disabled_title = $mod_strings['LBL_DISABLED_DESCRIPTION']; |
|
468 | - $disabled_title_2 = $mod_strings['LBL_DISABLED_TITLE_2']; |
|
469 | - $disabled_text =<<<EOQ |
|
467 | + $disabled_title = $mod_strings['LBL_DISABLED_DESCRIPTION']; |
|
468 | + $disabled_title_2 = $mod_strings['LBL_DISABLED_TITLE_2']; |
|
469 | + $disabled_text =<<<EOQ |
|
470 | 470 | <p>{$mod_strings['LBL_DISABLED_DESCRIPTION']}</p> |
471 | 471 | <pre> |
472 | 472 | 'installer_locked' => false, |
@@ -480,20 +480,20 @@ discard block |
||
480 | 480 | $validation_errors = array(); |
481 | 481 | // process the data posted |
482 | 482 | if($next_clicked) { |
483 | - // store the submitted data because the 'Next' button was clicked |
|
483 | + // store the submitted data because the 'Next' button was clicked |
|
484 | 484 | switch($workflow[trim($_REQUEST['current_step'])]) { |
485 | 485 | case 'welcome.php': |
486 | - $_SESSION['language'] = $_REQUEST['language']; |
|
487 | - $_SESSION['setup_site_admin_user_name'] = 'admin'; |
|
486 | + $_SESSION['language'] = $_REQUEST['language']; |
|
487 | + $_SESSION['setup_site_admin_user_name'] = 'admin'; |
|
488 | 488 | // break; |
489 | 489 | // case 'license.php': |
490 | 490 | $_SESSION['setup_license_accept'] = get_boolean_from_request('setup_license_accept'); |
491 | 491 | $_SESSION['license_submitted'] = true; |
492 | 492 | |
493 | 493 | |
494 | - // eventually default all vars here, with overrides from config.php |
|
494 | + // eventually default all vars here, with overrides from config.php |
|
495 | 495 | if(is_readable('config.php')) { |
496 | - global $sugar_config; |
|
496 | + global $sugar_config; |
|
497 | 497 | include_once('config.php'); |
498 | 498 | } |
499 | 499 | |
@@ -520,7 +520,7 @@ discard block |
||
520 | 520 | |
521 | 521 | //case 'systemOptions.php': |
522 | 522 | if(isset($_REQUEST['setup_db_type'])) { |
523 | - $_SESSION['setup_db_type'] = $_REQUEST['setup_db_type']; |
|
523 | + $_SESSION['setup_db_type'] = $_REQUEST['setup_db_type']; |
|
524 | 524 | } |
525 | 525 | $validation_errors = validate_systemOptions(); |
526 | 526 | if(count($validation_errors) > 0) { |
@@ -598,7 +598,7 @@ discard block |
||
598 | 598 | if($next_step == 9999) { |
599 | 599 | $the_file = 'SilentInstall'; |
600 | 600 | }else if($next_step == 9191) { |
601 | - $_SESSION['oc_server_url'] = $_REQUEST['oc_server_url']; |
|
601 | + $_SESSION['oc_server_url'] = $_REQUEST['oc_server_url']; |
|
602 | 602 | $_SESSION['oc_username'] = $_REQUEST['oc_username']; |
603 | 603 | $_SESSION['oc_password'] = $_REQUEST['oc_password']; |
604 | 604 | $the_file = 'oc_convert.php'; |
@@ -611,33 +611,33 @@ discard block |
||
611 | 611 | switch($the_file) { |
612 | 612 | case 'welcome.php': |
613 | 613 | case 'license.php': |
614 | - // |
|
615 | - // Check to see if session variables are working properly |
|
616 | - // |
|
617 | - $_SESSION['test_session'] = 'sessions are available'; |
|
614 | + // |
|
615 | + // Check to see if session variables are working properly |
|
616 | + // |
|
617 | + $_SESSION['test_session'] = 'sessions are available'; |
|
618 | 618 | @session_write_close(); |
619 | - unset($_SESSION['test_session']); |
|
619 | + unset($_SESSION['test_session']); |
|
620 | 620 | @session_start(); |
621 | 621 | |
622 | - if(!isset($_SESSION['test_session'])) |
|
623 | - { |
|
622 | + if(!isset($_SESSION['test_session'])) |
|
623 | + { |
|
624 | 624 | $the_file = 'installDisabled.php'; |
625 | - // PHP.ini location - |
|
626 | - $phpIniLocation = get_cfg_var("cfg_file_path"); |
|
627 | - $disabled_title = $mod_strings['LBL_SESSION_ERR_TITLE']; |
|
628 | - $disabled_title_2 = $mod_strings['LBL_SESSION_ERR_TITLE']; |
|
629 | - $disabled_text = $mod_strings['LBL_SESSION_ERR_DESCRIPTION']."<pre>{$phpIniLocation}</pre>"; |
|
625 | + // PHP.ini location - |
|
626 | + $phpIniLocation = get_cfg_var("cfg_file_path"); |
|
627 | + $disabled_title = $mod_strings['LBL_SESSION_ERR_TITLE']; |
|
628 | + $disabled_title_2 = $mod_strings['LBL_SESSION_ERR_TITLE']; |
|
629 | + $disabled_text = $mod_strings['LBL_SESSION_ERR_DESCRIPTION']."<pre>{$phpIniLocation}</pre>"; |
|
630 | 630 | break; |
631 | - } |
|
631 | + } |
|
632 | 632 | // check to see if installer has been disabled |
633 | 633 | if(is_readable('config.php') && (filesize('config.php') > 0)) { |
634 | 634 | include_once('config.php'); |
635 | 635 | |
636 | 636 | if(!isset($sugar_config['installer_locked']) || $sugar_config['installer_locked'] == true) { |
637 | 637 | $the_file = 'installDisabled.php'; |
638 | - $disabled_title = $mod_strings['LBL_DISABLED_DESCRIPTION']; |
|
639 | - $disabled_title_2 = $mod_strings['LBL_DISABLED_TITLE_2']; |
|
640 | - $disabled_text =<<<EOQ |
|
638 | + $disabled_title = $mod_strings['LBL_DISABLED_DESCRIPTION']; |
|
639 | + $disabled_title_2 = $mod_strings['LBL_DISABLED_TITLE_2']; |
|
640 | + $disabled_text =<<<EOQ |
|
641 | 641 | <p>{$mod_strings['LBL_DISABLED_DESCRIPTION']}</p> |
642 | 642 | <pre> |
643 | 643 | 'installer_locked' => false, |
@@ -646,12 +646,12 @@ discard block |
||
646 | 646 | |
647 | 647 | <p>{$mod_strings['LBL_DISABLED_HELP_1']} <a href="{$mod_strings['LBL_DISABLED_HELP_LNK']}" target="_blank">{$mod_strings['LBL_DISABLED_HELP_2']}</a>.</p> |
648 | 648 | EOQ; |
649 | - //if this is an offline client installation but the conversion did not succeed, |
|
650 | - //then try to convert again |
|
651 | - if(isset($sugar_config['disc_client']) && $sugar_config['disc_client'] == true && isset($sugar_config['oc_converted']) && $sugar_config['oc_converted'] == false) { |
|
652 | - header('Location: index.php?entryPoint=oc_convert&first_time=true'); |
|
653 | - exit (); |
|
654 | - } |
|
649 | + //if this is an offline client installation but the conversion did not succeed, |
|
650 | + //then try to convert again |
|
651 | + if(isset($sugar_config['disc_client']) && $sugar_config['disc_client'] == true && isset($sugar_config['oc_converted']) && $sugar_config['oc_converted'] == false) { |
|
652 | + header('Location: index.php?entryPoint=oc_convert&first_time=true'); |
|
653 | + exit (); |
|
654 | + } |
|
655 | 655 | } |
656 | 656 | } |
657 | 657 | break; |
@@ -736,7 +736,7 @@ discard block |
||
736 | 736 | } |
737 | 737 | } |
738 | 738 | break; |
739 | - } |
|
739 | + } |
|
740 | 740 | } |
741 | 741 | |
742 | 742 |
@@ -48,7 +48,7 @@ |
||
48 | 48 | global $mod_strings; |
49 | 49 | |
50 | 50 | $button = "<form id='ManageDelegatesForm' name='ManageDelegatesForm' method='post' action=''>"; |
51 | - // $button .= "<input id='custom_hidden_5' type='hidden' name='custom_hidden_5' value=''/>"; |
|
51 | + // $button .= "<input id='custom_hidden_5' type='hidden' name='custom_hidden_5' value=''/>"; |
|
52 | 52 | $button .= "<input id='Manage_Delegates' class='button' type='button' name='Manage_Delegates' onclick='manage_delegates()' value='".$mod_strings['LBL_MANAGE_DELEGATES']."'/>\n</form>"; |
53 | 53 | return $button; |
54 | 54 | } |
@@ -43,37 +43,37 @@ |
||
43 | 43 | |
44 | 44 | class SugarWidgetSubPanelEditSecurityGroupUserButton extends SugarWidgetField |
45 | 45 | { |
46 | - function displayHeaderCell(&$layout_def) |
|
47 | - { |
|
48 | - return ' '; |
|
49 | - } |
|
46 | + function displayHeaderCell(&$layout_def) |
|
47 | + { |
|
48 | + return ' '; |
|
49 | + } |
|
50 | 50 | |
51 | - function displayDetail($layout_def) { |
|
51 | + function displayDetail($layout_def) { |
|
52 | 52 | |
53 | - return displayList($layout_def); |
|
54 | - } |
|
53 | + return displayList($layout_def); |
|
54 | + } |
|
55 | 55 | |
56 | - function displayList(&$layout_def) |
|
57 | - { |
|
58 | - global $app_strings; |
|
59 | - global $image_path; |
|
56 | + function displayList(&$layout_def) |
|
57 | + { |
|
58 | + global $app_strings; |
|
59 | + global $image_path; |
|
60 | 60 | |
61 | - $href = 'index.php?module=SecurityGroups' |
|
62 | - . '&action=' . 'SecurityGroupUserRelationshipEdit' |
|
63 | - . '&record=' . $layout_def['fields']['SECURITYGROUP_NONINHERIT_ID'] |
|
64 | - . '&return_module=' . $_REQUEST['module'] |
|
65 | - . '&return_action=' . 'DetailView' |
|
66 | - . '&return_id=' . $_REQUEST['record']; |
|
61 | + $href = 'index.php?module=SecurityGroups' |
|
62 | + . '&action=' . 'SecurityGroupUserRelationshipEdit' |
|
63 | + . '&record=' . $layout_def['fields']['SECURITYGROUP_NONINHERIT_ID'] |
|
64 | + . '&return_module=' . $_REQUEST['module'] |
|
65 | + . '&return_action=' . 'DetailView' |
|
66 | + . '&return_id=' . $_REQUEST['record']; |
|
67 | 67 | |
68 | - $edit_icon_html = SugarThemeRegistry::current()->getImage( 'edit_inline', 'align="absmiddle" border="0"',null,null,'.gif',$app_strings['LNK_EDIT']); |
|
69 | - //based on listview since that lets you select records |
|
70 | - if($layout_def['ListView']){ |
|
71 | - return '<a href="' . $href . '"' |
|
72 | - . 'class="listViewTdToolsS1">' . $edit_icon_html . ' ' . $app_strings['LNK_EDIT'] .'</a> '; |
|
73 | - }else{ |
|
74 | - return ''; |
|
75 | - } |
|
76 | - } |
|
68 | + $edit_icon_html = SugarThemeRegistry::current()->getImage( 'edit_inline', 'align="absmiddle" border="0"',null,null,'.gif',$app_strings['LNK_EDIT']); |
|
69 | + //based on listview since that lets you select records |
|
70 | + if($layout_def['ListView']){ |
|
71 | + return '<a href="' . $href . '"' |
|
72 | + . 'class="listViewTdToolsS1">' . $edit_icon_html . ' ' . $app_strings['LNK_EDIT'] .'</a> '; |
|
73 | + }else{ |
|
74 | + return ''; |
|
75 | + } |
|
76 | + } |
|
77 | 77 | |
78 | 78 | } |
79 | 79 |
@@ -48,7 +48,7 @@ |
||
48 | 48 | global $mod_strings; |
49 | 49 | |
50 | 50 | $button = "<form id='ManageDelegatesForm' name='ManageDelegatesForm' method='post' action=''>"; |
51 | - // $button .= "<input id='custom_hidden_5' type='hidden' name='custom_hidden_5' value=''/>"; |
|
51 | + // $button .= "<input id='custom_hidden_5' type='hidden' name='custom_hidden_5' value=''/>"; |
|
52 | 52 | $button .= "<input id='Manage_Delegates' class='button' type='button' name='Manage_Delegates' onclick='manage_delegates()' value='".$mod_strings['LBL_MANAGE_DELEGATES']."'/>\n</form>"; |
53 | 53 | return $button; |
54 | 54 | } |
@@ -39,7 +39,7 @@ |
||
39 | 39 | // match all vars in equation, make sure all are passed |
40 | 40 | preg_match_all("!(?:0x[a-fA-F0-9]+)|([a-zA-Z][a-zA-Z0-9_]*)!",$equation, $match); |
41 | 41 | $allowed_funcs = array('int','abs','ceil','cos','exp','floor','log','log10', |
42 | - 'max','min','pi','pow','rand','round','sin','sqrt','srand','tan'); |
|
42 | + 'max','min','pi','pow','rand','round','sin','sqrt','srand','tan'); |
|
43 | 43 | |
44 | 44 | foreach($match[1] as $curr_var) { |
45 | 45 | if ($curr_var && !in_array($curr_var, array_keys($params)) && !in_array($curr_var, $allowed_funcs)) { |
@@ -23,10 +23,10 @@ discard block |
||
23 | 23 | */ |
24 | 24 | |
25 | 25 | $dictionary['AOR_Field'] = array( |
26 | - 'table'=>'aor_fields', |
|
27 | - 'audited'=>false, |
|
28 | - 'duplicate_merge'=>true, |
|
29 | - 'fields'=>array ( |
|
26 | + 'table'=>'aor_fields', |
|
27 | + 'audited'=>false, |
|
28 | + 'duplicate_merge'=>true, |
|
29 | + 'fields'=>array ( |
|
30 | 30 | 'aor_report_id' => |
31 | 31 | array ( |
32 | 32 | 'required' => false, |
@@ -338,8 +338,8 @@ discard block |
||
338 | 338 | 'fields' => array('aor_report_id'), |
339 | 339 | ), |
340 | 340 | ), |
341 | - 'optimistic_locking'=>true, |
|
342 | - 'unified_search'=>true, |
|
341 | + 'optimistic_locking'=>true, |
|
342 | + 'unified_search'=>true, |
|
343 | 343 | ); |
344 | 344 | if (!class_exists('VardefManager')){ |
345 | 345 | require_once('include/SugarObjects/VardefManager.php'); |
@@ -24,14 +24,14 @@ |
||
24 | 24 | */ |
25 | 25 | |
26 | 26 | $popupMeta = array('moduleMain' => 'AOR_Reports', |
27 | - 'varName' => 'AOR_Report', |
|
28 | - 'orderBy' => 'aor_reports.name', |
|
29 | - 'whereClauses' => |
|
30 | - array('name' => 'aor_reports.name', |
|
31 | - ), |
|
32 | - 'searchInputs'=> array('aor_reports_number', 'name', 'priority','status'), |
|
27 | + 'varName' => 'AOR_Report', |
|
28 | + 'orderBy' => 'aor_reports.name', |
|
29 | + 'whereClauses' => |
|
30 | + array('name' => 'aor_reports.name', |
|
31 | + ), |
|
32 | + 'searchInputs'=> array('aor_reports_number', 'name', 'priority','status'), |
|
33 | 33 | |
34 | - ); |
|
34 | + ); |
|
35 | 35 | ?> |
36 | 36 | |
37 | 37 |