@@ -92,6 +92,7 @@ |
||
| 92 | 92 | * @param string $sSort |
| 93 | 93 | * @param integer$iOffset |
| 94 | 94 | * @param integer $iLimit |
| 95 | + * @param null|integer $iOffset |
|
| 95 | 96 | * |
| 96 | 97 | * @return integer|object |
| 97 | 98 | */ |
@@ -102,6 +102,9 @@ discard block |
||
| 102 | 102 | return $rStmt->execute(); |
| 103 | 103 | } |
| 104 | 104 | |
| 105 | + /** |
|
| 106 | + * @param string $iMessageId |
|
| 107 | + */ |
|
| 105 | 108 | public function adminDeleteMsg($iMessageId) |
| 106 | 109 | { |
| 107 | 110 | $rStmt = Db::getInstance()->prepare('DELETE FROM' . Db::prefix('Messages') . 'WHERE messageId = :messageId LIMIT 1'); |
@@ -117,6 +120,9 @@ discard block |
||
| 117 | 120 | Db::free($rStmt); |
| 118 | 121 | } |
| 119 | 122 | |
| 123 | + /** |
|
| 124 | + * @param integer $iMessageId |
|
| 125 | + */ |
|
| 120 | 126 | public function getMsg($iMessageId) |
| 121 | 127 | { |
| 122 | 128 | $rStmt = Db::getInstance()->prepare('SELECT * FROM' . Db::prefix('Messages') . 'WHERE messageId = :messageId LIMIT 1'); |
@@ -12,6 +12,11 @@ discard block |
||
| 12 | 12 | class NoteModel extends NoteCoreModel |
| 13 | 13 | { |
| 14 | 14 | |
| 15 | + /** |
|
| 16 | + * @param string $iNoteId |
|
| 17 | + * @param integer $iOffset |
|
| 18 | + * @param integer $iLimit |
|
| 19 | + */ |
|
| 15 | 20 | public function getCategory($iNoteId = null, $iOffset, $iLimit, $bCount = false) |
| 16 | 21 | { |
| 17 | 22 | $this->cache->start(self::CACHE_GROUP, 'category' . $iNoteId . $iOffset . $iLimit . $bCount, static::CACHE_TIME); |
@@ -67,6 +72,9 @@ discard block |
||
| 67 | 72 | return $oData; |
| 68 | 73 | } |
| 69 | 74 | |
| 75 | + /** |
|
| 76 | + * @param integer $iProfileId |
|
| 77 | + */ |
|
| 70 | 78 | public function addCategory($iCategoryId, $iNoteId, $iProfileId) |
| 71 | 79 | { |
| 72 | 80 | $rStmt = Db::getInstance()->prepare('INSERT INTO' . Db::prefix('NotesCategories') . '(categoryId, noteId, profileId) VALUES(:categoryId, :noteId, :profileId)'); |
@@ -77,6 +85,9 @@ discard block |
||
| 77 | 85 | Db::free($rStmt); |
| 78 | 86 | } |
| 79 | 87 | |
| 88 | + /** |
|
| 89 | + * @param string $iProfileId |
|
| 90 | + */ |
|
| 80 | 91 | public function readPost($sPostId, $iProfileId, $iApproved = 1) |
| 81 | 92 | { |
| 82 | 93 | $this->cache->start(self::CACHE_GROUP, 'readPost' . $sPostId . $iProfileId . $iApproved, static::CACHE_TIME); |
@@ -222,7 +233,6 @@ discard block |
||
| 222 | 233 | } |
| 223 | 234 | |
| 224 | 235 | /** |
| 225 | - * @param integer|string $mLooking(integer for post ID or string for a keyword) |
|
| 226 | 236 | * @param boolean $bCount Put 'true' for count the notes or 'false' for the result of notes. |
| 227 | 237 | * @param string $sOrderBy |
| 228 | 238 | * @param string $sSort |
@@ -300,6 +310,10 @@ discard block |
||
| 300 | 310 | return $sData; |
| 301 | 311 | } |
| 302 | 312 | |
| 313 | + /** |
|
| 314 | + * @param string $sPostId |
|
| 315 | + * @param integer $iProfileId |
|
| 316 | + */ |
|
| 303 | 317 | public function postIdExists($sPostId, $iProfileId) |
| 304 | 318 | { |
| 305 | 319 | $this->cache->start(self::CACHE_GROUP, 'postIdExists' . $sPostId . $iProfileId, static::CACHE_TIME); |
@@ -350,6 +364,9 @@ discard block |
||
| 350 | 364 | $this->updatePost('thumb', null, $iNoteId, $iProfileId); |
| 351 | 365 | } |
| 352 | 366 | |
| 367 | + /** |
|
| 368 | + * @param string $sSection |
|
| 369 | + */ |
|
| 353 | 370 | public function updatePost($sSection, $sValue, $iNoteId, $iProfileId) |
| 354 | 371 | { |
| 355 | 372 | $rStmt = Db::getInstance()->prepare('UPDATE'.Db::prefix('Notes').'SET ' . $sSection . ' = :value WHERE noteId = :noteId AND profileId = :profileId'); |