~automne-team/automne/4.2

« back to all changes in this revision

Viewing changes to automne/admin/tree-lineage.php

  • Committer: sebastien
  • Date: 2008-11-26 17:12:36 UTC
  • Revision ID: sebastien_sebastien-20081126171236-16r3kxfuz2kmq2qe
Tags: V4_0_0a0
4.0.0a0 :
Initial import

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?php
 
2
/* vim: set expandtab tabstop=4 shiftwidth=4: */
 
3
// +----------------------------------------------------------------------+
 
4
// | Automne (TM)                                                                                                                 |
 
5
// +----------------------------------------------------------------------+
 
6
// | Copyright (c) 2000-2009 WS Interactive                                                               |
 
7
// +----------------------------------------------------------------------+
 
8
// | Automne is subject to version 2.0 or above of the GPL license.               |
 
9
// | The license text is bundled with this package in the file                    |
 
10
// | LICENSE-GPL, and is available through the world-wide-web at                  |
 
11
// | http://www.gnu.org/copyleft/gpl.html.                                                                |
 
12
// +----------------------------------------------------------------------+
 
13
// | Author: S�bastien Pauchet <sebastien.pauchet@ws-interactive.fr>      |
 
14
// +----------------------------------------------------------------------+
 
15
//
 
16
// $Id: tree-lineage.php,v 1.1.1.1 2008/11/26 17:12:05 sebastien Exp $
 
17
 
 
18
/**
 
19
  * PHP page : Load tree window infos
 
20
  * Used accross an Ajax request render page tree in the tree window
 
21
  *
 
22
  * @package CMS
 
23
  * @subpackage admin
 
24
  * @author S�bastien Pauchet <sebastien.pauchet@ws-interactive.fr>
 
25
  */
 
26
 
 
27
require_once($_SERVER["DOCUMENT_ROOT"]."/cms_rc_admin.php");
 
28
 
 
29
//load interface instance
 
30
$view = CMS_view::getInstance();
 
31
//set default display mode for this page
 
32
$view->setDisplayMode(CMS_view::SHOW_JSON);
 
33
 
 
34
$rootId = (int) sensitiveIO::request('root', 'sensitiveIO::isPositiveInteger', APPLICATION_ROOT_PAGE_ID);
 
35
$nodeId = (int) sensitiveIO::request('node', 'sensitiveIO::isPositiveInteger', APPLICATION_ROOT_PAGE_ID);
 
36
$lineage = CMS_tree::getLineage($rootId, $nodeId, false);
 
37
if (!$lineage) {
 
38
        $lineage = array();
 
39
}
 
40
$view->setContent($lineage);
 
41
$view->show();
 
42
?>
 
 
b'\\ No newline at end of file'