tiki-report_direct_object_perms.php 1004 Bytes
Newer Older
pkdille's avatar
pkdille committed
1
<?php
changi67's avatar
changi67 committed
2 3 4
/**
 * @package tikiwiki
 */
5
// (c) Copyright 2002-2015 by authors of the Tiki Wiki CMS Groupware Project
6
//
7 8
// All Rights Reserved. See copyright.txt for details and a complete list of authors.
// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details.
9
// $Id$
10 11 12

require_once ('tiki-setup.php');

lphuberdeau's avatar
lphuberdeau committed
13
$wikilib = TikiLib::lib('wiki');
14 15 16

$access->check_feature(array('feature_wiki'));
$access->check_permission(array('tiki_p_admin_wiki'));
pkdille's avatar
pkdille committed
17 18 19

global $tikilib;

20 21 22 23 24
$query = 'select distinct tp.pageName' .
					' from tiki_pages tp, users_objectpermissions perm' .
					" where md5(concat('wiki page', lower(tp.pageName))) = perm.objectId" .
					" and perm.objectType = 'wiki page'" .
					' order by tp.pageName';
pkdille's avatar
pkdille committed
25

26 27 28
$result = $tikilib->query($query);

$pages = array();
29
while ($row = $result->fetchRow()) {
pkdille's avatar
pkdille committed
30 31 32 33 34
	$pages[] = $row['pageName'];
}

$smarty->assign('pagesWithDirectPerms', $pages);

35
$smarty->assign('mid', 'tiki-report_direct_object_perms.tpl');
36
$smarty->display('tiki.tpl');