Example #1
0
 public function importFromFile(Tracker $tracker, $xml_file_path)
 {
     $xml_security = new XML_Security();
     $xml = $xml_security->loadFile($xml_file_path);
     $xml_file_path = "";
     $this->importFromXML($tracker, $xml, $xml_file_path);
 }
Example #2
0
 public function importFromFile(Tracker $tracker, $xml_file_path)
 {
     $xml_security = new XML_Security();
     $xml = $xml_security->loadFile($xml_file_path);
     $xml_file_path = "";
     $xml_field_mapping = new TrackerXmlFieldsMapping_InSamePlatform();
     $this->importFromXML($tracker, $xml, $xml_file_path, $xml_field_mapping);
 }
Example #3
0
 public function load_conf($conf_xml_file)
 {
     if (!file_exists($conf_xml_file)) {
         throw new Exception("Unable to load configuration file {$conf_xml_file}.", 3017);
     }
     $xml_security = new XML_Security();
     $xml = $xml_security->loadFile($conf_xml_file);
     if (!$xml) {
         throw new Exception("Unable to load configuration file {$conf_xml_file}.", 3017);
     } else {
         $this->server = "" . $xml->server["name"];
         $this->server_dns = "" . $xml->server->server_uri;
         $this->server_port = "" . $xml->server->server_port;
         $this->webadmin_unsec_port = "" . $xml->webadmin->unsecure_port;
         $this->webadmin_sec_port = "" . $xml->webadmin->secure_port;
         $this->username = "" . $xml->auth->username;
         $this->user_pwd = "" . $xml->auth->user_pwd;
         $this->lockmuc_pwd = "" . $xml->auth->lockmuc_pwd;
         $this->helga_bot = "" . $xml->helga->helga_bot;
         $this->helga_service = "" . $xml->helga->helga_service;
         $this->group_mng_active = "" . $xml->group_mng->active;
     }
 }
 /**
  *
  * @param type $group_id
  * @param type $filepath
  * @param type $name
  * @param type $description
  * @param type $item_name
  *
  * @throws TrackerFromXmlException
  * @return Tracker
  */
 public function createFromXMLFileWithInfo($group_id, $filepath, $name, $description, $item_name)
 {
     $xml_security = new XML_Security();
     $tracker_xml = $xml_security->loadFile($filepath);
     if ($tracker_xml) {
         return $this->createFromXML($tracker_xml, $group_id, $name, $description, $item_name);
     }
 }
Example #5
0
/*
 * Copyright (c) Enalean, 2011. All Rights Reserved.
 *
 * This file is a part of Tuleap.
 *
 * Tuleap is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * Tuleap is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with Tuleap. If not, see <http://www.gnu.org/licenses/>.
 */
require_once 'common/autoload.php';
if ($files = glob('*.xml')) {
    echo '<ul>';
    foreach ($files as $filename) {
        $xml_security = new XML_Security();
        $xml = $xml_security->loadFile($filename);
        echo '<li><p>';
        echo '<strong><a href="' . $filename . '">' . $xml->name . '</a></strong><br/>';
        echo '' . $xml->description . '</p>';
        echo '</li>';
    }
    echo '</ul>';
}