当前位置: 首页>>代码示例>>PHP>>正文


PHP Attachments::resetAttachments方法代码示例

本文整理汇总了PHP中Attachments::resetAttachments方法的典型用法代码示例。如果您正苦于以下问题:PHP Attachments::resetAttachments方法的具体用法?PHP Attachments::resetAttachments怎么用?PHP Attachments::resetAttachments使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Attachments的用法示例。


在下文中一共展示了Attachments::resetAttachments方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: executeDelete

 public function executeDelete(sfWebRequest $request)
 {
     $request->checkCSRFProtection();
     $this->forward404Unless($projects = Doctrine_Core::getTable('Projects')->createQuery()->addWhere('id=?', $request->getParameter('projects_id'))->fetchOne(), sprintf('Object projects does not exist (%s).', $request->getParameter('projects_id')));
     $this->checkProjectsAccess($projects);
     Users::checkAccess($this, 'delete', 'projectsComments', $this->getUser(), $projects->getId());
     $this->forward404Unless($projects_comments = Doctrine_Core::getTable('ProjectsComments')->find(array($request->getParameter('id'))), sprintf('Object projects_comments does not exist (%s).', $request->getParameter('id')));
     $this->checkViewOwnAccess($projects_comments, $projects);
     $projects_comments->delete();
     Attachments::resetAttachments();
     $this->redirect('projectsComments/index?projects_id=' . $projects_comments->getProjectsId());
 }
开发者ID:noikiy,项目名称:qdpm,代码行数:12,代码来源:actions.class.php

示例2: executeDoMultipleDelete

 public function executeDoMultipleDelete(sfWebRequest $request)
 {
     $access = Users::getAccessSchema($request->getParameter('table'), $this->getUser());
     if (!$access['delete']) {
         $this->redirect('accessForbidden/index');
     }
     if ($selected_items = $request->getParameter('selected_items')) {
         if (strlen($selected_items) > 0) {
             Doctrine_Query::create()->delete()->from($request->getParameter('table'))->whereIn('id', explode(',', $selected_items))->execute();
             Attachments::resetAttachments();
         }
     }
     $this->redirect($request->getParameter('table') . '/index' . (($projects_id = $request->getParameter('projects_id')) > 0 ? '?projects_id=' . $projects_id : ''));
 }
开发者ID:noikiy,项目名称:qdpm,代码行数:14,代码来源:actions.class.php

示例3: executeDelete

 public function executeDelete(sfWebRequest $request)
 {
     if ($request->getParameter('projects_id') > 0) {
         $this->forward404Unless($projects = Doctrine_Core::getTable('Projects')->createQuery()->addWhere('id=?', $request->getParameter('projects_id'))->fetchOne(), sprintf('Object projects does not exist (%s).', $request->getParameter('projects_id')));
         $this->forward404Unless($tickets = Doctrine_Core::getTable('Tickets')->createQuery()->addWhere('id=?', $request->getParameter('id'))->addWhere('projects_id=?', $request->getParameter('projects_id'))->fetchOne(), sprintf('Object tickets does not exist (%s).', $request->getParameter('id')));
         $this->checkProjectsAccess($projects);
         $this->checkTicketsAccess('delete', $tickets, $projects);
     } else {
         $this->forward404Unless($tickets = Doctrine_Core::getTable('Tickets')->find(array($request->getParameter('id'))), sprintf('Object tickets does not exist (%s).', $request->getParameter('id')));
         $this->checkTicketsAccess('delete', $tickets);
     }
     $tickets->delete();
     Attachments::resetAttachments();
     $this->redirect_to($request->getParameter('redirect_to'), $tickets->getProjectsId(), $tickets->getId(), $request);
 }
开发者ID:noikiy,项目名称:qdpm,代码行数:15,代码来源:actions.class.php

