Code

Updated lists tests
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 13 Nov 2007 13:18:23 +0000 (13:18 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 13 Nov 2007 13:18:23 +0000 (13:18 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.6-playground@7789 594d385d-05f5-0310-b6e9-bd551577e9d8

tests/ListTest/1/index.php
tests/ListTest/2/index.php
tests/ListTest/3/index.php

index 79e7afcaff5c82551f018271ec70607e4134922a..4272f76ea21fbc064e0af1e72ad0216d412f0cb6 100644 (file)
@@ -1,3 +1,8 @@
+<?php
+require_once("../../../include/autoload.inc");
+restore_error_handler();
+session_start();
+?>
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html>
 <head>
@@ -7,10 +12,6 @@
 </head>
 <body>
 <button onclick='updateObjectListViewportSize();'>Tester</button>
-<a href="?d=hf">No Footer &amp; Header</a> - 
-<a href="?d=f">No Footer</a> - 
-<a href="?d=h">No Header</a> - 
-<a href="?d=">Normal</a> 
 <?php
 
 /* This is good for testing... */
@@ -37,23 +38,17 @@ function get_smarty()
 }
 
 
-/* Initiate autoloader... */
-require_once("../../../include/autoload.inc");
-restore_error_handler();
 try {
 
        /* Get new test instance of the Configuration */
        $cr= Registry::getInstance("ConfigManager");
        $cr->load("../../../gosa.conf");
 
-       /* Get a new test instance of ObjectListViewports */
-       $vp= new ObjectListViewport("plugin/sample");
-       if(isset($_GET['d']) && preg_match("/f/",$_GET['d'])){
-               $vp->enableFooter(FALSE);
-       }
-       if(isset($_GET['d']) && preg_match("/h/",$_GET['d'])){
-               $vp->enableHeader(FALSE);
-       }
+    /* Get a new test instance of ObjectListViewports */
+    if(!isset($_SESSION['vp3'])){
+        $_SESSION['vp3'] = new ObjectListViewport("plugin/sample",TRUE);
+    }
+    $vp = $_SESSION['vp3'];
        $content= $vp->render();
 
 } catch (Exception $e) {
@@ -63,7 +58,7 @@ try {
 }
 
 ?>
-    <table style='height:90%;width:90%;background-color: rgb(170, 170, 170);' cellspacing=1 cellpadding=0>
+    <table style='height:90%;width:90%;' cellpadding=0>
         <tr>
             <td>
                <?php echo $content; ?>
index bbfb491613ecef328fefa41cafdde643dd1c503e..fcab9584e8b9641d4bab85cf333bbda4b7cef663 100644 (file)
@@ -34,10 +34,6 @@ session_start();
 </head>
 <body>
 <button onclick='updateObjectListViewportSize();'>Tester</button>
-<a href="?d=hf">No Footer &amp; Header</a> - 
-<a href="?d=f">No Footer</a> - 
-<a href="?d=h">No Header</a> - 
-<a href="?d=">Normal</a> 
 <?php
 
 /* This is good for testing... */
@@ -77,12 +73,6 @@ try {
                $_SESSION['vp'] = new ObjectListViewport("plugin/sample");
        }
        $vp = $_SESSION['vp'];
-       if(isset($_GET['d']) && preg_match("/f/",$_GET['d'])){
-               $vp->enableFooter(FALSE);
-       }
-       if(isset($_GET['d']) && preg_match("/h/",$_GET['d'])){
-               $vp->enableHeader(FALSE);
-       }
        $content= $vp->render();
 
        echo preg_replace("/%LIST%/",$content,file_get_contents('tpl'));        
index 2e94d0a5b1c964d2cf9868be9bc5331312a0f4a0..b4dc71f04edae32c40c3d9608b47c2e2f0ea402e 100644 (file)
@@ -1,3 +1,8 @@
+<?php
+require_once("../../../include/autoload.inc");
+restore_error_handler();
+session_start();
+?>
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html>
 <head>
 </head>
 <body>
 <button onclick='updateObjectListViewportSize();'>Tester</button>
-<a href="?d=hf">No Footer &amp; Header</a> - 
-<a href="?d=f">No Footer</a> - 
-<a href="?d=h">No Header</a> - 
-<a href="?d=">Normal</a> 
 <?php
 
 /* This is good for testing... */
 error_reporting (E_ALL | E_STRICT);
 
-session_start();
-
 function get_smarty()
 {
     echo "Smarty fake in each ./tests/ListTest[1-9]/index.php";
@@ -62,8 +61,6 @@ function normalizePreg($input)
 
 
 /* Initiate autoloader... */
-require_once("../../../include/autoload.inc");
-restore_error_handler();
 try {
 
        /* Get new test instance of the Configuration */
@@ -78,15 +75,6 @@ try {
        }
        $vp1 = $_SESSION['vp1'];
        $vp2 = $_SESSION['vp2'];
-
-       if(isset($_GET['d']) && preg_match("/f/",$_GET['d'])){
-               $vp1->enableFooter(FALSE);
-               $vp2->enableFooter(FALSE);
-       }
-       if(isset($_GET['d']) && preg_match("/h/",$_GET['d'])){
-               $vp1->enableHeader(FALSE);
-               $vp2->enableHeader(FALSE);
-       }
        $content1= $vp1->render();
        $content2= $vp2->render();