예제 #1
0
파일: Overview.php 프로젝트: sinfocol/gwf3
 private function pmTable()
 {
     $uid = GWF_Session::getUserID();
     $fid = $this->folder->getID();
     $conditions = "(pm_from={$uid} AND pm_from_folder={$fid}) OR (pm_to={$uid} AND pm_to_folder={$fid})";
     $sortURL = GWF_WEB_ROOT . 'pm/folder/' . $fid . '/' . $this->folder->urlencodeSEO('pmf_name') . '/by/%BY%/%DIR%/page-1';
     return GWF_Table::displayGDO2($this->module, GDO::table('GWF_PM'), GWF_Session::getUser(), $sortURL, $conditions, $this->module->cfgPMPerPage());
 }
예제 #2
0
파일: GWF_PM.php 프로젝트: sinfocol/gwf3
 public function move(GWF_User $user, GWF_PMFolder $folder)
 {
     if (false === ($old_folder = $this->getFolder($user))) {
         return false;
     }
     if ($old_folder->getID() === $folder->getID()) {
         return false;
     }
     if (false === $this->saveVar('pm_folder', $folder->getID())) {
         return false;
     }
     if (false === $folder->increase('pmf_count', 1)) {
         return false;
     }
     if (false === $old_folder->increase('pmf_count', -1)) {
         return false;
     }
     $this->markRead($user, true);
     return true;
 }