This repository has been archived by the owner on Jan 30, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
board.php
executable file
·78 lines (55 loc) · 1.67 KB
/
board.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
<?php
/*
*
* Quip Forum for Joomla!
* (c) 2010-2012 Robert Gerald Porter
*
* Author: Robert Gerald Porter <rob@robporter.ca>
* Version: 0.3
* License: GPL v3.0
*
* This extension is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This extension is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details <http://www.gnu.org/licenses/>.
*
*/
defined('_JEXEC') or die;
jimport('joomla.application.component.model');
jimport( 'joomla.access.access' );
class QuipForumModelBoard extends JModel
{
public function __construct()
{
parent::__construct();
}
public function getjACL()
{
### Oh my!
# This is a core Joomla table.
# This means there's probably a method to grab this info more officially.
# This means I should ask on the Joomla Dev forum for a way to get his info officially.
# Later.
$query = "SELECT * FROM #__viewlevels ";
$data = $this->_getList($query);
return $data;
}
public function getqACL()
{
$data_array = array();
$cid = JRequest::getVar('cid', array(0), '', 'array');
$id = $cid[0];
$query = "SELECT * FROM #__quipforum_board_access WHERE board_id = '".$id."' ";
$data = $this->_getList($query);
foreach((array)$data as $k=>$v)
{
$data_array[$v->viewlevel_id] = $v->access_level;
}
return $data_array;
}
}