commit c6b2c8d40a1bd05a883388540c04d9a9bddb0e2a
parent ae637b579de18851f3ef7cb2a6a787c3b6ca814f
Author: dankert <devnull@localhost>
Date: Sat, 22 Dec 2007 01:21:41 +0100
Funktion f?r Projektbeispiel entfernt.
Diffstat:
2 files changed, 11 insertions(+), 34 deletions(-)
diff --git a/actionClasses/ProjectAction.class.php b/actionClasses/ProjectAction.class.php
@@ -20,6 +20,9 @@
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
// ---------------------------------------------------------------------------
// $Log$
+// Revision 1.18 2007-12-22 00:21:41 dankert
+// Funktion f?r Projektbeispiel entfernt.
+//
// Revision 1.17 2007-12-21 23:27:53 dankert
// Felder mit Namen versehen. Beim Anlegen von Projekten Beispiel-Projekte ausw?hlen.
//
@@ -125,18 +128,6 @@ class ProjectAction extends Action
function add()
{
$this->setTemplateVar( 'projects',Project::getAll() );
-
- $examples = array();
- $dir = opendir( 'examples/projects');
- while( $file = readdir($dir) )
- {
- if ( substr($file,0,1) != '.' && ereg('.ini',$file) )
- {
- $examples[$file] = $file;
- }
- }
-
- $this->setTemplateVar( 'examples',$examples );
}
@@ -146,21 +137,23 @@ class ProjectAction extends Action
*/
function addproject()
{
- if ( !$this->hasRequestVar('name') )
- {
- $this->addValidationError('name');
- $this->callSubAction('add');
- }
- elseif ( !$this->hasRequestVar('type') )
+ if ( !$this->hasRequestVar('type') )
{
$this->addValidationError('type');
$this->callSubAction('add');
+ return;
}
else
{
switch( $this->getRequestVar('type') )
{
case 'empty':
+ if ( !$this->hasRequestVar('name') )
+ {
+ $this->addValidationError('name');
+ $this->callSubAction('add');
+ return;
+ }
$this->project = new Project();
$this->project->name = $this->getRequestVar('name');
$this->project->add();
@@ -171,14 +164,6 @@ class ProjectAction extends Action
$project->load();
$project->export($db->id);
break;
- case 'example':
- $this->project = new Project();
- $this->project->name = $this->getRequestVar('name');
- $this->project->add();
-
- $example = parse_ini_file('examples/projects/'.$this->getRequestVar('example'),true);
-
- break;
default:
Http::serverError('Unknown type while adding project '.$this->getRequestVar('type') );
}
diff --git a/themes/default/templates/project/add.tpl.src.php b/themes/default/templates/project/add.tpl.src.php
@@ -24,14 +24,6 @@ page
text text:message:copy
cell
selectbox name:projectid list:projects
- row
- cell
- radio name:type value:example
- cell
- label for:type_example
- text text:message:example
- cell
- selectbox name:example list:examples
row
cell class:act colspan:3
button type:ok