Skip to content

Commit

Permalink
changes related to password protection for private files
Browse files Browse the repository at this point in the history
  • Loading branch information
cisvarun committed Mar 15, 2016
1 parent ff3e5d8 commit 3ff2cf4
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions src/ProtectedPagesStorage.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,23 +114,22 @@ public static function load($fields = array(), $query_conditions = array(), $get

return $result;
}

/**
* Fetches all protected pages records from database.
*/
public static function loadAllPages() {
$db = \Drupal::database();

$results = $db->select('protected_pages', 'p')
->extend('Drupal\Core\Database\Query\PagerSelectExtender')
->extend('Drupal\Core\Database\Query\PagerSelectExtender')
->fields('p')
->orderBy('p.pid', 'DESC')
->limit(20)
->execute()
->fetchAll();
->orderBy('p.pid', 'DESC')
->limit(20)
->execute()
->fetchAll();

return $results;

}

}

0 comments on commit 3ff2cf4

Please sign in to comment.