コード例 #1
0
ファイル: data.php プロジェクト: samj1912/repo
 /**
  * Verify that the filter is valid
  *
  * @param string $filterValue
  * @return string
  */
 public function validateFilter($filterValue)
 {
     if (!isset($filterValue)) {
         return 'all';
     }
     switch ($filterValue) {
         case 'by':
         case 'self':
         case 'all':
             return $filterValue;
         default:
             if ($this->activityManager->isFilterValid($filterValue)) {
                 return $filterValue;
             }
             return 'all';
     }
 }
コード例 #2
0
ファイル: data.php プロジェクト: WYSAC/oregon-owncloud
 /**
  * Get the filter from $_GET
  * @return string
  */
 public function getFilterFromParam()
 {
     if (!isset($_GET['filter'])) {
         return 'all';
     }
     $filterValue = $_GET['filter'];
     switch ($filterValue) {
         case 'by':
         case 'self':
         case 'shares':
         case 'all':
         case 'files':
             return $filterValue;
         default:
             if ($this->activityManager->isFilterValid($filterValue)) {
                 return $filterValue;
             }
             return 'all';
     }
 }