<?php
/***************************************************************************
- * Copyright (C) 2003-2010 Polytechnique.org *
+ * Copyright (C) 2003-2011 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
default:
return null;
}
+ if (!S::user()->checkPerms(PERMS_USER)) {
+ $where .= XDB::format(' AND mode = {?}', self::MODE_ALL);
+ }
$sql = 'SELECT id, title, end, mode
FROM surveys
WHERE '.$where.'