GitHub PullRequestReviewCommentEvent at 2014-02-19 18:48:13
Repository: boardrules
Actor: Pico88
Payload: {"comment":{"url":"https://api.github.com/repos/phpbb-extensions/boardrules/pulls/comments/9877328","id":9877328,"diff_hunk":"@@ -98,4 +103,51 @@ public function display_language_selection()\n \t\t\t$this->display_rules();\n \t\t}\n \t}\n+\n+\t/**\n+\t* Display the rules\n+\t*\n+\t* @param int $language Language selection identifier; default: 0\n+\t* @param int $parent_id Category to display rules from; default: 0\n+\t* @return null\n+\t* @access public\n+\t*/\n+\tpublic function display_rules($language = 0, $parent_id = 0)\n+\t{\n+\t\t// Grab all the rules in the current user's language\n+\t\t$entities = $this->rule_operator->get_rules($language, $parent_id);\n+\n+\t\t$last_right_id = 0;\n+\n+\t\tforeach ($entities as $entity)\n+\t\t{\n+\t\t\tif ($entity->get_left_id() < $last_right_id)\n+\t\t\t{\n+\t\t\t\tcontinue; // The current rule is a child of a previous rule, do not display it\n+\t\t\t}\n+\n+\t\t\t$is_category = false;\n+\n+\t\t\tif ($entity->get_right_id() - $entity->get_left_id() > 1)\n+\t\t\t{\n+\t\t\t\t// Rule categories\n+\t\t\t\t$is_category = true;\n+\t\t\t}\n+\n+\t\t\t$this->template->assign_block_vars('rules', array(\n+\t\t\t\t'TITLE'\t\t\t\t=> $entity->get_title(),\n+\t\t\t\t'RULE_IMAGE'\t\t=> $is_category ? '<img src=\"images/icon_subfolder.gif\" />' : '<img src=\"images/icon_folder.gif\" />',\n+\n+\t\t\t\t'U_ADD'\t\t\t\t=> \"{$this->u_action}&amp;language={$language}&amp;parent_id={$parent_id}&amp;action=add\",\n+\t\t\t\t'U_BACK'\t\t\t=> \"{$this->u_action}&amp;language={$language}&amp;parent_id=\" . $entity-get_parent_id(),","path":"controller/admin_controller.php","position":69,"original_position":69,"commit_id":"32c971473c697bd2c638f5f1ecae7392f2b07e7c","original_commit_id":"32c971473c697bd2c638f5f1ecae7392f2b07e7c","user":{"login":"Pico88","id":721628,"avatar_url":"https://gravatar.com/avatar/6363384c5bf8827e79e98eebdeb39efc?d=https%3A%2F%2Fidenticons.github.com%2F3b1ef239a16a96710899dd97b3b3ad86.png&r=x","gravatar_id":"6363384c5bf8827e79e98eebdeb39efc","url":"https://api.github.com/users/Pico88","html_url":"https://github.com/Pico88","followers_url":"https://api.github.com/users/Pico88/followers","following_url":"https://api.github.com/users/Pico88/following{/other_user}","gists_url":"https://api.github.com/users/Pico88/gists{/gist_id}","starred_url":"https://api.github.com/users/Pico88/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Pico88/subscriptions","organizations_url":"https://api.github.com/users/Pico88/orgs","repos_url":"https://api.github.com/users/Pico88/repos","events_url":"https://api.github.com/users/Pico88/events{/privacy}","received_events_url":"https://api.github.com/users/Pico88/received_events","type":"User","site_admin":false},"body":"My mistake. It should not be here. :)\r\n","created_at":"2014-02-19T18:48:13Z","updated_at":"2014-02-19T18:48:13Z","html_url":"https://github.com/phpbb-extensions/boardrules/pull/47#discussion_r9877328","pull_request_url":"https://api.github.com/repos/phpbb-extensions/boardrules/pulls/47","_links":{"self":{"href":"https://api.github.com/repos/phpbb-extensions/boardrules/pulls/comments/9877328"},"html":{"href":"https://github.com/phpbb-extensions/boardrules/pull/47#discussion_r9877328"},"pull_request":{"href":"https://api.github.com/repos/phpbb-extensions/boardrules/pulls/47"}}}}