{"action":"created","comment":{"url":"https://api.github.com/repos/forkcms/forkcms/pulls/comments/32403097","id":32403097,"diff_hunk":"@@ -272,4 +272,33 @@ public static function truncate($var = null, $length, $useHellip = true, $closes\n             return \\SpoonFilter::htmlspecialchars($var, ENT_QUOTES);\n         }\n     }\n+\n+    /**\n+     * Shows a v or x to indicate the boolean state (Y|N, j|n, true|false)\n+     *\n+     * @param string|bool $status\n+     * @param bool        $reverse show the opposite of the status\n+     * @return string\n+     */\n+    public static function showBool($status, $reverse = false)\n+    {\n+        $showTrue = '<strong style=\"color:green\">&#10003;</strong>';\n+        $showFalse = '<strong style=\"color:red\">&#10008;</strong>';\n+\n+        if ($reverse) {\n+            if ($status === 'Y' || $status === 'y' || $status === 1 || $status === '1' || $status === true) {\n+                return $showFalse;\n+            } elseif ($status === 'N' || $status === 'n' || $status === 0 || $status === '0' || $status === false) {","path":"src/Backend/Core/Engine/TemplateModifiers.php","position":20,"original_position":20,"commit_id":"586d6fe7c6f4be7f1298ec636675af0dbdb6c7a3","original_commit_id":"586d6fe7c6f4be7f1298ec636675af0dbdb6c7a3","user":{"login":"WouterSioen","id":1398405,"avatar_url":"https://avatars.githubusercontent.com/u/1398405?v=3","gravatar_id":"","url":"https://api.github.com/users/WouterSioen","html_url":"https://github.com/WouterSioen","followers_url":"https://api.github.com/users/WouterSioen/followers","following_url":"https://api.github.com/users/WouterSioen/following{/other_user}","gists_url":"https://api.github.com/users/WouterSioen/gists{/gist_id}","starred_url":"https://api.github.com/users/WouterSioen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WouterSioen/subscriptions","organizations_url":"https://api.github.com/users/WouterSioen/orgs","repos_url":"https://api.github.com/users/WouterSioen/repos","events_url":"https://api.github.com/users/WouterSioen/events{/privacy}","received_events_url":"https://api.github.com/users/WouterSioen/received_events","type":"User","site_admin":false},"body":"you can even drop the 'else' part from the 'elseif', because you return in the previous part.","created_at":"2015-06-15T09:21:09Z","updated_at":"2015-06-15T09:21:09Z","html_url":"https://github.com/forkcms/forkcms/pull/1240#discussion_r32403097","pull_request_url":"https://api.github.com/repos/forkcms/forkcms/pulls/1240","_links":{"self":{"href":"https://api.github.com/repos/forkcms/forkcms/pulls/comments/32403097"},"html":{"href":"https://github.com/forkcms/forkcms/pull/1240#discussion_r32403097"},"pull_request":{"href":"https://api.github.com/repos/forkcms/forkcms/pulls/1240"}}},"pull_request":{"url":"https://api.github.com/repos/forkcms/forkcms/pulls/1240","id":37667346,"html_url":"https://github.com/forkcms/forkcms/pull/1240","diff_url":"https://github.com/forkcms/forkcms/pull/1240.diff","patch_url":"https://github.com/forkcms/forkcms/pull/1240.patch","issue_url":"https://api.github.com/repos/forkcms/forkcms/issues/1240","number":1240,"state":"open","locked":false,"title":"Template modifier show bool","user":{"login":"carakas","id":3634654,"avatar_url":"https://avatars.githubusercontent.com/u/3634654?v=3","gravatar_id":"","url":"https://api.github.com/users/carakas","html_url":"https://github.com/carakas","followers_url":"https://api.github.com/users/carakas/followers","following_url":"https://api.github.com/users/carakas/following{/other_user}","gists_url":"https://api.github.com/users/carakas/gists{/gist_id}","starred_url":"https://api.github.com/users/carakas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/carakas/subscriptions","organizations_url":"https://api.github.com/users/carakas/orgs","repos_url":"https://api.github.com/users/carakas/repos","events_url":"https://api.github.com/users/carakas/events{/privacy}","received_events_url":"https://api.github.com/users/carakas/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-06-15T08:14:11Z","updated_at":"2015-06-15T09:21:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e30a6c688f2d56b2d17a339f8f47beb87142eab9","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/forkcms/forkcms/pulls/1240/commits","review_comments_url":"https://api.github.com/repos/forkcms/forkcms/pulls/1240/comments","review_comment_url":"https://api.github.com/repos/forkcms/forkcms/pulls/comments{/number}","comments_url":"https://api.github.com/repos/forkcms/forkcms/issues/1240/comments","statuses_url":"https://api.github.com/repos/forkcms/forkcms/statuses/586d6fe7c6f4be7f1298ec636675af0dbdb6c7a3","head":{"label":"justcarakas:template-modefier-show-bool","ref":"template-modefier-show-bool","sha":"586d6fe7c6f4be7f1298ec636675af0dbdb6c7a3","user":{"login":"justcarakas","id":11027428,"avatar_url":"https://avatars.githubusercontent.com/u/11027428?v=3","gravatar_id":"","url":"https://api.github.com/users/justcarakas","html_url":"https://github.com/justcarakas","followers_url":"https://api.github.com/users/justcarakas/followers","following_url":"https://api.github.com/users/justcarakas/following{/other_user}","gists_url":"https://api.github.com/users/justcarakas/gists{/gist_id}","starred_url":"https://api.github.com/users/justcarakas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/justcarakas/subscriptions","organizations_url":"https://api.github.com/users/justcarakas/orgs","repos_url":"https://api.github.com/users/justcarakas/repos","events_url":"https://api.github.com/users/justcarakas/events{/privacy}","received_events_url":"https://api.github.com/users/justcarakas/received_events","type":"Organization","site_admin":false},"repo":{"id":30862709,"name":"forkcms","full_name":"justcarakas/forkcms","owner":{"login":"justcarakas","id":11027428,"avatar_url":"https://avatars.githubusercontent.com/u/11027428?v=3","gravatar_id":"","url":"https://api.github.com/users/justcarakas","html_url":"https://github.com/justcarakas","followers_url":"https://api.github.com/users/justcarakas/followers","following_url":"https://api.github.com/users/justcarakas/following{/other_user}","gists_url":"https://api.github.com/users/justcarakas/gists{/gist_id}","starred_url":"https://api.github.com/users/justcarakas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/justcarakas/subscriptions","organizations_url":"https://api.github.com/users/justcarakas/orgs","repos_url":"https://api.github.com/users/justcarakas/repos","events_url":"https://api.github.com/users/justcarakas/events{/privacy}","received_events_url":"https://api.github.com/users/justcarakas/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/justcarakas/forkcms","description":"Fork is an open source CMS.","fork":true,"url":"https://api.github.com/repos/justcarakas/forkcms","forks_url":"https://api.github.com/repos/justcarakas/forkcms/forks","keys_url":"https://api.github.com/repos/justcarakas/forkcms/keys{/key_id}","collaborators_url":"https://api.github.com/repos/justcarakas/forkcms/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/justcarakas/forkcms/teams","hooks_url":"https://api.github.com/repos/justcarakas/forkcms/hooks","issue_events_url":"https://api.github.com/repos/justcarakas/forkcms/issues/events{/number}","events_url":"https://api.github.com/repos/justcarakas/forkcms/events","assignees_url":"https://api.github.com/repos/justcarakas/forkcms/assignees{/user}","branches_url":"https://api.github.com/repos/justcarakas/forkcms/branches{/branch}","tags_url":"https://api.github.com/repos/justcarakas/forkcms/tags","blobs_url":"https://api.github.com/repos/justcarakas/forkcms/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/justcarakas/forkcms/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/justcarakas/forkcms/git/refs{/sha}","trees_url":"https://api.github.com/repos/justcarakas/forkcms/git/trees{/sha}","statuses_url":"https://api.github.com/repos/justcarakas/forkcms/statuses/{sha}","languages_url":"https://api.github.com/repos/justcarakas/forkcms/languages","stargazers_url":"https://api.github.com/repos/justcarakas/forkcms/stargazers","contributors_url":"https://api.github.com/repos/justcarakas/forkcms/contributors","subscribers_url":"https://api.github.com/repos/justcarakas/forkcms/subscribers","subscription_url":"https://api.github.com/repos/justcarakas/forkcms/subscription","commits_url":"https://api.github.com/repos/justcarakas/forkcms/commits{/sha}","git_commits_url":"https://api.github.com/repos/justcarakas/forkcms/git/commits{/sha}","comments_url":"https://api.github.com/repos/justcarakas/forkcms/comments{/number}","issue_comment_url":"https://api.github.com/repos/justcarakas/forkcms/issues/comments{/number}","contents_url":"https://api.github.com/repos/justcarakas/forkcms/contents/{+path}","compare_url":"https://api.github.com/repos/justcarakas/forkcms/compare/{base}...{head}","merges_url":"https://api.github.com/repos/justcarakas/forkcms/merges","archive_url":"https://api.github.com/repos/justcarakas/forkcms/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/justcarakas/forkcms/downloads","issues_url":"https://api.github.com/repos/justcarakas/forkcms/issues{/number}","pulls_url":"https://api.github.com/repos/justcarakas/forkcms/pulls{/number}","milestones_url":"https://api.github.com/repos/justcarakas/forkcms/milestones{/number}","notifications_url":"https://api.github.com/repos/justcarakas/forkcms/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/justcarakas/forkcms/labels{/name}","releases_url":"https://api.github.com/repos/justcarakas/forkcms/releases{/id}","created_at":"2015-02-16T10:05:25Z","updated_at":"2015-02-26T16:43:37Z","pushed_at":"2015-06-15T09:15:56Z","git_url":"git://github.com/justcarakas/forkcms.git","ssh_url":"git@github.com:justcarakas/forkcms.git","clone_url":"https://github.com/justcarakas/forkcms.git","svn_url":"https://github.com/justcarakas/forkcms","homepage":"http://www.fork-cms.com","size":33944,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"forkcms:master","ref":"master","sha":"3117ac19cd566f5378699ad6f40f19cf64d43c7a","user":{"login":"forkcms","id":312505,"avatar_url":"https://avatars.githubusercontent.com/u/312505?v=3","gravatar_id":"","url":"https://api.github.com/users/forkcms","html_url":"https://github.com/forkcms","followers_url":"https://api.github.com/users/forkcms/followers","following_url":"https://api.github.com/users/forkcms/following{/other_user}","gists_url":"https://api.github.com/users/forkcms/gists{/gist_id}","starred_url":"https://api.github.com/users/forkcms/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/forkcms/subscriptions","organizations_url":"https://api.github.com/users/forkcms/orgs","repos_url":"https://api.github.com/users/forkcms/repos","events_url":"https://api.github.com/users/forkcms/events{/privacy}","received_events_url":"https://api.github.com/users/forkcms/received_events","type":"Organization","site_admin":false},"repo":{"id":1138583,"name":"forkcms","full_name":"forkcms/forkcms","owner":{"login":"forkcms","id":312505,"avatar_url":"https://avatars.githubusercontent.com/u/312505?v=3","gravatar_id":"","url":"https://api.github.com/users/forkcms","html_url":"https://github.com/forkcms","followers_url":"https://api.github.com/users/forkcms/followers","following_url":"https://api.github.com/users/forkcms/following{/other_user}","gists_url":"https://api.github.com/users/forkcms/gists{/gist_id}","starred_url":"https://api.github.com/users/forkcms/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/forkcms/subscriptions","organizations_url":"https://api.github.com/users/forkcms/orgs","repos_url":"https://api.github.com/users/forkcms/repos","events_url":"https://api.github.com/users/forkcms/events{/privacy}","received_events_url":"https://api.github.com/users/forkcms/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/forkcms/forkcms","description":"Fork is an open source CMS.","fork":false,"url":"https://api.github.com/repos/forkcms/forkcms","forks_url":"https://api.github.com/repos/forkcms/forkcms/forks","keys_url":"https://api.github.com/repos/forkcms/forkcms/keys{/key_id}","collaborators_url":"https://api.github.com/repos/forkcms/forkcms/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/forkcms/forkcms/teams","hooks_url":"https://api.github.com/repos/forkcms/forkcms/hooks","issue_events_url":"https://api.github.com/repos/forkcms/forkcms/issues/events{/number}","events_url":"https://api.github.com/repos/forkcms/forkcms/events","assignees_url":"https://api.github.com/repos/forkcms/forkcms/assignees{/user}","branches_url":"https://api.github.com/repos/forkcms/forkcms/branches{/branch}","tags_url":"https://api.github.com/repos/forkcms/forkcms/tags","blobs_url":"https://api.github.com/repos/forkcms/forkcms/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/forkcms/forkcms/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/forkcms/forkcms/git/refs{/sha}","trees_url":"https://api.github.com/repos/forkcms/forkcms/git/trees{/sha}","statuses_url":"https://api.github.com/repos/forkcms/forkcms/statuses/{sha}","languages_url":"https://api.github.com/repos/forkcms/forkcms/languages","stargazers_url":"https://api.github.com/repos/forkcms/forkcms/stargazers","contributors_url":"https://api.github.com/repos/forkcms/forkcms/contributors","subscribers_url":"https://api.github.com/repos/forkcms/forkcms/subscribers","subscription_url":"https://api.github.com/repos/forkcms/forkcms/subscription","commits_url":"https://api.github.com/repos/forkcms/forkcms/commits{/sha}","git_commits_url":"https://api.github.com/repos/forkcms/forkcms/git/commits{/sha}","comments_url":"https://api.github.com/repos/forkcms/forkcms/comments{/number}","issue_comment_url":"https://api.github.com/repos/forkcms/forkcms/issues/comments{/number}","contents_url":"https://api.github.com/repos/forkcms/forkcms/contents/{+path}","compare_url":"https://api.github.com/repos/forkcms/forkcms/compare/{base}...{head}","merges_url":"https://api.github.com/repos/forkcms/forkcms/merges","archive_url":"https://api.github.com/repos/forkcms/forkcms/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/forkcms/forkcms/downloads","issues_url":"https://api.github.com/repos/forkcms/forkcms/issues{/number}","pulls_url":"https://api.github.com/repos/forkcms/forkcms/pulls{/number}","milestones_url":"https://api.github.com/repos/forkcms/forkcms/milestones{/number}","notifications_url":"https://api.github.com/repos/forkcms/forkcms/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/forkcms/forkcms/labels{/name}","releases_url":"https://api.github.com/repos/forkcms/forkcms/releases{/id}","created_at":"2010-12-04T18:06:15Z","updated_at":"2015-06-10T11:52:31Z","pushed_at":"2015-06-15T09:15:58Z","git_url":"git://github.com/forkcms/forkcms.git","ssh_url":"git@github.com:forkcms/forkcms.git","clone_url":"https://github.com/forkcms/forkcms.git","svn_url":"https://github.com/forkcms/forkcms","homepage":"http://www.fork-cms.com","size":65602,"stargazers_count":866,"watchers_count":866,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":237,"mirror_url":null,"open_issues_count":68,"forks":237,"open_issues":68,"watchers":866,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/forkcms/forkcms/pulls/1240"},"html":{"href":"https://github.com/forkcms/forkcms/pull/1240"},"issue":{"href":"https://api.github.com/repos/forkcms/forkcms/issues/1240"},"comments":{"href":"https://api.github.com/repos/forkcms/forkcms/issues/1240/comments"},"review_comments":{"href":"https://api.github.com/repos/forkcms/forkcms/pulls/1240/comments"},"review_comment":{"href":"https://api.github.com/repos/forkcms/forkcms/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/forkcms/forkcms/pulls/1240/commits"},"statuses":{"href":"https://api.github.com/repos/forkcms/forkcms/statuses/586d6fe7c6f4be7f1298ec636675af0dbdb6c7a3"}}}}