{"action":"closed","issue":{"url":"https://api.github.com/repos/mediawiki4intranet/IntraACL/issues/40","labels_url":"https://api.github.com/repos/mediawiki4intranet/IntraACL/issues/40/labels{/name}","comments_url":"https://api.github.com/repos/mediawiki4intranet/IntraACL/issues/40/comments","events_url":"https://api.github.com/repos/mediawiki4intranet/IntraACL/issues/40/events","html_url":"https://github.com/mediawiki4intranet/IntraACL/issues/40","id":98415918,"number":40,"title":"Questions regarding patch for MW 1.25 - Bug in patch for MW 1.24.1?","user":{"login":"hermannschwaerzlerUIBK","id":9034139,"avatar_url":"https://avatars.githubusercontent.com/u/9034139?v=3","gravatar_id":"","url":"https://api.github.com/users/hermannschwaerzlerUIBK","html_url":"https://github.com/hermannschwaerzlerUIBK","followers_url":"https://api.github.com/users/hermannschwaerzlerUIBK/followers","following_url":"https://api.github.com/users/hermannschwaerzlerUIBK/following{/other_user}","gists_url":"https://api.github.com/users/hermannschwaerzlerUIBK/gists{/gist_id}","starred_url":"https://api.github.com/users/hermannschwaerzlerUIBK/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hermannschwaerzlerUIBK/subscriptions","organizations_url":"https://api.github.com/users/hermannschwaerzlerUIBK/orgs","repos_url":"https://api.github.com/users/hermannschwaerzlerUIBK/repos","events_url":"https://api.github.com/users/hermannschwaerzlerUIBK/events{/privacy}","received_events_url":"https://api.github.com/users/hermannschwaerzlerUIBK/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-07-31T15:42:25Z","updated_at":"2015-08-25T10:42:39Z","closed_at":"2015-08-25T10:42:39Z","body":"Hi everybody,\r\n\r\nI am working on a patch for MW 1.25. Starting with the patch for 1.24.1 I was able to almost finish that task. The patch tool was able to apply most of the changes (with some offsets). Others I was able to apply manually by comparing 1.25-code and 1.24-code. But there are two changes that I can't figure out how to apply:\r\n``` diff\r\n--- includes/api/ApiQueryBacklinks.php\r\n+++ includes/api/ApiQueryBacklinks.php\r\n@@ -367,6 +372,11 @@\r\n        private function extractRowInfo( $row ) {\r\n                $this->pageMap[$row->page_namespace][$row->page_title] = $row->page_id;\r\n                $t = Title::makeTitle( $row->page_namespace, $row->page_title );\r\n+               // <IntraACL>\r\n+               if ( !$t->userCan( 'read' ) ) {\r\n+                       continue;\r\n+               }\r\n+               // </IntraACL>\r\n                $a = array( 'pageid' => intval( $row->page_id ) );\r\n                ApiQueryBase::addTitleInfo( $a, $t );\r\n                if ( $row->page_is_redirect ) {\r\n@@ -379,7 +389,13 @@\r\n \r\n        private function extractRedirRowInfo( $row ) {\r\n                $a['pageid'] = intval( $row->page_id );\r\n-               ApiQueryBase::addTitleInfo( $a, Title::makeTitle( $row->page_namespace, $row->page_title ) );\r\n+               $t = Title::makeTitle( $row->page_namespace, $row->page_title );\r\n+               // <IntraACL>\r\n+               if ( !$t->userCan( 'read' ) ) {\r\n+                       continue;\r\n+               }\r\n+               // </IntraACL>\r\n+               ApiQueryBase::addTitleInfo( $a, $t );\r\n                if ( $row->page_is_redirect ) {\r\n                        $a['redirect'] = '';\r\n                }\r\n```\r\nI think I know where to put that in the 1.25-code but what makes me wonder is this: Did this patch really work in 1.24?\r\nThere are two ``continue``s that are not inside a loop! The two functions they are in *are in fact called inside a loop*, but ``continue`` does not work that way, does it? You can't ``continue`` a loop from inside a function called in that loop, can you?\r\nOr am I missing something?"}}