{"action":"created","comment":{"url":"https://api.github.com/repos/easySuite/ding2/pulls/comments/87143973","pull_request_review_id":7766980,"id":87143973,"diff_hunk":"@@ -925,15 +925,23 @@ function ting_search_submit($form, &$form_state) {\n   $fields = array();\n \n   $extended_fields = array(\n-    'creator' => 'term.creator',\n+    'author' => 'term.creator',\n     'title' => 'term.title',\n     'subject' => 'term.subject',\n   );\n \n-  foreach ($extended_fields as $name => $index) {\n-    if (!empty($form_state['values'][$name])) {\n-      $value = $form_state['values'][$name];\n-      $fields[] = $index . '=' . (strpos($value, ' ') ? '\"' . $value . '\"' : $value);\n+  // Allow other modules change fields.\n+  drupal_alter('ting_search_fields', $extended_fields);\n+\n+  foreach ($extended_fields as $name => $data) {\n+    if (isset($data['value'])) {\n+      $fields[] = $data['value'];\n+    }\n+    else {\n+      $value = drupal_array_get_nested_value($form_state['values'], $data['parents']);\n+      if (!empty($value)) {\n+        $fields[] = $data['index'] . '=' . (strpos($value, ' ') ? '\"' . $value . '\"' : $value);","path":"modules/ting_search/ting_search.module","position":24,"original_position":24,"commit_id":"fc0e73557224dbf96e6798c13f3c94ac048d80a9","original_commit_id":"fc0e73557224dbf96e6798c13f3c94ac048d80a9","user":{"login":"AnatolyMuntean","id":574498,"avatar_url":"https://avatars.githubusercontent.com/u/574498?v=3","gravatar_id":"","url":"https://api.github.com/users/AnatolyMuntean","html_url":"https://github.com/AnatolyMuntean","followers_url":"https://api.github.com/users/AnatolyMuntean/followers","following_url":"https://api.github.com/users/AnatolyMuntean/following{/other_user}","gists_url":"https://api.github.com/users/AnatolyMuntean/gists{/gist_id}","starred_url":"https://api.github.com/users/AnatolyMuntean/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AnatolyMuntean/subscriptions","organizations_url":"https://api.github.com/users/AnatolyMuntean/orgs","repos_url":"https://api.github.com/users/AnatolyMuntean/repos","events_url":"https://api.github.com/users/AnatolyMuntean/events{/privacy}","received_events_url":"https://api.github.com/users/AnatolyMuntean/received_events","type":"User","site_admin":false},"body":"This can lead to unexpected results, since strpos() can return 0 as well (beginning of the string).","created_at":"2016-11-09T07:36:24Z","updated_at":"2016-11-09T07:36:25Z","html_url":"https://github.com/easySuite/ding2/pull/175#discussion_r87143973","pull_request_url":"https://api.github.com/repos/easySuite/ding2/pulls/175","_links":{"self":{"href":"https://api.github.com/repos/easySuite/ding2/pulls/comments/87143973"},"html":{"href":"https://github.com/easySuite/ding2/pull/175#discussion_r87143973"},"pull_request":{"href":"https://api.github.com/repos/easySuite/ding2/pulls/175"}}},"pull_request":{"url":"https://api.github.com/repos/easySuite/ding2/pulls/175","id":92754477,"html_url":"https://github.com/easySuite/ding2/pull/175","diff_url":"https://github.com/easySuite/ding2/pull/175.diff","patch_url":"https://github.com/easySuite/ding2/pull/175.patch","issue_url":"https://api.github.com/repos/easySuite/ding2/issues/175","number":175,"state":"open","locked":false,"title":"EASYOPAC-336 - Fix extended search for rosbib.","user":{"login":"makcumm","id":575849,"avatar_url":"https://avatars.githubusercontent.com/u/575849?v=3","gravatar_id":"","url":"https://api.github.com/users/makcumm","html_url":"https://github.com/makcumm","followers_url":"https://api.github.com/users/makcumm/followers","following_url":"https://api.github.com/users/makcumm/following{/other_user}","gists_url":"https://api.github.com/users/makcumm/gists{/gist_id}","starred_url":"https://api.github.com/users/makcumm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/makcumm/subscriptions","organizations_url":"https://api.github.com/users/makcumm/orgs","repos_url":"https://api.github.com/users/makcumm/repos","events_url":"https://api.github.com/users/makcumm/events{/privacy}","received_events_url":"https://api.github.com/users/makcumm/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-11-08T10:48:53Z","updated_at":"2016-11-09T07:36:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0b2b61245eddc6781564cfbca83639131198e016","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/easySuite/ding2/pulls/175/commits","review_comments_url":"https://api.github.com/repos/easySuite/ding2/pulls/175/comments","review_comment_url":"https://api.github.com/repos/easySuite/ding2/pulls/comments{/number}","comments_url":"https://api.github.com/repos/easySuite/ding2/issues/175/comments","statuses_url":"https://api.github.com/repos/easySuite/ding2/statuses/fc0e73557224dbf96e6798c13f3c94ac048d80a9","head":{"label":"easySuite:EASYOPAC-336","ref":"EASYOPAC-336","sha":"fc0e73557224dbf96e6798c13f3c94ac048d80a9","user":{"login":"easySuite","id":15833286,"avatar_url":"https://avatars.githubusercontent.com/u/15833286?v=3","gravatar_id":"","url":"https://api.github.com/users/easySuite","html_url":"https://github.com/easySuite","followers_url":"https://api.github.com/users/easySuite/followers","following_url":"https://api.github.com/users/easySuite/following{/other_user}","gists_url":"https://api.github.com/users/easySuite/gists{/gist_id}","starred_url":"https://api.github.com/users/easySuite/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/easySuite/subscriptions","organizations_url":"https://api.github.com/users/easySuite/orgs","repos_url":"https://api.github.com/users/easySuite/repos","events_url":"https://api.github.com/users/easySuite/events{/privacy}","received_events_url":"https://api.github.com/users/easySuite/received_events","type":"Organization","site_admin":false},"repo":{"id":48030945,"name":"ding2","full_name":"easySuite/ding2","owner":{"login":"easySuite","id":15833286,"avatar_url":"https://avatars.githubusercontent.com/u/15833286?v=3","gravatar_id":"","url":"https://api.github.com/users/easySuite","html_url":"https://github.com/easySuite","followers_url":"https://api.github.com/users/easySuite/followers","following_url":"https://api.github.com/users/easySuite/following{/other_user}","gists_url":"https://api.github.com/users/easySuite/gists{/gist_id}","starred_url":"https://api.github.com/users/easySuite/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/easySuite/subscriptions","organizations_url":"https://api.github.com/users/easySuite/orgs","repos_url":"https://api.github.com/users/easySuite/repos","events_url":"https://api.github.com/users/easySuite/events{/privacy}","received_events_url":"https://api.github.com/users/easySuite/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/easySuite/ding2","description":"Ding install profile","fork":true,"url":"https://api.github.com/repos/easySuite/ding2","forks_url":"https://api.github.com/repos/easySuite/ding2/forks","keys_url":"https://api.github.com/repos/easySuite/ding2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/easySuite/ding2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/easySuite/ding2/teams","hooks_url":"https://api.github.com/repos/easySuite/ding2/hooks","issue_events_url":"https://api.github.com/repos/easySuite/ding2/issues/events{/number}","events_url":"https://api.github.com/repos/easySuite/ding2/events","assignees_url":"https://api.github.com/repos/easySuite/ding2/assignees{/user}","branches_url":"https://api.github.com/repos/easySuite/ding2/branches{/branch}","tags_url":"https://api.github.com/repos/easySuite/ding2/tags","blobs_url":"https://api.github.com/repos/easySuite/ding2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/easySuite/ding2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/easySuite/ding2/git/refs{/sha}","trees_url":"https://api.github.com/repos/easySuite/ding2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/easySuite/ding2/statuses/{sha}","languages_url":"https://api.github.com/repos/easySuite/ding2/languages","stargazers_url":"https://api.github.com/repos/easySuite/ding2/stargazers","contributors_url":"https://api.github.com/repos/easySuite/ding2/contributors","subscribers_url":"https://api.github.com/repos/easySuite/ding2/subscribers","subscription_url":"https://api.github.com/repos/easySuite/ding2/subscription","commits_url":"https://api.github.com/repos/easySuite/ding2/commits{/sha}","git_commits_url":"https://api.github.com/repos/easySuite/ding2/git/commits{/sha}","comments_url":"https://api.github.com/repos/easySuite/ding2/comments{/number}","issue_comment_url":"https://api.github.com/repos/easySuite/ding2/issues/comments{/number}","contents_url":"https://api.github.com/repos/easySuite/ding2/contents/{+path}","compare_url":"https://api.github.com/repos/easySuite/ding2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/easySuite/ding2/merges","archive_url":"https://api.github.com/repos/easySuite/ding2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/easySuite/ding2/downloads","issues_url":"https://api.github.com/repos/easySuite/ding2/issues{/number}","pulls_url":"https://api.github.com/repos/easySuite/ding2/pulls{/number}","milestones_url":"https://api.github.com/repos/easySuite/ding2/milestones{/number}","notifications_url":"https://api.github.com/repos/easySuite/ding2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/easySuite/ding2/labels{/name}","releases_url":"https://api.github.com/repos/easySuite/ding2/releases{/id}","deployments_url":"https://api.github.com/repos/easySuite/ding2/deployments","created_at":"2015-12-15T08:53:09Z","updated_at":"2016-05-11T07:09:02Z","pushed_at":"2016-11-08T10:48:53Z","git_url":"git://github.com/easySuite/ding2.git","ssh_url":"git@github.com:easySuite/ding2.git","clone_url":"https://github.com/easySuite/ding2.git","svn_url":"https://github.com/easySuite/ding2","homepage":"","size":96109,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":6,"forks":2,"open_issues":6,"watchers":0,"default_branch":"easyopac"}},"base":{"label":"easySuite:rosbib","ref":"rosbib","sha":"5aaebdbbddb3c86a4e380cdef1c061df25938c18","user":{"login":"easySuite","id":15833286,"avatar_url":"https://avatars.githubusercontent.com/u/15833286?v=3","gravatar_id":"","url":"https://api.github.com/users/easySuite","html_url":"https://github.com/easySuite","followers_url":"https://api.github.com/users/easySuite/followers","following_url":"https://api.github.com/users/easySuite/following{/other_user}","gists_url":"https://api.github.com/users/easySuite/gists{/gist_id}","starred_url":"https://api.github.com/users/easySuite/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/easySuite/subscriptions","organizations_url":"https://api.github.com/users/easySuite/orgs","repos_url":"https://api.github.com/users/easySuite/repos","events_url":"https://api.github.com/users/easySuite/events{/privacy}","received_events_url":"https://api.github.com/users/easySuite/received_events","type":"Organization","site_admin":false},"repo":{"id":48030945,"name":"ding2","full_name":"easySuite/ding2","owner":{"login":"easySuite","id":15833286,"avatar_url":"https://avatars.githubusercontent.com/u/15833286?v=3","gravatar_id":"","url":"https://api.github.com/users/easySuite","html_url":"https://github.com/easySuite","followers_url":"https://api.github.com/users/easySuite/followers","following_url":"https://api.github.com/users/easySuite/following{/other_user}","gists_url":"https://api.github.com/users/easySuite/gists{/gist_id}","starred_url":"https://api.github.com/users/easySuite/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/easySuite/subscriptions","organizations_url":"https://api.github.com/users/easySuite/orgs","repos_url":"https://api.github.com/users/easySuite/repos","events_url":"https://api.github.com/users/easySuite/events{/privacy}","received_events_url":"https://api.github.com/users/easySuite/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/easySuite/ding2","description":"Ding install profile","fork":true,"url":"https://api.github.com/repos/easySuite/ding2","forks_url":"https://api.github.com/repos/easySuite/ding2/forks","keys_url":"https://api.github.com/repos/easySuite/ding2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/easySuite/ding2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/easySuite/ding2/teams","hooks_url":"https://api.github.com/repos/easySuite/ding2/hooks","issue_events_url":"https://api.github.com/repos/easySuite/ding2/issues/events{/number}","events_url":"https://api.github.com/repos/easySuite/ding2/events","assignees_url":"https://api.github.com/repos/easySuite/ding2/assignees{/user}","branches_url":"https://api.github.com/repos/easySuite/ding2/branches{/branch}","tags_url":"https://api.github.com/repos/easySuite/ding2/tags","blobs_url":"https://api.github.com/repos/easySuite/ding2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/easySuite/ding2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/easySuite/ding2/git/refs{/sha}","trees_url":"https://api.github.com/repos/easySuite/ding2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/easySuite/ding2/statuses/{sha}","languages_url":"https://api.github.com/repos/easySuite/ding2/languages","stargazers_url":"https://api.github.com/repos/easySuite/ding2/stargazers","contributors_url":"https://api.github.com/repos/easySuite/ding2/contributors","subscribers_url":"https://api.github.com/repos/easySuite/ding2/subscribers","subscription_url":"https://api.github.com/repos/easySuite/ding2/subscription","commits_url":"https://api.github.com/repos/easySuite/ding2/commits{/sha}","git_commits_url":"https://api.github.com/repos/easySuite/ding2/git/commits{/sha}","comments_url":"https://api.github.com/repos/easySuite/ding2/comments{/number}","issue_comment_url":"https://api.github.com/repos/easySuite/ding2/issues/comments{/number}","contents_url":"https://api.github.com/repos/easySuite/ding2/contents/{+path}","compare_url":"https://api.github.com/repos/easySuite/ding2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/easySuite/ding2/merges","archive_url":"https://api.github.com/repos/easySuite/ding2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/easySuite/ding2/downloads","issues_url":"https://api.github.com/repos/easySuite/ding2/issues{/number}","pulls_url":"https://api.github.com/repos/easySuite/ding2/pulls{/number}","milestones_url":"https://api.github.com/repos/easySuite/ding2/milestones{/number}","notifications_url":"https://api.github.com/repos/easySuite/ding2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/easySuite/ding2/labels{/name}","releases_url":"https://api.github.com/repos/easySuite/ding2/releases{/id}","deployments_url":"https://api.github.com/repos/easySuite/ding2/deployments","created_at":"2015-12-15T08:53:09Z","updated_at":"2016-05-11T07:09:02Z","pushed_at":"2016-11-08T10:48:53Z","git_url":"git://github.com/easySuite/ding2.git","ssh_url":"git@github.com:easySuite/ding2.git","clone_url":"https://github.com/easySuite/ding2.git","svn_url":"https://github.com/easySuite/ding2","homepage":"","size":96109,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":6,"forks":2,"open_issues":6,"watchers":0,"default_branch":"easyopac"}},"_links":{"self":{"href":"https://api.github.com/repos/easySuite/ding2/pulls/175"},"html":{"href":"https://github.com/easySuite/ding2/pull/175"},"issue":{"href":"https://api.github.com/repos/easySuite/ding2/issues/175"},"comments":{"href":"https://api.github.com/repos/easySuite/ding2/issues/175/comments"},"review_comments":{"href":"https://api.github.com/repos/easySuite/ding2/pulls/175/comments"},"review_comment":{"href":"https://api.github.com/repos/easySuite/ding2/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/easySuite/ding2/pulls/175/commits"},"statuses":{"href":"https://api.github.com/repos/easySuite/ding2/statuses/fc0e73557224dbf96e6798c13f3c94ac048d80a9"}}}}
{"actor":{"display_login":"AnatolyMuntean"}}