merge r4005 from branch 2.0 to trunk

bug 1187: set_magic_quote_runtime and get_magic_quote_gpc are depreciated and can produce notices from PHP 5.3.
Add a @ to avoid this notices.
This functions need to be removed with PHP 6

git-svn-id: http://piwigo.org/svn/trunk@4006 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
patdenice 2009-10-09 14:41:30 +00:00
commit f83b8815c6
3 changed files with 3 additions and 3 deletions

View file

@ -136,7 +136,7 @@ function check_upgrade_access_rights($current_release, $username, $password)
{ {
global $conf, $page; global $conf, $page;
if(!get_magic_quotes_gpc()) if(!@get_magic_quotes_gpc())
{ {
$username = mysql_real_escape_string($username); $username = mysql_real_escape_string($username);
} }

View file

@ -34,7 +34,7 @@ $t2 = $t1[1].'.'.$t2[1];
// addslashes to vars if magic_quotes_gpc is off this is a security // addslashes to vars if magic_quotes_gpc is off this is a security
// precaution to prevent someone trying to break out of a SQL statement. // precaution to prevent someone trying to break out of a SQL statement.
// //
if( !get_magic_quotes_gpc() ) if( !@get_magic_quotes_gpc() )
{ {
function sanitize_mysql_kv(&$v, $k) function sanitize_mysql_kv(&$v, $k)
{ {

View file

@ -77,7 +77,7 @@ function execute_sqlfile($filepath, $replaced, $replacing)
// addslashes to vars if magic_quotes_gpc is off this is a security // addslashes to vars if magic_quotes_gpc is off this is a security
// precaution to prevent someone trying to break out of a SQL statement. // precaution to prevent someone trying to break out of a SQL statement.
// //
if( !get_magic_quotes_gpc() ) if( !@get_magic_quotes_gpc() )
{ {
if( is_array($_POST) ) if( is_array($_POST) )
{ {