Exemplo n.º 1
0
 /**
  * Tests the order of handlers is the same before and after saving.
  */
 public function testHandlerWeights()
 {
     $handler_types = array('fields', 'filters', 'sorts');
     $view = Views::getView('test_view_handler_weight');
     $view->initDisplay();
     // Store the order of handlers before saving the view.
     $original_order = array();
     foreach ($handler_types as $type) {
         $original_order[$type] = array_keys($view->display_handler->getOption($type));
     }
     // Save the view and see if our filters are in the same order.
     $view->save();
     $view = views::getView('test_view_handler_weight');
     $view->initDisplay();
     foreach ($handler_types as $type) {
         $loaded_order = array_keys($view->display_handler->getOption($type));
         $this->assertIdentical($original_order[$type], $loaded_order);
     }
 }
Exemplo n.º 2
0
 public function __construct()
 {
     parent::__construct();
 }
Exemplo n.º 3
0
	public function __construct() {
		parent::__construct();

		
                $this->messages = Message::getInstance();
	}
Exemplo n.º 4
0
 public static function dump()
 {
     self::$stack = array();
 }
Exemplo n.º 5
0
<?
include 'models/views.php';
include 'models/dbinfo.php';

$views = new views();
$dbinfo = new dbinfo();
session_start();

if(!empty($_GET["action"])){


	if($_GET["action"]=="login"){
		
		$data = $dbinfo->checkLogin($_POST["email"],$_POST["password"]);
	
		if($data){
			
			$_SESSION["isloggedin"] = 1;
			$_SESSION["userid"] = $data[0]["userid"];
			$_SESSION["postuser"] = $data[0]["username"];
			$data = $dbinfo->getUser($_SESSION["userid"]);
	 		$edata = $dbinfo->getUserPosts($_SESSION["postuser"]);
		
	 		$views->getView("views/header.php");
	 		$views->getView("views/profile.php",$data,$edata);
	 		$views->getView("views/footer.php");
		
		}else{

			session_unset(); 
			session_destroy();