當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。