mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-01 20:29:29 +00:00
Mantis Schnittstellen
This commit is contained in:
@@ -160,4 +160,41 @@ class mantis extends basis_db
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Projekte holen
|
||||
*/
|
||||
public function getProjects()
|
||||
{
|
||||
$params=array('username' => MANTIS_USERNAME, 'password' => MANTIS_PASSWORT);
|
||||
$result = $this->soapClient->__soapCall('mc_projects_get_user_accessible',$params);
|
||||
|
||||
foreach($result as $row)
|
||||
{
|
||||
$obj = new mantis();
|
||||
$obj->issue_project->name = $row->name;
|
||||
$obj->issue_project->id = $row->id;
|
||||
|
||||
$this->result[] = $obj;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Kategorien holen
|
||||
*/
|
||||
public function getCategories($project_id)
|
||||
{
|
||||
$params=array('username' => MANTIS_USERNAME, 'password' => MANTIS_PASSWORT, 'project_id'=>$project_id);
|
||||
$result = $this->soapClient->__soapCall('mc_project_get_categories',$params);
|
||||
|
||||
foreach($result as $val)
|
||||
{
|
||||
$obj = new mantis();
|
||||
$obj->issue_category = $val;
|
||||
|
||||
$this->result[] = $obj;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
/* Copyright (C) 2006 Technikum-Wien
|
||||
*
|
||||
* This program 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.
|
||||
*
|
||||
* This program 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 this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* Authors: Andreas Österreicher <andreas.oesterreicher@technikum-wien.at>
|
||||
*/
|
||||
require_once('../config/vilesci.config.inc.php');
|
||||
require_once('../include/rdf.class.php');
|
||||
require_once('../include/mantis.class.php');
|
||||
|
||||
if(!isset($_GET['project_id']))
|
||||
die('Missing Parameter: Project_id');
|
||||
|
||||
$project_id=$_GET['project_id'];
|
||||
|
||||
$oRdf = new rdf('MANTIS_CATEGORIES','http://www.technikum-wien.at/mantis_categories');
|
||||
$oRdf->sendHeader();
|
||||
|
||||
$mantis = new mantis();
|
||||
$mantis->getCategories($project_id);
|
||||
|
||||
foreach($mantis->result as $row)
|
||||
{
|
||||
$i=$oRdf->newObjekt($row->issue_category);
|
||||
$oRdf->obj[$i]->setAttribut('category',$row->issue_category,true);
|
||||
|
||||
$oRdf->addSequence($row->issue_category);
|
||||
}
|
||||
|
||||
$oRdf->sendRdfText();
|
||||
?>
|
||||
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
/* Copyright (C) 2006 Technikum-Wien
|
||||
*
|
||||
* This program 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.
|
||||
*
|
||||
* This program 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 this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* Authors: Andreas Österreicher <andreas.oesterreicher@technikum-wien.at>
|
||||
*/
|
||||
require_once('../config/vilesci.config.inc.php');
|
||||
require_once('../include/rdf.class.php');
|
||||
require_once('../include/mantis.class.php');
|
||||
|
||||
$oRdf = new rdf('MANTIS_PROJECT','http://www.technikum-wien.at/mantis_project');
|
||||
$oRdf->sendHeader();
|
||||
|
||||
$mantis = new mantis();
|
||||
$mantis->getProjects();
|
||||
|
||||
foreach($mantis->result as $row)
|
||||
{
|
||||
$i=$oRdf->newObjekt($row->issue_project->id);
|
||||
$oRdf->obj[$i]->setAttribut('id',$row->issue_project->id,true);
|
||||
$oRdf->obj[$i]->setAttribut('name',$row->issue_project->name,true);
|
||||
|
||||
$oRdf->addSequence($row->issue_project->id);
|
||||
}
|
||||
|
||||
$oRdf->sendRdfText();
|
||||
?>
|
||||
Reference in New Issue
Block a user