~ubuntu-branches/ubuntu/utopic/phpldapadmin/utopic

« back to all changes in this revision

Viewing changes to lib/common.php

  • Committer: Package Import Robot
  • Author(s): Andrew Mitchell
  • Date: 2012-02-28 00:09:09 UTC
  • mfrom: (1.1.10) (3.1.14 sid)
  • Revision ID: package-import@ubuntu.com-20120228000909-p7bjlnxihxajde58
Tags: 1.2.2-2ubuntu1
* Merge from Debian testing.  Remaining changes:
  - Merged call to dh_install to install debian/additional-templates/*
  - added groupOfNames.xml
  - Adds php_value memory_limit 32M to the apache.conf.

Show diffs side-by-side

added added

removed removed

Lines of Context:
193
193
}
194
194
 
195
195
# Check for safe mode.
196
 
if (ini_get('safe_mode') && ! get_request('cmd','GET'))
 
196
if (@ini_get('safe_mode') && ! get_request('cmd','GET'))
197
197
        system_message(array(
198
198
        'title'=>_('PHP Safe Mode'),
199
199
        'body'=>_('You have PHP Safe Mode enabled. This application may work unexpectedly in Safe Mode.'),
215
215
                app_version(),$_REQUEST);
216
216
 
217
217
# Set our PHP timelimit.
218
 
if ($_SESSION[APPCONFIG]->getValue('session','timelimit') && ! ini_get('safe_mode'))
 
218
if ($_SESSION[APPCONFIG]->getValue('session','timelimit') && ! @ini_get('safe_mode'))
219
219
        set_time_limit($_SESSION[APPCONFIG]->getValue('session','timelimit'));
220
220
 
221
221
# If debug mode is set, increase the time_limit, since we probably need it.
222
 
if (DEBUG_ENABLED && $_SESSION[APPCONFIG]->getValue('session','timelimit') && ! ini_get('safe_mode'))
 
222
if (DEBUG_ENABLED && $_SESSION[APPCONFIG]->getValue('session','timelimit') && ! @ini_get('safe_mode'))
223
223
        set_time_limit($_SESSION[APPCONFIG]->getValue('session','timelimit') * 5);
224
224
 
225
225
/**
227
227
 * Shall we attempt to auto-determine the language?
228
228
 */
229
229
# If we are in safe mode, and LANG is not in the allowed vars, display an error.
230
 
if (ini_get('safe_mode') && ! in_array('LANG',explode(',',ini_get('safe_mode_allowed_env_vars'))))
 
230
if (@ini_get('safe_mode') && ! in_array('LANG',explode(',',@ini_get('safe_mode_allowed_env_vars'))))
231
231
        error('You are running in SAFE_MODE, but LANG is not in the safe_mode_allowed_env_vars. Please add LANG to safe_mode_allowed_env_vars','error',true,false);
232
232
 
233
233
$app['language'] = $_SESSION[APPCONFIG]->getValue('appearance','language');
296
296
 * Strip slashes from GET, POST, and COOKIE variables if this
297
297
 * PHP install is configured to automatically addslashes()
298
298
 */
299
 
if (get_magic_quotes_gpc() && (! isset($slashes_stripped) || ! $slashes_stripped)) {
 
299
if (@get_magic_quotes_gpc() && (! isset($slashes_stripped) || ! $slashes_stripped)) {
300
300
        array_stripslashes($_REQUEST);
301
301
        array_stripslashes($_GET);
302
302
        array_stripslashes($_POST);