@@ -7,12 +7,11 @@ |
||
| 7 | 7 | */ |
| 8 | 8 | namespace PH7; |
| 9 | 9 | |
| 10 | -use |
|
| 11 | -PH7\Framework\Parse\Emoticon, |
|
| 12 | -PH7\Framework\Navigation\Page, |
|
| 13 | -PH7\Framework\Analytics\Statistic, |
|
| 14 | -PH7\Framework\Mvc\Router\Uri, |
|
| 15 | -PH7\Framework\Url\Header; |
|
| 10 | +use PH7\Framework\Parse\Emoticon; |
|
| 11 | +use PH7\Framework\Navigation\Page; |
|
| 12 | +use PH7\Framework\Analytics\Statistic; |
|
| 13 | +use PH7\Framework\Mvc\Router\Uri; |
|
| 14 | +use PH7\Framework\Url\Header; |
|
| 16 | 15 | |
| 17 | 16 | class MainController extends Controller |
| 18 | 17 | { |
@@ -9,7 +9,6 @@ |
||
| 9 | 9 | |
| 10 | 10 | use PH7\Framework\Security\Ban\Ban; |
| 11 | 11 | use PH7\Framework\Navigation\Page; |
| 12 | -use PH7\Framework\Cache\Cache; |
|
| 13 | 12 | use PH7\Framework\Analytics\Statistic; |
| 14 | 13 | use PH7\Framework\Security\CSRF\Token as SecurityToken; |
| 15 | 14 | use PH7\Framework\Mvc\Router\Uri; |
@@ -7,10 +7,9 @@ |
||
| 7 | 7 | */ |
| 8 | 8 | namespace PH7; |
| 9 | 9 | |
| 10 | -use |
|
| 11 | -PH7\Framework\Navigation\Page, |
|
| 12 | -PH7\Framework\Mvc\Router\Uri, |
|
| 13 | -PH7\Framework\Url\Header; |
|
| 10 | +use PH7\Framework\Navigation\Page; |
|
| 11 | +use PH7\Framework\Mvc\Router\Uri; |
|
| 12 | +use PH7\Framework\Url\Header; |
|
| 14 | 13 | |
| 15 | 14 | class BrowseController extends Controller |
| 16 | 15 | { |
@@ -418,7 +418,7 @@ discard block |
||
| 418 | 418 | } |
| 419 | 419 | |
| 420 | 420 | /** |
| 421 | - * @return string |
|
| 421 | + * @return resource |
|
| 422 | 422 | */ |
| 423 | 423 | public function getFileName() |
| 424 | 424 | { |
@@ -428,7 +428,7 @@ discard block |
||
| 428 | 428 | /** |
| 429 | 429 | * Determine and get the type of the image (even an unallowed image type) by reading the first bytes and checking its signature. |
| 430 | 430 | * |
| 431 | - * @return string|bool When a correct signature is found, returns the appropriate value, FALSE otherwise. |
|
| 431 | + * @return integer When a correct signature is found, returns the appropriate value, FALSE otherwise. |
|
| 432 | 432 | */ |
| 433 | 433 | public function getType() |
| 434 | 434 | { |
@@ -12,6 +12,10 @@ discard block |
||
| 12 | 12 | class ModeratorModel extends ModeratorCoreModel |
| 13 | 13 | { |
| 14 | 14 | |
| 15 | + /** |
|
| 16 | + * @param integer $iOffset |
|
| 17 | + * @param integer $iLimit |
|
| 18 | + */ |
|
| 15 | 19 | public function getAlbumsPicture($iOffset, $iLimit) |
| 16 | 20 | { |
| 17 | 21 | $iOffset = (int)$iOffset; |
@@ -25,6 +29,10 @@ discard block |
||
| 25 | 29 | return $rStmt->fetchAll(\PDO::FETCH_OBJ); |
| 26 | 30 | } |
| 27 | 31 | |
| 32 | + /** |
|
| 33 | + * @param integer $iOffset |
|
| 34 | + * @param integer $iLimit |
|
| 35 | + */ |
|
| 28 | 36 | public function getPictures($iOffset, $iLimit) |
| 29 | 37 | { |
| 30 | 38 | $iOffset = (int)$iOffset; |
@@ -38,6 +46,10 @@ discard block |
||
| 38 | 46 | return $rStmt->fetchAll(\PDO::FETCH_OBJ); |
| 39 | 47 | } |
| 40 | 48 | |
| 49 | + /** |
|
| 50 | + * @param integer $iOffset |
|
| 51 | + * @param integer $iLimit |
|
| 52 | + */ |
|
| 41 | 53 | public function getAlbumsVideo($iOffset, $iLimit) |
| 42 | 54 | { |
| 43 | 55 | $iOffset = (int)$iOffset; |
@@ -51,6 +63,10 @@ discard block |
||
| 51 | 63 | return $rStmt->fetchAll(\PDO::FETCH_OBJ); |
| 52 | 64 | } |
| 53 | 65 | |
| 66 | + /** |
|
| 67 | + * @param integer $iOffset |
|
| 68 | + * @param integer $iLimit |
|
| 69 | + */ |
|
| 54 | 70 | public function getVideos($iOffset, $iLimit) |
| 55 | 71 | { |
| 56 | 72 | $iOffset = (int)$iOffset; |
@@ -64,6 +80,10 @@ discard block |
||
| 64 | 80 | return $rStmt->fetchAll(\PDO::FETCH_OBJ); |
| 65 | 81 | } |
| 66 | 82 | |
| 83 | + /** |
|
| 84 | + * @param integer $iOffset |
|
| 85 | + * @param integer $iLimit |
|
| 86 | + */ |
|
| 67 | 87 | public function getAvatars($iOffset, $iLimit) |
| 68 | 88 | { |
| 69 | 89 | $iOffset = (int)$iOffset; |
@@ -76,6 +96,10 @@ discard block |
||
| 76 | 96 | return $rStmt->fetchAll(\PDO::FETCH_OBJ); |
| 77 | 97 | } |
| 78 | 98 | |
| 99 | + /** |
|
| 100 | + * @param integer $iOffset |
|
| 101 | + * @param integer $iLimit |
|
| 102 | + */ |
|
| 79 | 103 | public function getBackgrounds($iOffset, $iLimit) |
| 80 | 104 | { |
| 81 | 105 | $iOffset = (int)$iOffset; |
@@ -15,6 +15,9 @@ discard block |
||
| 15 | 15 | |
| 16 | 16 | const CACHE_GROUP = 'db/sys/core/like'; |
| 17 | 17 | |
| 18 | + /** |
|
| 19 | + * @param string $sKey |
|
| 20 | + */ |
|
| 18 | 21 | public function select($sKey) |
| 19 | 22 | { |
| 20 | 23 | $this->cache->start(self::CACHE_GROUP, 'select' . $sKey, 3600*168); |
@@ -32,6 +35,9 @@ discard block |
||
| 32 | 35 | return $oData; |
| 33 | 36 | } |
| 34 | 37 | |
| 38 | + /** |
|
| 39 | + * @param string $sKey |
|
| 40 | + */ |
|
| 35 | 41 | public function update($sKey, $fLastIp) |
| 36 | 42 | { |
| 37 | 43 | $rStmt = Db::getInstance()->prepare('UPDATE' . Db::prefix('Likes') . 'SET votes = votes + 1 , lastVote = NOW() , lastIp =:lastIp WHERE keyId =:key'); |
@@ -40,6 +46,9 @@ discard block |
||
| 40 | 46 | return $rStmt->execute(); |
| 41 | 47 | } |
| 42 | 48 | |
| 49 | + /** |
|
| 50 | + * @param string $sKey |
|
| 51 | + */ |
|
| 43 | 52 | public function insert($sKey, $fLastIp) |
| 44 | 53 | { |
| 45 | 54 | $rStmt = Db::getInstance()->prepare('INSERT INTO' . Db::prefix('Likes') . 'SET keyId =:key ,votes=1 , lastVote = NOW(), lastIp =:lastIp'); |
@@ -182,6 +182,7 @@ |
||
| 182 | 182 | * For all classes, hack to remove the namespace, slash and backslash. |
| 183 | 183 | * |
| 184 | 184 | * @param string The class name to clean. |
| 185 | + * @param string $sClass |
|
| 185 | 186 | * @return string The class cleaned. |
| 186 | 187 | */ |
| 187 | 188 | private function _clean($sClass) |
@@ -13,10 +13,9 @@ |
||
| 13 | 13 | namespace PH7\Framework\Loader; |
| 14 | 14 | defined('PH7') or exit('Restricted access'); |
| 15 | 15 | |
| 16 | -use |
|
| 17 | -PH7\Framework\File\File, |
|
| 18 | -PH7\Framework\Registry\Registry, |
|
| 19 | -PH7\Framework\Date\Various as VDate; |
|
| 16 | +use PH7\Framework\File\File; |
|
| 17 | +use PH7\Framework\Registry\Registry; |
|
| 18 | +use PH7\Framework\Date\Various as VDate; |
|
| 20 | 19 | |
| 21 | 20 | /** |
| 22 | 21 | * We include the Singleton trait before use, because at this stage the class can not load the trait automatically. |
@@ -13,15 +13,14 @@ |
||
| 13 | 13 | namespace PH7\Framework\Mvc\Controller; |
| 14 | 14 | defined('PH7') or exit('Restricted access'); |
| 15 | 15 | |
| 16 | -use |
|
| 17 | -PH7\Framework\Security\Ban\Ban, |
|
| 18 | -PH7\Framework\Ip\Ip, |
|
| 19 | -PH7\Framework\Geo\Ip\Geo, |
|
| 20 | -PH7\Framework\Http\Http, |
|
| 21 | -PH7\Framework\Mvc\Router\Uri, |
|
| 22 | -PH7\Framework\Mobile\MobApp, |
|
| 23 | -PH7\Framework\Module\Various as SysMod, |
|
| 24 | -PH7\Framework\Mvc\Model as M; |
|
| 16 | +use PH7\Framework\Security\Ban\Ban; |
|
| 17 | +use PH7\Framework\Ip\Ip; |
|
| 18 | +use PH7\Framework\Geo\Ip\Geo; |
|
| 19 | +use PH7\Framework\Http\Http; |
|
| 20 | +use PH7\Framework\Mvc\Router\Uri; |
|
| 21 | +use PH7\Framework\Mobile\MobApp; |
|
| 22 | +use PH7\Framework\Module\Various as SysMod; |
|
| 23 | +use PH7\Framework\Mvc\Model as M; |
|
| 25 | 24 | |
| 26 | 25 | abstract class Controller extends \PH7\Framework\Core\Core |
| 27 | 26 | { |
@@ -77,7 +77,7 @@ discard block |
||
| 77 | 77 | /** |
| 78 | 78 | * Are we capable to receive gzipped data? |
| 79 | 79 | * |
| 80 | - * @return string|boolean Returns the encoding if it is accepted, false otherwise. Maybe additional check for Mac OS... |
|
| 80 | + * @return false|string Returns the encoding if it is accepted, false otherwise. Maybe additional check for Mac OS... |
|
| 81 | 81 | */ |
| 82 | 82 | public function encoding() |
| 83 | 83 | { |
@@ -144,7 +144,7 @@ discard block |
||
| 144 | 144 | } |
| 145 | 145 | |
| 146 | 146 | /** |
| 147 | - * @return string|null The HTTP User Agent is it exists, otherwise the NULL value. |
|
| 147 | + * @return string The HTTP User Agent is it exists, otherwise the NULL value. |
|
| 148 | 148 | */ |
| 149 | 149 | public function getUserAgent() |
| 150 | 150 | { |