@@ -7,11 +7,10 @@ |
||
7 | 7 | */ |
8 | 8 | namespace PH7; |
9 | 9 | |
10 | -use |
|
11 | -PH7\Framework\Layout\Html\Design, |
|
12 | -PH7\Framework\Cache\Cache, |
|
13 | -PH7\Framework\Mvc\Router\Uri, |
|
14 | -PH7\Framework\Url\Header; |
|
10 | +use PH7\Framework\Layout\Html\Design; |
|
11 | +use PH7\Framework\Cache\Cache; |
|
12 | +use PH7\Framework\Mvc\Router\Uri; |
|
13 | +use PH7\Framework\Url\Header; |
|
15 | 14 | |
16 | 15 | class FieldController extends Controller |
17 | 16 | { |
@@ -11,6 +11,11 @@ discard block |
||
11 | 11 | class ForumModel extends ForumCoreModel |
12 | 12 | { |
13 | 13 | |
14 | + /** |
|
15 | + * @param string $iCategoryId |
|
16 | + * @param integer $iOffset |
|
17 | + * @param integer $iLimit |
|
18 | + */ |
|
14 | 19 | public function getCategory($iCategoryId = null, $iOffset = null, $iLimit = null) |
15 | 20 | { |
16 | 21 | $bIsLimit = isset($iOffset, $iLimit); |
@@ -30,6 +35,14 @@ discard block |
||
30 | 35 | return (!empty($iCategoryId)) ? $rStmt->fetch(\PDO::FETCH_OBJ) : $rStmt->fetchAll(\PDO::FETCH_OBJ); |
31 | 36 | } |
32 | 37 | |
38 | + /** |
|
39 | + * @param string $sForumName |
|
40 | + * @param null|string $sTopicSubject |
|
41 | + * @param null|string $iProfileId |
|
42 | + * @param integer $iApproved |
|
43 | + * @param integer $iOffset |
|
44 | + * @param integer $iLimit |
|
45 | + */ |
|
33 | 46 | public function getTopic($sForumName, $iForumId, $sTopicSubject, $iTopicId, $iProfileId, $iApproved, $iOffset, $iLimit) |
34 | 47 | { |
35 | 48 | $iOffset = (int) $iOffset; |
@@ -67,6 +80,9 @@ discard block |
||
67 | 80 | return $rStmt->execute(); |
68 | 81 | } |
69 | 82 | |
83 | + /** |
|
84 | + * @param string $sCreatedDate |
|
85 | + */ |
|
70 | 86 | public function addForum($iCategoryId, $sTitle, $sDescription, $sCreatedDate) |
71 | 87 | { |
72 | 88 | $rStmt = Db::getInstance()->prepare('INSERT INTO' . Db::prefix('Forums') . '(categoryId, name, description, createdDate) |
@@ -79,6 +95,10 @@ discard block |
||
79 | 95 | return $rStmt->execute(); |
80 | 96 | } |
81 | 97 | |
98 | + /** |
|
99 | + * @param integer $iProfileId |
|
100 | + * @param string $sCreatedDate |
|
101 | + */ |
|
82 | 102 | public function addTopic($iProfileId, $iForumId, $sTitle, $sMessage, $sCreatedDate) |
83 | 103 | { |
84 | 104 | $rStmt = Db::getInstance()->prepare('INSERT INTO' . Db::prefix('ForumsTopics') . '(profileId, forumId, title, message, createdDate) |
@@ -92,6 +112,10 @@ discard block |
||
92 | 112 | return $rStmt->execute(); |
93 | 113 | } |
94 | 114 | |
115 | + /** |
|
116 | + * @param integer $iProfileId |
|
117 | + * @param string $sCreatedDate |
|
118 | + */ |
|
95 | 119 | public function addMessage($iProfileId, $iTopicId, $sMessage, $sCreatedDate) |
96 | 120 | { |
97 | 121 | $rStmt = Db::getInstance()->prepare('INSERT INTO' . Db::prefix('ForumsMessages') . '(profileId, topicId, message, createdDate) |
@@ -114,6 +138,9 @@ discard block |
||
114 | 138 | return $rStmt->execute(); |
115 | 139 | } |
116 | 140 | |
141 | + /** |
|
142 | + * @param string $sUpdatedDate |
|
143 | + */ |
|
117 | 144 | public function updateForum($iForumId, $iCategoryId, $sName, $sDescription, $sUpdatedDate) |
118 | 145 | { |
119 | 146 | $rStmt = Db::getInstance()->prepare('UPDATE' . Db::prefix('Forums') . |
@@ -127,6 +154,10 @@ discard block |
||
127 | 154 | return $rStmt->execute(); |
128 | 155 | } |
129 | 156 | |
157 | + /** |
|
158 | + * @param string $iProfileId |
|
159 | + * @param string $sUpdatedDate |
|
160 | + */ |
|
130 | 161 | public function updateTopic($iProfileId, $iTopicId, $sTitle, $sMessage, $sUpdatedDate) |
131 | 162 | { |
132 | 163 | $rStmt = Db::getInstance()->prepare('UPDATE' . Db::prefix('ForumsTopics') . |
@@ -140,6 +171,10 @@ discard block |
||
140 | 171 | return $rStmt->execute(); |
141 | 172 | } |
142 | 173 | |
174 | + /** |
|
175 | + * @param string $iProfileId |
|
176 | + * @param string $sUpdatedDate |
|
177 | + */ |
|
143 | 178 | public function updateMessage($iProfileId, $iMessageId, $sMessage, $sUpdatedDate) |
144 | 179 | { |
145 | 180 | $rStmt = Db::getInstance()->prepare('UPDATE' . Db::prefix('ForumsMessages') . |
@@ -282,6 +317,11 @@ discard block |
||
282 | 317 | return $mData; |
283 | 318 | } |
284 | 319 | |
320 | + /** |
|
321 | + * @param integer $iApproved |
|
322 | + * @param integer $iOffset |
|
323 | + * @param integer $iLimit |
|
324 | + */ |
|
285 | 325 | public function getPostByProfile($iProfileId, $iApproved, $iOffset, $iLimit) |
286 | 326 | { |
287 | 327 | $iOffset = (int) $iOffset; |
@@ -9,10 +9,9 @@ |
||
9 | 9 | |
10 | 10 | defined('PH7') or die('Restricted access'); |
11 | 11 | |
12 | -use |
|
13 | -PH7\Framework\Layout\Html\Design, |
|
14 | -PH7\Framework\Url\Header, |
|
15 | -PH7\Framework\Mvc\Router\Uri; |
|
12 | +use PH7\Framework\Layout\Html\Design; |
|
13 | +use PH7\Framework\Url\Header; |
|
14 | +use PH7\Framework\Mvc\Router\Uri; |
|
16 | 15 | |
17 | 16 | class Permission extends PermissionCore |
18 | 17 | { |
@@ -12,13 +12,12 @@ |
||
12 | 12 | namespace PH7; |
13 | 13 | defined('PH7') or exit('Restricted access'); |
14 | 14 | |
15 | -use |
|
16 | -PH7\Framework\Session\Session, |
|
17 | -PH7\Framework\File\Import, |
|
18 | -PH7\Framework\Parse\Emoticon, |
|
19 | -PH7\Framework\Mvc\Router\Uri, |
|
20 | -PH7\Framework\Http\Http, |
|
21 | -PH7\Framework\Mvc\Request\Http as HttpRequest; |
|
15 | +use PH7\Framework\Session\Session; |
|
16 | +use PH7\Framework\File\Import; |
|
17 | +use PH7\Framework\Parse\Emoticon; |
|
18 | +use PH7\Framework\Mvc\Router\Uri; |
|
19 | +use PH7\Framework\Http\Http; |
|
20 | +use PH7\Framework\Mvc\Request\Http as HttpRequest; |
|
22 | 21 | |
23 | 22 | class MessengerAjax extends PermissionCore |
24 | 23 | { |
@@ -7,13 +7,12 @@ |
||
7 | 7 | */ |
8 | 8 | namespace PH7; |
9 | 9 | |
10 | -use |
|
11 | -PH7\Framework\Util\Various, |
|
12 | -PH7\Framework\Mvc\Model\Engine\Util\Various as VariousModel, |
|
13 | -PH7\Framework\Mail\Mail, |
|
14 | -PH7\Framework\Layout\Html\Meta, |
|
15 | -PH7\Framework\Mvc\Router\Uri, |
|
16 | -PH7\Framework\Url\Header; |
|
10 | +use PH7\Framework\Util\Various; |
|
11 | +use PH7\Framework\Mvc\Model\Engine\Util\Various as VariousModel; |
|
12 | +use PH7\Framework\Mail\Mail; |
|
13 | +use PH7\Framework\Layout\Html\Meta; |
|
14 | +use PH7\Framework\Mvc\Router\Uri; |
|
15 | +use PH7\Framework\Url\Header; |
|
17 | 16 | |
18 | 17 | class MainController extends Controller |
19 | 18 | { |
@@ -9,10 +9,9 @@ |
||
9 | 9 | |
10 | 10 | defined('PH7') or exit('Restricted access'); |
11 | 11 | |
12 | -use |
|
13 | -PH7\Framework\Layout\Html\Design, |
|
14 | -PH7\Framework\Mvc\Router\Uri, |
|
15 | -PH7\Framework\Url\Header; |
|
12 | +use PH7\Framework\Layout\Html\Design; |
|
13 | +use PH7\Framework\Mvc\Router\Uri; |
|
14 | +use PH7\Framework\Url\Header; |
|
16 | 15 | |
17 | 16 | class Permission extends PermissionCore |
18 | 17 | { |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | * @param integer $iRecipient |
65 | 65 | * @param string $sTitle |
66 | 66 | * @param string $sMessage |
67 | - * @param string $sCreateDate |
|
67 | + * @param string $sCreatedDate |
|
68 | 68 | * @return mixed (boolean | integer) Returns the ID of the message on success or FALSE on failure. |
69 | 69 | */ |
70 | 70 | public function sendMsg($iSender, $iRecipient, $sTitle, $sMessage, $sCreatedDate) |
@@ -89,6 +89,9 @@ discard block |
||
89 | 89 | return $rStmt->execute(); |
90 | 90 | } |
91 | 91 | |
92 | + /** |
|
93 | + * @param string $iMessageId |
|
94 | + */ |
|
92 | 95 | public function adminDeleteMsg($iMessageId) |
93 | 96 | { |
94 | 97 | $rStmt = Db::getInstance()->prepare('DELETE FROM' . Db::prefix('Messages') . 'WHERE messageId = :messageId LIMIT 1'); |
@@ -104,6 +107,9 @@ discard block |
||
104 | 107 | Db::free($rStmt); |
105 | 108 | } |
106 | 109 | |
110 | + /** |
|
111 | + * @param integer $iMessageId |
|
112 | + */ |
|
107 | 113 | public function getMsg($iMessageId) |
108 | 114 | { |
109 | 115 | $rStmt = Db::getInstance()->prepare('SELECT * FROM' . Db::prefix('Messages') . 'WHERE messageId = :messageId LIMIT 1'); |
@@ -9,10 +9,9 @@ |
||
9 | 9 | */ |
10 | 10 | namespace PH7; |
11 | 11 | |
12 | -use |
|
13 | -PH7\Framework\Navigation\Page, |
|
14 | -PH7\Framework\Url\Header, |
|
15 | -PH7\Framework\Mvc\Router\Uri; |
|
12 | +use PH7\Framework\Navigation\Page; |
|
13 | +use PH7\Framework\Url\Header; |
|
14 | +use PH7\Framework\Mvc\Router\Uri; |
|
16 | 15 | |
17 | 16 | class AdminController extends Controller |
18 | 17 | { |
@@ -7,13 +7,12 @@ |
||
7 | 7 | */ |
8 | 8 | namespace PH7; |
9 | 9 | |
10 | -use |
|
11 | -PH7\Framework\Str\Str, |
|
12 | -PH7\Framework\Session\Session, |
|
13 | -PH7\Framework\Security\CSRF\Token, |
|
14 | -PH7\Framework\Mvc\Request\Http, |
|
15 | -PH7\Framework\Mvc\Router\Uri, |
|
16 | -PH7\Framework\Url\Header; |
|
10 | +use PH7\Framework\Str\Str; |
|
11 | +use PH7\Framework\Session\Session; |
|
12 | +use PH7\Framework\Security\CSRF\Token; |
|
13 | +use PH7\Framework\Mvc\Request\Http; |
|
14 | +use PH7\Framework\Mvc\Router\Uri; |
|
15 | +use PH7\Framework\Url\Header; |
|
17 | 16 | |
18 | 17 | class EditNoteForm |
19 | 18 | { |