~ubuntu-branches/ubuntu/jaunty/moodle/jaunty

« back to all changes in this revision

Viewing changes to admin/xmldb/index.php

  • Committer: Bazaar Package Importer
  • Author(s): Jordan Mantha, Matt Oquist
  • Date: 2009-02-25 15:16:22 UTC
  • mfrom: (1.1.11 upstream)
  • Revision ID: james.westby@ubuntu.com-20090225151622-0ekt1liwhv2obfza
Tags: 1.9.4.dfsg-0ubuntu1
* Merge with Debian git (Closes LP: #322961, #239481, #334611):
  - use Ubuntu's smarty lib directory for linking
  - use internal yui library 
  - add update-notifier support back in

[Matt Oquist]
  * renamed prerm script
  * significantly rewrote postinst and other maintainer scripts to improve
    user experience and package maintainability
    (Closes LP: #225662, #325450, #327843, #303078, #234609)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<?php // $Id: index.php,v 1.7.2.2 2007/02/25 20:21:44 stronk7 Exp $
 
1
<?php // $Id: index.php,v 1.9.2.1 2008/05/02 04:07:29 dongsheng Exp $
2
2
 
3
3
///////////////////////////////////////////////////////////////////////////
4
4
//                                                                       //
7
7
// Moodle - Modular Object-Oriented Dynamic Learning Environment         //
8
8
//          http://moodle.com                                            //
9
9
//                                                                       //
10
 
// Copyright (C) 2001-3001 Martin Dougiamas        http://dougiamas.com  //
 
10
// Copyright (C) 1999 onwards Martin Dougiamas        http://dougiamas.com  //
11
11
//           (C) 2001-3001 Eloy Lafuente (stronk7) http://contiento.com  //
12
12
//                                                                       //
13
13
// This program is free software; you can redistribute it and/or modify  //
53
53
    require_once('../../config.php');
54
54
    require_once($CFG->libdir.'/adminlib.php');
55
55
    require_once($CFG->libdir.'/ddllib.php'); // Install/upgrade related db functions
56
 
    $adminroot = admin_get_root();
57
 
    admin_externalpage_setup('xmldbeditor', $adminroot);
 
56
 
 
57
    admin_externalpage_setup('xmldbeditor');
58
58
 
59
59
/// Add other used libraries
60
60
    require_once($CFG->libdir . '/xmlize.php');
79
79
    }
80
80
 
81
81
    require_login();
82
 
    require_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM, SITEID));
 
82
    require_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM));
83
83
 
84
84
/// Body of the script, based on action, we delegate the work
85
85
    $action = optional_param ('action', 'main_view', PARAM_ALPHAEXT);
105
105
                        $standard_javascript = $CFG->javascript;  // Save original javascript file
106
106
                        $CFG->javascript = $CFG->dirroot.'/'.$CFG->admin.'/xmldb/javascript.php';  //Use our custom javascript code
107
107
                    /// Go with standard admin header
108
 
                        admin_externalpage_print_header($adminroot);
 
108
                        admin_externalpage_print_header();
109
109
                        print_heading($xmldb_action->getTitle());
110
110
                        echo $xmldb_action->getOutput();
111
 
                        admin_externalpage_print_footer($adminroot);
 
111
                        admin_externalpage_print_footer();
112
112
                        break;
113
113
                    case ACTION_GENERATE_XML:
114
114
                        header('Content-type: application/xhtml+xml');