Permalink
Browse files

Merge branch 'master' of git@github.com:openclipart/openclipart.git

  • Loading branch information...
2 parents 92e79f8 + 7c42a6d commit 6845cf9ec2d335f9ca767cdec40f3fc630784665 @mray mray committed Mar 3, 2013
Showing with 21 additions and 7 deletions.
  1. +16 −2 libs/OCAL.php
  2. +1 −1 libs/Twig
  3. +4 −4 routes/librarians.php
View
@@ -600,8 +600,22 @@ function get_clipart_tags($clipartid){
function get_users_by_group($group, $limit = 20){
$group = $this->db->escape($group);
$limit = intval($limit);
- $query = "SELECT *
- FROM openclipart_users
+ $query = "SELECT
+ users.id as id
+ , username
+ , full_name
+ , country
+ , email
+ , avatar
+ , homepage
+ , twitter
+ , creation_date
+ , about
+ , notify
+ , nsfw_filter
+ , token
+ , token_expiration
+ FROM openclipart_users users
INNER JOIN openclipart_user_groups ON user = id
INNER JOIN openclipart_groups ON openclipart_groups.id = user_group
WHERE openclipart_groups.name = '$group'";
View
@@ -1,10 +1,10 @@
<?php
$app->get('/librarians', function() use($app){
- return $app->render('librarians', array(
- 'librarians' => $app->get_users_by_group('librarian')
- , 'developers' => $app->get_users_by_group('admin')
- ));
+ return $app->render('librarians', array(
+ 'librarians' => $app->get_users_by_group('librarian')
+ , 'developers' => $app->get_users_by_group('admin')
+ ));
});
?>

0 comments on commit 6845cf9

Please sign in to comment.