Exemplo n.º 1
0
 public function testFilterPrefix()
 {
     $this->assertArrayNotHasKey("filtered", $this->stub->filterPrefix(array("key" => "val", "key2" => "val2", 'filtered' => "val3"), "key"));
 }
<?php

/**
 * $Id$
 *
 * @package    Mediboard
 * @subpackage System
 * @author     SARL OpenXtrem <*****@*****.**>
 * @license    GNU General Public License, see http://www.gnu.org/licenses/gpl.html
 * @version    $Revision$
 */
$object = mbGetObjectFromGet("object_class", "object_id", "object_guid");
// Look for view options
$options = CMbArray::filterPrefix($_GET, "view_");
$object->loadView();
// If no template is defined, use generic
$template = $object->makeTemplatePath("view");
$template = is_file("modules/{$template}") ? $template : "system/templates/CMbObject_view.tpl";
// Création du template
$smarty = new CSmartyDP();
$smarty->assign("object", $object);
$smarty->display("../../{$template}");