示例4: executeDelete

 public function executeDelete(sfWebRequest $request)
 {
     $this->forward404Unless($projects = Doctrine_Core::getTable('Projects')->createQuery()->addWhere('id=?', $request->getParameter('projects_id'))->fetchOne(), sprintf('Object projects does not exist (%s).', $request->getParameter('projects_id')));
     $this->forward404Unless($discussions = Doctrine_Core::getTable('Discussions')->createQuery()->addWhere('id=?', $request->getParameter('id'))->addWhere('projects_id=?', $request->getParameter('projects_id'))->fetchOne(), sprintf('Object discussions does not exist (%s).', $request->getParameter('id')));
     $this->checkProjectsAccess($projects);
     $this->checkDiscussionsAccess('delete', $discussions, $projects);
     $discussions->delete();
     Attachments::resetAttachments();
     $this->redirect_to($request->getParameter('redirect_to'), $discussions->getProjectsId(), $discussions->getId());
 }
开发者ID:noikiy,项目名称:qdpm,代码行数:10,代码来源:actions.class.php

示例5: executeDelete

 public function executeDelete(sfWebRequest $request)
 {
     $request->checkCSRFProtection();
     $this->forward404Unless($projects = Doctrine_Core::getTable('Projects')->find(array($request->getParameter('id'))), sprintf('Object projects does not exist (%s).', $request->getParameter('id')));
     $this->checkProjectsAccess('delete', $projects);
     $projects->delete();
     Attachments::resetAttachments();
     $this->redirect('projects/index');
 }
开发者ID:noikiy,项目名称:qdpm,代码行数:9,代码来源:actions.class.php

示例6: executeDelete

 public function executeDelete(sfWebRequest $request)
 {
     $this->forward404Unless($projects = Doctrine_Core::getTable('Projects')->createQuery()->addWhere('id=?', $request->getParameter('projects_id'))->fetchOne(), sprintf('Object projects does not exist (%s).', $request->getParameter('projects_id')));
     $this->forward404Unless($tasks = Doctrine_Core::getTable('Tasks')->createQuery()->addWhere('id=?', $request->getParameter('id'))->addWhere('projects_id=?', $request->getParameter('projects_id'))->fetchOne(), sprintf('Object tasks does not exist (%s).', $request->getParameter('id')));
     $this->checkProjectsAccess($projects);
     $this->checkTasksAccess('delete', $tasks, $projects);
     $tasks->delete();
     Attachments::resetAttachments();
     $this->redirect('tasks/index' . $this->add_pid($request));
 }
开发者ID:noikiy,项目名称:qdpm,代码行数:10,代码来源:actions.class.php

示例7: executeDelete

 public function executeDelete(sfWebRequest $request)
 {
     $request->checkCSRFProtection();
     if ($request->getParameter('projects_id') > 0) {
         $this->forward404Unless($this->projects = Doctrine_Core::getTable('Projects')->createQuery()->addWhere('id=?', $request->getParameter('projects_id'))->fetchOne(), sprintf('Object projects does not exist (%s).', $request->getParameter('projects_id')));
         $this->forward404Unless($this->tickets = Doctrine_Core::getTable('Tickets')->createQuery()->addWhere('id=?', $request->getParameter('tickets_id'))->addWhere('projects_id=?', $request->getParameter('projects_id'))->fetchOne(), sprintf('Object tasks does not exist (%s).', $request->getParameter('tickets_id')));
         $this->checkProjectsAccess($this->projects);
         $this->checkTicketsAccess('view', $this->tickets, $this->projects);
     } else {
         $this->forward404Unless($this->tickets = Doctrine_Core::getTable('Tickets')->find($request->getParameter('tickets_id')), sprintf('Object tasks does not exist (%s).', $request->getParameter('tickets_id')));
         $this->checkTicketsAccess('view', $this->tickets);
     }
     Users::checkAccess($this, 'delete', 'ticketsComments', $this->getUser(), $request->getParameter('projects_id'));
     $this->forward404Unless($tickets_comments = Doctrine_Core::getTable('TicketsComments')->find(array($request->getParameter('id'))), sprintf('Object tickets_comments does not exist (%s).', $request->getParameter('id')));
     $tickets_comments->delete();
     Attachments::resetAttachments();
     $this->redirect('ticketsComments/index?tickets_id=' . $request->getParameter('tickets_id') . ($request->getParameter('projects_id') > 0 ? '&projects_id=' . $request->getParameter('projects_id') : ''));
 }
开发者ID:noikiy,项目名称:qdpm,代码行数:18,代码来源:actions.class.php


注:本文中的Attachments::resetAttachments方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。