コード例 #1
0
 /**
  * Sets up the fixture, for example, opens a network connection.
  * This method is called before a test is executed.
  */
 protected function setUp()
 {
     $this->m = Microblog::getInstance();
 }
コード例 #2
0
 public function __construct()
 {
     $this->logger = \Logger::getLogger(__CLASS__);
     $this->m = Microblog::getInstance();
 }
コード例 #3
0
 public function __construct()
 {
     $this->m = Microblog::getInstance();
 }
コード例 #4
0
require_once 'MainView.php';
require_once 'LoginView.php';
require_once 'SimpleTemplate.php';
require_once 'themes/blue/Templates.php';
// Init
set_magic_quotes_runtime(false);
$pageTitle = 'Microblog';
$pageAuthor = '';
// Improve security of session cookie
ini_set('session.use_only_cookies', 1);
ini_set('session.cookie_secure', 1);
ini_set('session.cookie_httponly', 1);
try {
    \Logger::configure('log4php.properties');
    $logger = \Logger::getLogger('index');
    $m = Microblog::getInstance();
    // Only start session and so set cookie after login
    if (isset($_COOKIE['PHPSESSID'])) {
        session_start();
    }
    // Input
    if (get_magic_quotes_gpc()) {
        $logger->debug('magic_quotes_gpc = On');
        $get = array_map('stripslashes', $_GET);
        // TODO Check
        $post = array_map('stripslashes', $_POST);
        // TODO Check
    } else {
        $logger->debug('magic_quotes_gpc = On');
        $get = $_GET;
        $post = $_POST;