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


PHP Attachments::clearTmpUploadedFiles方法代码示例

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


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

示例1: executeAttachments

 public function executeAttachments()
 {
     Attachments::clearTmpUploadedFiles($this->getUser());
     $q = Doctrine_Core::getTable('Attachments')->createQuery()->addWhere('bind_id=?', $this->bind_id)->addWhere('bind_type=?', $this->bind_type)->orderBy('id');
     if ($this->bind_id > 0) {
         $q->addWhere("bind_id='" . $this->bind_id . "' or (bind_id='-" . $this->getUser()->getAttribute('id') . "')");
     } else {
         $q->addWhere("bind_id='-" . $this->getUser()->getAttribute('id') . "'");
     }
     $this->attachments = $q->execute();
 }
开发者ID:noikiy,项目名称:qdpm,代码行数:11,代码来源:components.class.php

示例2: doUserLogin

 public function doUserLogin($user, $request)
 {
     $this->getUser()->setAttribute('id', $user->getId());
     $this->getUser()->setAttribute('users_group_id', $user->getUsersGroupId());
     $this->getUser()->setAttribute('user', $user);
     $this->getUser()->setAuthenticated(true);
     Attachments::clearTmpUploadedFiles($this->getUser());
     $this->getUser()->setCulture($user->getCulture());
     if (strlen($user->getSkin()) > 0) {
         $this->getResponse()->setCookie('skin', $user->getSkin(), time() + 31536000, '', '');
     }
     $ug = $user->getUsersGroups();
     if ($ug->getAllowManageProjects() > 0) {
         $this->getUser()->addCredential('reports_access_projects');
     }
     if ($ug->getAllowManageTasks() > 0) {
         $this->getUser()->addCredential('reports_access_tasks');
         $this->getUser()->addCredential('reports_access_time');
         $this->getUser()->addCredential('reports_access_time_personal');
         $this->getUser()->addCredential('reports_access_gantt');
     }
     if ($ug->getAllowManageTickets() > 0) {
         $this->getUser()->addCredential('reports_access_tickets');
     }
     if ($ug->getAllowManageDiscussions() > 0) {
         $this->getUser()->addCredential('reports_access_discussions');
     }
     if ($ug->getAllowManageUsers() == 1) {
         $this->getUser()->addCredential('allow_manage_users');
     }
     if ($ug->getAllowManageConfiguration() == 1) {
         $this->getUser()->addCredential('allow_manage_configuration');
     }
     $this->getUser()->addCredential('allow_manage_personal_scheduler');
     if (strlen($request->getParameter('http_referer')) > 0) {
         $this->redirect($request->getParameter('http_referer'));
     } else {
         $this->redirect('dashboard/index');
     }
 }
开发者ID:noikiy,项目名称:qdpm,代码行数:40,代码来源:actions.class.php


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