Beispiel #1
0
 public function enterAction()
 {
     $bug = new Bugs();
     $bug->summary = $_POST["summary"];
     $bug->description = $_POST["description"];
     $bug->status = "NEW";
     $accountsTable = Doctrine_Core::getTable("Accounts");
     $auth = Zend_Auth::getInstance();
     if ($auth && $auth->hasIdentity()) {
         $bug->reported_by = $auth->getIdentity();
     }
     $bug->save();
 }
 function addsubmitAction()
 {
     if ($this->request->isPost() !== false) {
         $bugs = new Bugs();
         $system_id = $this->request->getPost('system_id');
         $bugs->date_found = $this->request->getPost('date_found');
         $bugs->system_id = $system_id;
         $bugs->modules_id = $this->request->getPost('modules_id');
         $bugs->number = $this->request->getPost('number');
         $bugs->description = $this->request->getPost('description');
         $bugs->is_solved = $this->request->getPost('is_solved');
         $bugs->created_at = date('Y-m-d H:i:s');
         $bugs->created_by = 105;
         if ($bugs->save() == false) {
             foreach ($bugs->getMessages() as $message) {
                 $this->flash->error((string) $message);
             }
         } else {
             $this->flash->success('Add New Bug Success');
             $this->response->redirect('bugs/system/' . $system_id);
         }
     }
 }
Beispiel #3
0
<?php

$bugsTable = Doctrine_Core::getTable('Bugs');
$bugsTable->find(1234);
$bug = new Bugs();
$bug->summary = "Crashes when I save";
$bug->save();