{"action":"created","comment":{"url":"https://api.github.com/repos/ding2/ding_periodical/pulls/comments/45613631","id":45613631,"diff_hunk":"@@ -38,17 +38,17 @@ function ding_periodical_menu() {\n  *\n  * @param TingEntity $entity\n  *   Ting entity for the periodical.\n- * @param string $local_id\n- *   Local library id (faust) for the issue.\n- * @param string $volume\n- *   Volume number (for year books the year).\n- * @param string $issue\n- *   The issue in the volume to reserve.\n+ * @param string $encoded_id\n+ *   Encoded string made of local id, volume and issue data of the item.\n+ *   Value base64 hash of each value, glued together using '$' delimiter\n+ *   and encoded again as whole.\n  *\n  * @return array\n  *   Render array with Ajax commands.\n  */\n-function ding_periodical_reserve_ajax($entity, $local_id, $volume, $issue) {\n+function ding_periodical_reserve_ajax($entity, $encoded_id) {\n+  $id = base64_decode($encoded_id);\n+  list($local_id, $volume, $issue) = array_map('base64_decode', explode('$', $id));","path":"ding_periodical.module","position":33,"original_position":33,"commit_id":"4f105e6802c3835a1b853a0384d827b7a2720f71","original_commit_id":"4f105e6802c3835a1b853a0384d827b7a2720f71","user":{"login":"kasperg","id":73966,"avatar_url":"https://avatars.githubusercontent.com/u/73966?v=3","gravatar_id":"","url":"https://api.github.com/users/kasperg","html_url":"https://github.com/kasperg","followers_url":"https://api.github.com/users/kasperg/followers","following_url":"https://api.github.com/users/kasperg/following{/other_user}","gists_url":"https://api.github.com/users/kasperg/gists{/gist_id}","starred_url":"https://api.github.com/users/kasperg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kasperg/subscriptions","organizations_url":"https://api.github.com/users/kasperg/orgs","repos_url":"https://api.github.com/users/kasperg/repos","events_url":"https://api.github.com/users/kasperg/events{/privacy}","received_events_url":"https://api.github.com/users/kasperg/received_events","type":"User","site_admin":false},"body":"With base64_encoded arguments we do not have to reduce to number of parameters to one here and explode it.  The only thing needed is decoding the three parameters.","created_at":"2015-11-23T15:12:00Z","updated_at":"2015-11-23T15:12:00Z","html_url":"https://github.com/ding2/ding_periodical/pull/6#discussion_r45613631","pull_request_url":"https://api.github.com/repos/ding2/ding_periodical/pulls/6","_links":{"self":{"href":"https://api.github.com/repos/ding2/ding_periodical/pulls/comments/45613631"},"html":{"href":"https://github.com/ding2/ding_periodical/pull/6#discussion_r45613631"},"pull_request":{"href":"https://api.github.com/repos/ding2/ding_periodical/pulls/6"}}},"pull_request":{"url":"https://api.github.com/repos/ding2/ding_periodical/pulls/6","id":44208650,"html_url":"https://github.com/ding2/ding_periodical/pull/6","diff_url":"https://github.com/ding2/ding_periodical/pull/6.diff","patch_url":"https://github.com/ding2/ding_periodical/pull/6.patch","issue_url":"https://api.github.com/repos/ding2/ding_periodical/issues/6","number":6,"state":"open","locked":false,"title":"Issue #1337 by Inlead: Encode item name, for slash in names.","user":{"login":"guddo","id":287648,"avatar_url":"https://avatars.githubusercontent.com/u/287648?v=3","gravatar_id":"","url":"https://api.github.com/users/guddo","html_url":"https://github.com/guddo","followers_url":"https://api.github.com/users/guddo/followers","following_url":"https://api.github.com/users/guddo/following{/other_user}","gists_url":"https://api.github.com/users/guddo/gists{/gist_id}","starred_url":"https://api.github.com/users/guddo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guddo/subscriptions","organizations_url":"https://api.github.com/users/guddo/orgs","repos_url":"https://api.github.com/users/guddo/repos","events_url":"https://api.github.com/users/guddo/events{/privacy}","received_events_url":"https://api.github.com/users/guddo/received_events","type":"User","site_admin":false},"body":"http://platform.dandigbib.org/issues/1337","created_at":"2015-09-04T11:40:24Z","updated_at":"2015-11-23T15:12:00Z","closed_at":null,"merged_at":null,"merge_commit_sha":"cafaf3ff4a54bd5edd0ee3107001eee325456bd5","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ding2/ding_periodical/pulls/6/commits","review_comments_url":"https://api.github.com/repos/ding2/ding_periodical/pulls/6/comments","review_comment_url":"https://api.github.com/repos/ding2/ding_periodical/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ding2/ding_periodical/issues/6/comments","statuses_url":"https://api.github.com/repos/ding2/ding_periodical/statuses/4f105e6802c3835a1b853a0384d827b7a2720f71","head":{"label":"inleadmedia:DDBCMS-1","ref":"DDBCMS-1","sha":"4f105e6802c3835a1b853a0384d827b7a2720f71","user":{"login":"inleadmedia","id":286463,"avatar_url":"https://avatars.githubusercontent.com/u/286463?v=3","gravatar_id":"","url":"https://api.github.com/users/inleadmedia","html_url":"https://github.com/inleadmedia","followers_url":"https://api.github.com/users/inleadmedia/followers","following_url":"https://api.github.com/users/inleadmedia/following{/other_user}","gists_url":"https://api.github.com/users/inleadmedia/gists{/gist_id}","starred_url":"https://api.github.com/users/inleadmedia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/inleadmedia/subscriptions","organizations_url":"https://api.github.com/users/inleadmedia/orgs","repos_url":"https://api.github.com/users/inleadmedia/repos","events_url":"https://api.github.com/users/inleadmedia/events{/privacy}","received_events_url":"https://api.github.com/users/inleadmedia/received_events","type":"Organization","site_admin":false},"repo":{"id":41908641,"name":"ding_periodical","full_name":"inleadmedia/ding_periodical","owner":{"login":"inleadmedia","id":286463,"avatar_url":"https://avatars.githubusercontent.com/u/286463?v=3","gravatar_id":"","url":"https://api.github.com/users/inleadmedia","html_url":"https://github.com/inleadmedia","followers_url":"https://api.github.com/users/inleadmedia/followers","following_url":"https://api.github.com/users/inleadmedia/following{/other_user}","gists_url":"https://api.github.com/users/inleadmedia/gists{/gist_id}","starred_url":"https://api.github.com/users/inleadmedia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/inleadmedia/subscriptions","organizations_url":"https://api.github.com/users/inleadmedia/orgs","repos_url":"https://api.github.com/users/inleadmedia/repos","events_url":"https://api.github.com/users/inleadmedia/events{/privacy}","received_events_url":"https://api.github.com/users/inleadmedia/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/inleadmedia/ding_periodical","description":"","fork":true,"url":"https://api.github.com/repos/inleadmedia/ding_periodical","forks_url":"https://api.github.com/repos/inleadmedia/ding_periodical/forks","keys_url":"https://api.github.com/repos/inleadmedia/ding_periodical/keys{/key_id}","collaborators_url":"https://api.github.com/repos/inleadmedia/ding_periodical/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/inleadmedia/ding_periodical/teams","hooks_url":"https://api.github.com/repos/inleadmedia/ding_periodical/hooks","issue_events_url":"https://api.github.com/repos/inleadmedia/ding_periodical/issues/events{/number}","events_url":"https://api.github.com/repos/inleadmedia/ding_periodical/events","assignees_url":"https://api.github.com/repos/inleadmedia/ding_periodical/assignees{/user}","branches_url":"https://api.github.com/repos/inleadmedia/ding_periodical/branches{/branch}","tags_url":"https://api.github.com/repos/inleadmedia/ding_periodical/tags","blobs_url":"https://api.github.com/repos/inleadmedia/ding_periodical/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/inleadmedia/ding_periodical/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/inleadmedia/ding_periodical/git/refs{/sha}","trees_url":"https://api.github.com/repos/inleadmedia/ding_periodical/git/trees{/sha}","statuses_url":"https://api.github.com/repos/inleadmedia/ding_periodical/statuses/{sha}","languages_url":"https://api.github.com/repos/inleadmedia/ding_periodical/languages","stargazers_url":"https://api.github.com/repos/inleadmedia/ding_periodical/stargazers","contributors_url":"https://api.github.com/repos/inleadmedia/ding_periodical/contributors","subscribers_url":"https://api.github.com/repos/inleadmedia/ding_periodical/subscribers","subscription_url":"https://api.github.com/repos/inleadmedia/ding_periodical/subscription","commits_url":"https://api.github.com/repos/inleadmedia/ding_periodical/commits{/sha}","git_commits_url":"https://api.github.com/repos/inleadmedia/ding_periodical/git/commits{/sha}","comments_url":"https://api.github.com/repos/inleadmedia/ding_periodical/comments{/number}","issue_comment_url":"https://api.github.com/repos/inleadmedia/ding_periodical/issues/comments{/number}","contents_url":"https://api.github.com/repos/inleadmedia/ding_periodical/contents/{+path}","compare_url":"https://api.github.com/repos/inleadmedia/ding_periodical/compare/{base}...{head}","merges_url":"https://api.github.com/repos/inleadmedia/ding_periodical/merges","archive_url":"https://api.github.com/repos/inleadmedia/ding_periodical/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/inleadmedia/ding_periodical/downloads","issues_url":"https://api.github.com/repos/inleadmedia/ding_periodical/issues{/number}","pulls_url":"https://api.github.com/repos/inleadmedia/ding_periodical/pulls{/number}","milestones_url":"https://api.github.com/repos/inleadmedia/ding_periodical/milestones{/number}","notifications_url":"https://api.github.com/repos/inleadmedia/ding_periodical/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/inleadmedia/ding_periodical/labels{/name}","releases_url":"https://api.github.com/repos/inleadmedia/ding_periodical/releases{/id}","created_at":"2015-09-04T09:48:05Z","updated_at":"2015-09-04T09:48:06Z","pushed_at":"2015-11-18T11:08:39Z","git_url":"git://github.com/inleadmedia/ding_periodical.git","ssh_url":"git@github.com:inleadmedia/ding_periodical.git","clone_url":"https://github.com/inleadmedia/ding_periodical.git","svn_url":"https://github.com/inleadmedia/ding_periodical","homepage":"","size":76,"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":"ding2:master","ref":"master","sha":"657518fb24ff6d08bb94f0089fd59dc579dcadb0","user":{"login":"ding2","id":564698,"avatar_url":"https://avatars.githubusercontent.com/u/564698?v=3","gravatar_id":"","url":"https://api.github.com/users/ding2","html_url":"https://github.com/ding2","followers_url":"https://api.github.com/users/ding2/followers","following_url":"https://api.github.com/users/ding2/following{/other_user}","gists_url":"https://api.github.com/users/ding2/gists{/gist_id}","starred_url":"https://api.github.com/users/ding2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ding2/subscriptions","organizations_url":"https://api.github.com/users/ding2/orgs","repos_url":"https://api.github.com/users/ding2/repos","events_url":"https://api.github.com/users/ding2/events{/privacy}","received_events_url":"https://api.github.com/users/ding2/received_events","type":"Organization","site_admin":false},"repo":{"id":1982252,"name":"ding_periodical","full_name":"ding2/ding_periodical","owner":{"login":"ding2","id":564698,"avatar_url":"https://avatars.githubusercontent.com/u/564698?v=3","gravatar_id":"","url":"https://api.github.com/users/ding2","html_url":"https://github.com/ding2","followers_url":"https://api.github.com/users/ding2/followers","following_url":"https://api.github.com/users/ding2/following{/other_user}","gists_url":"https://api.github.com/users/ding2/gists{/gist_id}","starred_url":"https://api.github.com/users/ding2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ding2/subscriptions","organizations_url":"https://api.github.com/users/ding2/orgs","repos_url":"https://api.github.com/users/ding2/repos","events_url":"https://api.github.com/users/ding2/events{/privacy}","received_events_url":"https://api.github.com/users/ding2/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ding2/ding_periodical","description":"","fork":false,"url":"https://api.github.com/repos/ding2/ding_periodical","forks_url":"https://api.github.com/repos/ding2/ding_periodical/forks","keys_url":"https://api.github.com/repos/ding2/ding_periodical/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ding2/ding_periodical/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ding2/ding_periodical/teams","hooks_url":"https://api.github.com/repos/ding2/ding_periodical/hooks","issue_events_url":"https://api.github.com/repos/ding2/ding_periodical/issues/events{/number}","events_url":"https://api.github.com/repos/ding2/ding_periodical/events","assignees_url":"https://api.github.com/repos/ding2/ding_periodical/assignees{/user}","branches_url":"https://api.github.com/repos/ding2/ding_periodical/branches{/branch}","tags_url":"https://api.github.com/repos/ding2/ding_periodical/tags","blobs_url":"https://api.github.com/repos/ding2/ding_periodical/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ding2/ding_periodical/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ding2/ding_periodical/git/refs{/sha}","trees_url":"https://api.github.com/repos/ding2/ding_periodical/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ding2/ding_periodical/statuses/{sha}","languages_url":"https://api.github.com/repos/ding2/ding_periodical/languages","stargazers_url":"https://api.github.com/repos/ding2/ding_periodical/stargazers","contributors_url":"https://api.github.com/repos/ding2/ding_periodical/contributors","subscribers_url":"https://api.github.com/repos/ding2/ding_periodical/subscribers","subscription_url":"https://api.github.com/repos/ding2/ding_periodical/subscription","commits_url":"https://api.github.com/repos/ding2/ding_periodical/commits{/sha}","git_commits_url":"https://api.github.com/repos/ding2/ding_periodical/git/commits{/sha}","comments_url":"https://api.github.com/repos/ding2/ding_periodical/comments{/number}","issue_comment_url":"https://api.github.com/repos/ding2/ding_periodical/issues/comments{/number}","contents_url":"https://api.github.com/repos/ding2/ding_periodical/contents/{+path}","compare_url":"https://api.github.com/repos/ding2/ding_periodical/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ding2/ding_periodical/merges","archive_url":"https://api.github.com/repos/ding2/ding_periodical/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ding2/ding_periodical/downloads","issues_url":"https://api.github.com/repos/ding2/ding_periodical/issues{/number}","pulls_url":"https://api.github.com/repos/ding2/ding_periodical/pulls{/number}","milestones_url":"https://api.github.com/repos/ding2/ding_periodical/milestones{/number}","notifications_url":"https://api.github.com/repos/ding2/ding_periodical/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ding2/ding_periodical/labels{/name}","releases_url":"https://api.github.com/repos/ding2/ding_periodical/releases{/id}","created_at":"2011-07-01T07:21:19Z","updated_at":"2015-01-20T14:47:35Z","pushed_at":"2015-11-18T11:00:16Z","git_url":"git://github.com/ding2/ding_periodical.git","ssh_url":"git@github.com:ding2/ding_periodical.git","clone_url":"https://github.com/ding2/ding_periodical.git","svn_url":"https://github.com/ding2/ding_periodical","homepage":"","size":333,"stargazers_count":2,"watchers_count":2,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":8,"mirror_url":null,"open_issues_count":3,"forks":8,"open_issues":3,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ding2/ding_periodical/pulls/6"},"html":{"href":"https://github.com/ding2/ding_periodical/pull/6"},"issue":{"href":"https://api.github.com/repos/ding2/ding_periodical/issues/6"},"comments":{"href":"https://api.github.com/repos/ding2/ding_periodical/issues/6/comments"},"review_comments":{"href":"https://api.github.com/repos/ding2/ding_periodical/pulls/6/comments"},"review_comment":{"href":"https://api.github.com/repos/ding2/ding_periodical/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ding2/ding_periodical/pulls/6/commits"},"statuses":{"href":"https://api.github.com/repos/ding2/ding_periodical/statuses/4f105e6802c3835a1b853a0384d827b7a2720f71"}}}}