Migration SVN

This commit is contained in:
2016-02-21 14:28:40 +01:00
commit df45f10305
1455 changed files with 20440 additions and 0 deletions

49
system/api/security.api.php Executable file
View File

@@ -0,0 +1,49 @@
<?php
/**
* @class security
* @brief Manage, verify the security of the panel
*
* @author Benjamin Mercier
* @data 08/03/2009
* @version 0.1
*/
class security
{
/**
* @brief Make security controls
* @return NULL (but make exception if error is find
*/
public function __construct ()
{
// Critical verification
$this->checkMagicQuotesGPC();
// Configuration
$this->initializeTimezone();
} // End of construct
/**
* @brief Check magic_quote_gpc. If is activated, throwing exception.
* @return null
*/
private function checkMagicQuotesGPC()
{
if ( get_magic_quotes_gpc() == 1 ) {
throw new myException('PHP variable magic_quotes_gpc must be set on Off');
}
}
/**
* @brief Initialize the timezone if not set
* @return null
*/
private function initializeTimezone()
{
date_default_timezone_set(TIMEZONE);
}
} // End of class
?>