@@ -188,8 +188,8 @@ |
||
| 188 | 188 | if(!$error) |
| 189 | 189 | { |
| 190 | 190 | /** |
| 191 | - * No errrors, we execute heavy tasks wich need a valid url |
|
| 192 | - */ |
|
| 191 | + * No errrors, we execute heavy tasks wich need a valid url |
|
| 192 | + */ |
|
| 193 | 193 | |
| 194 | 194 | // Banner |
| 195 | 195 | $link->banner_process($banner, $error); |
@@ -14,27 +14,27 @@ |
||
| 14 | 14 | */ |
| 15 | 15 | class acp_directory_info |
| 16 | 16 | { |
| 17 | - function module() |
|
| 18 | - { |
|
| 19 | - return array( |
|
| 20 | - 'filename' => 'acp_directory', |
|
| 21 | - 'title' => 'ACP_DIRECTORY', |
|
| 22 | - 'version' => '1.0.1', |
|
| 23 | - 'modes' => array( |
|
| 24 | - '' => array('title' => 'ACP_DIRECTORY', 'auth' => 'acl_a_board', 'cat' => array('')), |
|
| 25 | - 'main' => array('title' => 'ACP_DIRECTORY_MAIN', 'auth' => 'acl_a_board', 'cat' => array('ACP_DIRECTORY')), |
|
| 17 | + function module() |
|
| 18 | + { |
|
| 19 | + return array( |
|
| 20 | + 'filename' => 'acp_directory', |
|
| 21 | + 'title' => 'ACP_DIRECTORY', |
|
| 22 | + 'version' => '1.0.1', |
|
| 23 | + 'modes' => array( |
|
| 24 | + '' => array('title' => 'ACP_DIRECTORY', 'auth' => 'acl_a_board', 'cat' => array('')), |
|
| 25 | + 'main' => array('title' => 'ACP_DIRECTORY_MAIN', 'auth' => 'acl_a_board', 'cat' => array('ACP_DIRECTORY')), |
|
| 26 | 26 | 'settings' => array('title' => 'ACP_DIRECTORY_SETTINGS', 'auth' => 'acl_a_board', 'cat' => array('ACP_DIRECTORY')), |
| 27 | 27 | 'cat' => array('title' => 'ACP_DIRECTORY_CATS', 'auth' => 'acl_a_board', 'cat' => array('ACP_DIRECTORY')), |
| 28 | 28 | 'val' => array('title' => 'ACP_DIRECTORY_VAL', 'auth' => 'acl_a_board', 'cat' => array('ACP_DIRECTORY')), |
| 29 | - ), |
|
| 30 | - ); |
|
| 31 | - } |
|
| 29 | + ), |
|
| 30 | + ); |
|
| 31 | + } |
|
| 32 | 32 | |
| 33 | - function install() |
|
| 34 | - { |
|
| 35 | - } |
|
| 33 | + function install() |
|
| 34 | + { |
|
| 35 | + } |
|
| 36 | 36 | |
| 37 | - function uninstall() |
|
| 38 | - { |
|
| 39 | - } |
|
| 37 | + function uninstall() |
|
| 38 | + { |
|
| 39 | + } |
|
| 40 | 40 | } |
| 41 | 41 | \ No newline at end of file |
@@ -1526,11 +1526,11 @@ discard block |
||
| 1526 | 1526 | global $db; |
| 1527 | 1527 | |
| 1528 | 1528 | /** |
| 1529 | - * Fetch all the siblings between the module's current spot |
|
| 1530 | - * and where we want to move it to. If there are less than $steps |
|
| 1531 | - * siblings between the current spot and the target then the |
|
| 1532 | - * module will move as far as possible |
|
| 1533 | - */ |
|
| 1529 | + * Fetch all the siblings between the module's current spot |
|
| 1530 | + * and where we want to move it to. If there are less than $steps |
|
| 1531 | + * siblings between the current spot and the target then the |
|
| 1532 | + * module will move as far as possible |
|
| 1533 | + */ |
|
| 1534 | 1534 | $sql = 'SELECT cat_id, cat_name, left_id, right_id |
| 1535 | 1535 | FROM ' . DIR_CAT_TABLE . ' |
| 1536 | 1536 | WHERE parent_id = ' . (int)$dir_cat_row['parent_id'] . ' |
@@ -1551,12 +1551,12 @@ discard block |
||
| 1551 | 1551 | } |
| 1552 | 1552 | |
| 1553 | 1553 | /** |
| 1554 | - * $left_id and $right_id define the scope of the nodes that are affected by the move. |
|
| 1555 | - * $diff_up and $diff_down are the values to substract or add to each node's left_id |
|
| 1556 | - * and right_id in order to move them up or down. |
|
| 1557 | - * $move_up_left and $move_up_right define the scope of the nodes that are moving |
|
| 1558 | - * up. Other nodes in the scope of ($left_id, $right_id) are considered to move down. |
|
| 1559 | - */ |
|
| 1554 | + * $left_id and $right_id define the scope of the nodes that are affected by the move. |
|
| 1555 | + * $diff_up and $diff_down are the values to substract or add to each node's left_id |
|
| 1556 | + * and right_id in order to move them up or down. |
|
| 1557 | + * $move_up_left and $move_up_right define the scope of the nodes that are moving |
|
| 1558 | + * up. Other nodes in the scope of ($left_id, $right_id) are considered to move down. |
|
| 1559 | + */ |
|
| 1560 | 1560 | if ($action == 'move_up') |
| 1561 | 1561 | { |
| 1562 | 1562 | $left_id = $target['left_id']; |
@@ -24,10 +24,10 @@ discard block |
||
| 24 | 24 | class link |
| 25 | 25 | { |
| 26 | 26 | /** |
| 27 | - * Add a link into db |
|
| 28 | - * |
|
| 29 | - * @param array $data contains all datas to insert in db |
|
| 30 | - */ |
|
| 27 | + * Add a link into db |
|
| 28 | + * |
|
| 29 | + * @param array $data contains all datas to insert in db |
|
| 30 | + */ |
|
| 31 | 31 | function add($data) |
| 32 | 32 | { |
| 33 | 33 | global $db, $auth, $config, $categorie; |
@@ -52,11 +52,11 @@ discard block |
||
| 52 | 52 | } |
| 53 | 53 | |
| 54 | 54 | /** |
| 55 | - * Edit a link of the db |
|
| 56 | - * |
|
| 57 | - * @param array $data contains all datas to edit in db |
|
| 58 | - * @param int $u is link's id, for WHERE clause |
|
| 59 | - */ |
|
| 55 | + * Edit a link of the db |
|
| 56 | + * |
|
| 57 | + * @param array $data contains all datas to edit in db |
|
| 58 | + * @param int $u is link's id, for WHERE clause |
|
| 59 | + */ |
|
| 60 | 60 | function edit($data, $url_id, $need_approval) |
| 61 | 61 | { |
| 62 | 62 | global $db, $cache; |
@@ -93,10 +93,10 @@ discard block |
||
| 93 | 93 | } |
| 94 | 94 | |
| 95 | 95 | /** |
| 96 | - * Del a link of the db |
|
| 97 | - * |
|
| 98 | - * @param int $u is link's id, for WHERE clause |
|
| 99 | - */ |
|
| 96 | + * Del a link of the db |
|
| 97 | + * |
|
| 98 | + * @param int $u is link's id, for WHERE clause |
|
| 99 | + */ |
|
| 100 | 100 | function del($url_id, $cat_id, $cron = false) |
| 101 | 101 | { |
| 102 | 102 | global $db, $mode, $phpEx, $phpbb_root_path, $user; |
@@ -166,10 +166,10 @@ discard block |
||
| 166 | 166 | } |
| 167 | 167 | |
| 168 | 168 | /** |
| 169 | - * Increments link view counter |
|
| 170 | - * |
|
| 171 | - * @param int $u is link's id, for WHERE clause |
|
| 172 | - */ |
|
| 169 | + * Increments link view counter |
|
| 170 | + * |
|
| 171 | + * @param int $u is link's id, for WHERE clause |
|
| 172 | + */ |
|
| 173 | 173 | function view($url_id) |
| 174 | 174 | { |
| 175 | 175 | global $db, $user; |
@@ -194,12 +194,12 @@ discard block |
||
| 194 | 194 | } |
| 195 | 195 | |
| 196 | 196 | /** |
| 197 | - * Verify that an URL exist before add into db |
|
| 198 | - * |
|
| 199 | - * @param string $url |
|
| 200 | - * |
|
| 201 | - * @return true if ok, else false. |
|
| 202 | - */ |
|
| 197 | + * Verify that an URL exist before add into db |
|
| 198 | + * |
|
| 199 | + * @param string $url |
|
| 200 | + * |
|
| 201 | + * @return true if ok, else false. |
|
| 202 | + */ |
|
| 203 | 203 | function checkurl($url) |
| 204 | 204 | { |
| 205 | 205 | $details = parse_url($url); |
@@ -238,12 +238,12 @@ discard block |
||
| 238 | 238 | } |
| 239 | 239 | |
| 240 | 240 | /** |
| 241 | - * Delete the final '/', if no path |
|
| 242 | - * |
|
| 243 | - * @param string $url to clean |
|
| 244 | - * |
|
| 245 | - * @return the correct string. |
|
| 246 | - */ |
|
| 241 | + * Delete the final '/', if no path |
|
| 242 | + * |
|
| 243 | + * @param string $url to clean |
|
| 244 | + * |
|
| 245 | + * @return the correct string. |
|
| 246 | + */ |
|
| 247 | 247 | function clean_url($url) |
| 248 | 248 | { |
| 249 | 249 | $details = parse_url($url); |
@@ -291,13 +291,13 @@ discard block |
||
| 291 | 291 | } |
| 292 | 292 | |
| 293 | 293 | /** |
| 294 | - * Calculate the link's note |
|
| 295 | - * |
|
| 296 | - * @param int $total_note is sum of all link's notes |
|
| 297 | - * @param int $nb_vote is nb of votes |
|
| 298 | - * |
|
| 299 | - * @return the calculated note. |
|
| 300 | - */ |
|
| 294 | + * Calculate the link's note |
|
| 295 | + * |
|
| 296 | + * @param int $total_note is sum of all link's notes |
|
| 297 | + * @param int $nb_vote is nb of votes |
|
| 298 | + * |
|
| 299 | + * @return the calculated note. |
|
| 300 | + */ |
|
| 301 | 301 | function display_note($total_note, $nb_vote, $votes_status) |
| 302 | 302 | { |
| 303 | 303 | if(!$votes_status) |
@@ -315,12 +315,12 @@ discard block |
||
| 315 | 315 | } |
| 316 | 316 | |
| 317 | 317 | /** |
| 318 | - * Display the vote form for auth users |
|
| 319 | - * |
|
| 320 | - * @param array $data link's data from db |
|
| 321 | - * |
|
| 322 | - * @return the html code. |
|
| 323 | - */ |
|
| 318 | + * Display the vote form for auth users |
|
| 319 | + * |
|
| 320 | + * @param array $data link's data from db |
|
| 321 | + * |
|
| 322 | + * @return the html code. |
|
| 323 | + */ |
|
| 324 | 324 | function display_vote($data, $votes_status) |
| 325 | 325 | { |
| 326 | 326 | if(!$votes_status) |
@@ -359,14 +359,14 @@ discard block |
||
| 359 | 359 | } |
| 360 | 360 | |
| 361 | 361 | /** |
| 362 | - * Display link's thumb if thumb service enabled. |
|
| 363 | - * if thumb don't exists in db or if a new service was choosen in acp |
|
| 364 | - * thumb is research |
|
| 365 | - * |
|
| 366 | - * @param array $data link's data from db |
|
| 367 | - * |
|
| 368 | - * @return thumb or nothing. |
|
| 369 | - */ |
|
| 362 | + * Display link's thumb if thumb service enabled. |
|
| 363 | + * if thumb don't exists in db or if a new service was choosen in acp |
|
| 364 | + * thumb is research |
|
| 365 | + * |
|
| 366 | + * @param array $data link's data from db |
|
| 367 | + * |
|
| 368 | + * @return thumb or nothing. |
|
| 369 | + */ |
|
| 370 | 370 | function display_thumb($data) |
| 371 | 371 | { |
| 372 | 372 | global $config, $db; |
@@ -388,12 +388,12 @@ discard block |
||
| 388 | 388 | } |
| 389 | 389 | |
| 390 | 390 | /** |
| 391 | - * Display and calculate PageRank if needed |
|
| 392 | - * |
|
| 393 | - * @param array $data link's data from db |
|
| 394 | - * |
|
| 395 | - * @return pr image, false or 'n/a'. |
|
| 396 | - */ |
|
| 391 | + * Display and calculate PageRank if needed |
|
| 392 | + * |
|
| 393 | + * @param array $data link's data from db |
|
| 394 | + * |
|
| 395 | + * @return pr image, false or 'n/a'. |
|
| 396 | + */ |
|
| 397 | 397 | function display_pagerank($data) |
| 398 | 398 | { |
| 399 | 399 | global $config, $db, $user; |
@@ -424,13 +424,13 @@ discard block |
||
| 424 | 424 | } |
| 425 | 425 | |
| 426 | 426 | /** |
| 427 | - * Display and resize a banner |
|
| 428 | - * |
|
| 429 | - * @param array $data link's data from db |
|
| 430 | - * @param bool $have_banner |
|
| 431 | - * |
|
| 432 | - * @return banner image. |
|
| 433 | - */ |
|
| 427 | + * Display and resize a banner |
|
| 428 | + * |
|
| 429 | + * @param array $data link's data from db |
|
| 430 | + * @param bool $have_banner |
|
| 431 | + * |
|
| 432 | + * @return banner image. |
|
| 433 | + */ |
|
| 434 | 434 | function display_bann($data) |
| 435 | 435 | { |
| 436 | 436 | global $config, $phpbb_root_path; |
@@ -462,13 +462,13 @@ discard block |
||
| 462 | 462 | } |
| 463 | 463 | |
| 464 | 464 | /** |
| 465 | - * Display number of comments and link for posting |
|
| 466 | - * |
|
| 467 | - * @param int $u is link_id from db |
|
| 468 | - * @param int $nb_comments si number of comments for this link |
|
| 469 | - * |
|
| 470 | - * @return html code (counter + link). |
|
| 471 | - */ |
|
| 465 | + * Display number of comments and link for posting |
|
| 466 | + * |
|
| 467 | + * @param int $u is link_id from db |
|
| 468 | + * @param int $nb_comments si number of comments for this link |
|
| 469 | + * |
|
| 470 | + * @return html code (counter + link). |
|
| 471 | + */ |
|
| 472 | 472 | function display_comm($u, $nb_comment, $comments_status) |
| 473 | 473 | { |
| 474 | 474 | if(!$comments_status) |
@@ -486,10 +486,10 @@ discard block |
||
| 486 | 486 | } |
| 487 | 487 | |
| 488 | 488 | /** |
| 489 | - * Add a vote in db, for a specifi link |
|
| 490 | - * |
|
| 491 | - * @param int $u is link_id from db |
|
| 492 | - */ |
|
| 489 | + * Add a vote in db, for a specifi link |
|
| 490 | + * |
|
| 491 | + * @param int $u is link_id from db |
|
| 492 | + */ |
|
| 493 | 493 | function add_vote($u) |
| 494 | 494 | { |
| 495 | 495 | global $user, $db, $id, $start, $phpEx; |
@@ -546,9 +546,9 @@ discard block |
||
| 546 | 546 | } |
| 547 | 547 | |
| 548 | 548 | /** |
| 549 | - * Send a email to administrator for notify a new link |
|
| 550 | - * when approbation enabled |
|
| 551 | - */ |
|
| 549 | + * Send a email to administrator for notify a new link |
|
| 550 | + * when approbation enabled |
|
| 551 | + */ |
|
| 552 | 552 | function notify_admin() |
| 553 | 553 | { |
| 554 | 554 | global $config, $db, $user; |
@@ -657,12 +657,12 @@ discard block |
||
| 657 | 657 | } |
| 658 | 658 | |
| 659 | 659 | /** |
| 660 | - * Search an appropriate thumb for url |
|
| 661 | - * |
|
| 662 | - * @param string $url is link's url |
|
| 663 | - * |
|
| 664 | - * @return the thumb url |
|
| 665 | - */ |
|
| 660 | + * Search an appropriate thumb for url |
|
| 661 | + * |
|
| 662 | + * @param string $url is link's url |
|
| 663 | + * |
|
| 664 | + * @return the thumb url |
|
| 665 | + */ |
|
| 666 | 666 | function thumb_process($url) |
| 667 | 667 | { |
| 668 | 668 | global $config, $phpbb_root_path; |
@@ -704,10 +704,10 @@ discard block |
||
| 704 | 704 | } |
| 705 | 705 | |
| 706 | 706 | /** |
| 707 | - * primary work on banner, can edit, copy or check a banner |
|
| 708 | - * |
|
| 709 | - * @param string $banner is banner's remote url |
|
| 710 | - */ |
|
| 707 | + * primary work on banner, can edit, copy or check a banner |
|
| 708 | + * |
|
| 709 | + * @param string $banner is banner's remote url |
|
| 710 | + */ |
|
| 711 | 711 | function banner_process(&$banner, &$error) |
| 712 | 712 | { |
| 713 | 713 | global $config, $phpbb_root_path; |
@@ -750,13 +750,13 @@ discard block |
||
| 750 | 750 | } |
| 751 | 751 | |
| 752 | 752 | /** |
| 753 | - * Copy a remonte banner to server. |
|
| 754 | - * called by banner_process() |
|
| 755 | - * |
|
| 756 | - * @param string $banner is banner's remote url |
|
| 757 | - * |
|
| 758 | - * @return file's name of the local banner |
|
| 759 | - */ |
|
| 753 | + * Copy a remonte banner to server. |
|
| 754 | + * called by banner_process() |
|
| 755 | + * |
|
| 756 | + * @param string $banner is banner's remote url |
|
| 757 | + * |
|
| 758 | + * @return file's name of the local banner |
|
| 759 | + */ |
|
| 760 | 760 | function banner_upload($banner, &$error) |
| 761 | 761 | { |
| 762 | 762 | global $phpbb_root_path, $config, $db, $user, $phpEx; |
@@ -789,13 +789,13 @@ discard block |
||
| 789 | 789 | } |
| 790 | 790 | |
| 791 | 791 | /** |
| 792 | - * Check than remote banner exists |
|
| 793 | - * called by banner_process() |
|
| 794 | - * |
|
| 795 | - * @param string $banner is banner's remote url |
|
| 796 | - * |
|
| 797 | - * @return false if error, true for ok |
|
| 798 | - */ |
|
| 792 | + * Check than remote banner exists |
|
| 793 | + * called by banner_process() |
|
| 794 | + * |
|
| 795 | + * @param string $banner is banner's remote url |
|
| 796 | + * |
|
| 797 | + * @return false if error, true for ok |
|
| 798 | + */ |
|
| 799 | 799 | function banner_remote($banner, &$error) |
| 800 | 800 | { |
| 801 | 801 | global $config, $db, $user, $phpbb_root_path, $phpEx; |
@@ -860,13 +860,13 @@ discard block |
||
| 860 | 860 | } |
| 861 | 861 | |
| 862 | 862 | /** |
| 863 | - * Delete a banner from server |
|
| 864 | - * |
|
| 865 | - * @param string $destination path to banner directory |
|
| 866 | - * @param string $file is file's name |
|
| 867 | - * |
|
| 868 | - * @return true if delete success, else false |
|
| 869 | - */ |
|
| 863 | + * Delete a banner from server |
|
| 864 | + * |
|
| 865 | + * @param string $destination path to banner directory |
|
| 866 | + * @param string $file is file's name |
|
| 867 | + * |
|
| 868 | + * @return true if delete success, else false |
|
| 869 | + */ |
|
| 870 | 870 | function banner_delete($destination, $file) |
| 871 | 871 | { |
| 872 | 872 | global $phpbb_root_path; |
@@ -886,15 +886,15 @@ discard block |
||
| 886 | 886 | } |
| 887 | 887 | |
| 888 | 888 | /** |
| 889 | - * PageRank Lookup (Based on Google Toolbar for Mozilla Firefox) |
|
| 890 | - * |
|
| 891 | - * @copyright 2012 HM2K <[email protected]> |
|
| 892 | - * @link http://pagerank.phurix.net/ |
|
| 893 | - * @author James Wade <[email protected]> |
|
| 894 | - * @version $Revision: 2.1 $ |
|
| 895 | - * @require PHP 4.3.0 (file_get_contents) |
|
| 896 | - * @updated 06/10/11 |
|
| 897 | - */ |
|
| 889 | + * PageRank Lookup (Based on Google Toolbar for Mozilla Firefox) |
|
| 890 | + * |
|
| 891 | + * @copyright 2012 HM2K <[email protected]> |
|
| 892 | + * @link http://pagerank.phurix.net/ |
|
| 893 | + * @author James Wade <[email protected]> |
|
| 894 | + * @version $Revision: 2.1 $ |
|
| 895 | + * @require PHP 4.3.0 (file_get_contents) |
|
| 896 | + * @updated 06/10/11 |
|
| 897 | + */ |
|
| 898 | 898 | function pagerank_process($q) |
| 899 | 899 | { |
| 900 | 900 | global $user; |
@@ -934,10 +934,10 @@ discard block |
||
| 934 | 934 | class comment |
| 935 | 935 | { |
| 936 | 936 | /** |
| 937 | - * Add a comment |
|
| 938 | - * |
|
| 939 | - * @param array $data is link's data from db |
|
| 940 | - */ |
|
| 937 | + * Add a comment |
|
| 938 | + * |
|
| 939 | + * @param array $data is link's data from db |
|
| 940 | + */ |
|
| 941 | 941 | function add($data) |
| 942 | 942 | { |
| 943 | 943 | global $db, $config; |
@@ -956,12 +956,12 @@ discard block |
||
| 956 | 956 | } |
| 957 | 957 | |
| 958 | 958 | /** |
| 959 | - * Edit a comment |
|
| 960 | - * |
|
| 961 | - * @param array $data is datas to edit |
|
| 962 | - * @param $id comment_id from db |
|
| 963 | - * |
|
| 964 | - */ |
|
| 959 | + * Edit a comment |
|
| 960 | + * |
|
| 961 | + * @param array $data is datas to edit |
|
| 962 | + * @param $id comment_id from db |
|
| 963 | + * |
|
| 964 | + */ |
|
| 965 | 965 | function edit($data, $id) |
| 966 | 966 | { |
| 967 | 967 | global $db; |
@@ -972,11 +972,11 @@ discard block |
||
| 972 | 972 | } |
| 973 | 973 | |
| 974 | 974 | /** |
| 975 | - * Delete a comment |
|
| 976 | - * |
|
| 977 | - * @param string $id is comment_id from db |
|
| 978 | - * @param string $u is link_db |
|
| 979 | - */ |
|
| 975 | + * Delete a comment |
|
| 976 | + * |
|
| 977 | + * @param string $id is comment_id from db |
|
| 978 | + * @param string $u is link_db |
|
| 979 | + */ |
|
| 980 | 980 | function del($id, $u) |
| 981 | 981 | { |
| 982 | 982 | global $user, $db, $phpEx; |
@@ -1019,8 +1019,8 @@ discard block |
||
| 1019 | 1019 | var $data = array(); |
| 1020 | 1020 | |
| 1021 | 1021 | /** |
| 1022 | - * Get somes categorie infos |
|
| 1023 | - */ |
|
| 1022 | + * Get somes categorie infos |
|
| 1023 | + */ |
|
| 1024 | 1024 | function categorie($id = 0) |
| 1025 | 1025 | { |
| 1026 | 1026 | global $db; |
@@ -1104,8 +1104,8 @@ discard block |
||
| 1104 | 1104 | } |
| 1105 | 1105 | |
| 1106 | 1106 | /** |
| 1107 | - * Display cat or subcat |
|
| 1108 | - */ |
|
| 1107 | + * Display cat or subcat |
|
| 1108 | + */ |
|
| 1109 | 1109 | function display() |
| 1110 | 1110 | { |
| 1111 | 1111 | global $db, $template, $phpbb_root_path; |
@@ -1252,8 +1252,8 @@ discard block |
||
| 1252 | 1252 | var $categorie = array(); |
| 1253 | 1253 | |
| 1254 | 1254 | /** |
| 1255 | - * Constructor |
|
| 1256 | - */ |
|
| 1255 | + * Constructor |
|
| 1256 | + */ |
|
| 1257 | 1257 | function directory_cron($catrow) |
| 1258 | 1258 | { |
| 1259 | 1259 | $this->categorie = $catrow; |