{"action":"opened","number":1247,"pull_request":{"url":"https://api.github.com/repos/versionpress/versionpress/pulls/1247","id":127465549,"html_url":"https://github.com/versionpress/versionpress/pull/1247","diff_url":"https://github.com/versionpress/versionpress/pull/1247.diff","patch_url":"https://github.com/versionpress/versionpress/pull/1247.patch","issue_url":"https://api.github.com/repos/versionpress/versionpress/issues/1247","number":1247,"state":"open","locked":false,"title":"Saving real values on INSERT","user":{"login":"JanVoracek","id":703215,"avatar_url":"https://avatars2.githubusercontent.com/u/703215?v=3","gravatar_id":"","url":"https://api.github.com/users/JanVoracek","html_url":"https://github.com/JanVoracek","followers_url":"https://api.github.com/users/JanVoracek/followers","following_url":"https://api.github.com/users/JanVoracek/following{/other_user}","gists_url":"https://api.github.com/users/JanVoracek/gists{/gist_id}","starred_url":"https://api.github.com/users/JanVoracek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JanVoracek/subscriptions","organizations_url":"https://api.github.com/users/JanVoracek/orgs","repos_url":"https://api.github.com/users/JanVoracek/repos","events_url":"https://api.github.com/users/JanVoracek/events{/privacy}","received_events_url":"https://api.github.com/users/JanVoracek/received_events","type":"User","site_admin":false},"body":"Resolves #1146\r\n\r\nVP now loads the entity from database instead of saving parsed SQL data directly.\r\nUnfortunatelly, I don't know how to test it (automatically). I used following code to test it manually:\r\n\r\n```php\r\n\r\n    if (basename($_SERVER['PHP_SELF']) === 'admin.php') { // to trigger it only on reload, not on every AJAX request\r\n        global $wpdb;\r\n        $time = time();\r\n        $wpdb->query(\"INSERT INTO wp_commentmeta (comment_id, meta_key, meta_value) VALUES (1, 'vp_test_$time', NOW()), (1, 'vp_test_2_$time', NOW()-1)\");\r\n        $wpdb->query(\"INSERT INTO wp_options (option_name, option_value) VALUES ('vp_test_$time', NOW()), ('vp_test_2_$time', NOW()-1)\");\r\n    }\r\n```","created_at":"2017-06-26T13:03:40Z","updated_at":"2017-06-26T13:03:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":{"login":"JanVoracek","id":703215,"avatar_url":"https://avatars2.githubusercontent.com/u/703215?v=3","gravatar_id":"","url":"https://api.github.com/users/JanVoracek","html_url":"https://github.com/JanVoracek","followers_url":"https://api.github.com/users/JanVoracek/followers","following_url":"https://api.github.com/users/JanVoracek/following{/other_user}","gists_url":"https://api.github.com/users/JanVoracek/gists{/gist_id}","starred_url":"https://api.github.com/users/JanVoracek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JanVoracek/subscriptions","organizations_url":"https://api.github.com/users/JanVoracek/orgs","repos_url":"https://api.github.com/users/JanVoracek/repos","events_url":"https://api.github.com/users/JanVoracek/events{/privacy}","received_events_url":"https://api.github.com/users/JanVoracek/received_events","type":"User","site_admin":false},"assignees":[{"login":"JanVoracek","id":703215,"avatar_url":"https://avatars2.githubusercontent.com/u/703215?v=3","gravatar_id":"","url":"https://api.github.com/users/JanVoracek","html_url":"https://github.com/JanVoracek","followers_url":"https://api.github.com/users/JanVoracek/followers","following_url":"https://api.github.com/users/JanVoracek/following{/other_user}","gists_url":"https://api.github.com/users/JanVoracek/gists{/gist_id}","starred_url":"https://api.github.com/users/JanVoracek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JanVoracek/subscriptions","organizations_url":"https://api.github.com/users/JanVoracek/orgs","repos_url":"https://api.github.com/users/JanVoracek/repos","events_url":"https://api.github.com/users/JanVoracek/events{/privacy}","received_events_url":"https://api.github.com/users/JanVoracek/received_events","type":"User","site_admin":false}],"requested_reviewers":[{"login":"borekb","id":101152,"avatar_url":"https://avatars3.githubusercontent.com/u/101152?v=3","gravatar_id":"","url":"https://api.github.com/users/borekb","html_url":"https://github.com/borekb","followers_url":"https://api.github.com/users/borekb/followers","following_url":"https://api.github.com/users/borekb/following{/other_user}","gists_url":"https://api.github.com/users/borekb/gists{/gist_id}","starred_url":"https://api.github.com/users/borekb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/borekb/subscriptions","organizations_url":"https://api.github.com/users/borekb/orgs","repos_url":"https://api.github.com/users/borekb/repos","events_url":"https://api.github.com/users/borekb/events{/privacy}","received_events_url":"https://api.github.com/users/borekb/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/versionpress/versionpress/pulls/1247/commits","review_comments_url":"https://api.github.com/repos/versionpress/versionpress/pulls/1247/comments","review_comment_url":"https://api.github.com/repos/versionpress/versionpress/pulls/comments{/number}","comments_url":"https://api.github.com/repos/versionpress/versionpress/issues/1247/comments","statuses_url":"https://api.github.com/repos/versionpress/versionpress/statuses/8383b5fefb136dbd84ebf49b74d0e10eaaac207d","head":{"label":"versionpress:1146-sql-functions-saved-on-insert","ref":"1146-sql-functions-saved-on-insert","sha":"8383b5fefb136dbd84ebf49b74d0e10eaaac207d","user":{"login":"versionpress","id":13979788,"avatar_url":"https://avatars3.githubusercontent.com/u/13979788?v=3","gravatar_id":"","url":"https://api.github.com/users/versionpress","html_url":"https://github.com/versionpress","followers_url":"https://api.github.com/users/versionpress/followers","following_url":"https://api.github.com/users/versionpress/following{/other_user}","gists_url":"https://api.github.com/users/versionpress/gists{/gist_id}","starred_url":"https://api.github.com/users/versionpress/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/versionpress/subscriptions","organizations_url":"https://api.github.com/users/versionpress/orgs","repos_url":"https://api.github.com/users/versionpress/repos","events_url":"https://api.github.com/users/versionpress/events{/privacy}","received_events_url":"https://api.github.com/users/versionpress/received_events","type":"Organization","site_admin":false},"repo":{"id":44519483,"name":"versionpress","full_name":"versionpress/versionpress","owner":{"login":"versionpress","id":13979788,"avatar_url":"https://avatars3.githubusercontent.com/u/13979788?v=3","gravatar_id":"","url":"https://api.github.com/users/versionpress","html_url":"https://github.com/versionpress","followers_url":"https://api.github.com/users/versionpress/followers","following_url":"https://api.github.com/users/versionpress/following{/other_user}","gists_url":"https://api.github.com/users/versionpress/gists{/gist_id}","starred_url":"https://api.github.com/users/versionpress/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/versionpress/subscriptions","organizations_url":"https://api.github.com/users/versionpress/orgs","repos_url":"https://api.github.com/users/versionpress/repos","events_url":"https://api.github.com/users/versionpress/events{/privacy}","received_events_url":"https://api.github.com/users/versionpress/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/versionpress/versionpress","description":"Git-based version control for WordPress. Whoa!","fork":false,"url":"https://api.github.com/repos/versionpress/versionpress","forks_url":"https://api.github.com/repos/versionpress/versionpress/forks","keys_url":"https://api.github.com/repos/versionpress/versionpress/keys{/key_id}","collaborators_url":"https://api.github.com/repos/versionpress/versionpress/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/versionpress/versionpress/teams","hooks_url":"https://api.github.com/repos/versionpress/versionpress/hooks","issue_events_url":"https://api.github.com/repos/versionpress/versionpress/issues/events{/number}","events_url":"https://api.github.com/repos/versionpress/versionpress/events","assignees_url":"https://api.github.com/repos/versionpress/versionpress/assignees{/user}","branches_url":"https://api.github.com/repos/versionpress/versionpress/branches{/branch}","tags_url":"https://api.github.com/repos/versionpress/versionpress/tags","blobs_url":"https://api.github.com/repos/versionpress/versionpress/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/versionpress/versionpress/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/versionpress/versionpress/git/refs{/sha}","trees_url":"https://api.github.com/repos/versionpress/versionpress/git/trees{/sha}","statuses_url":"https://api.github.com/repos/versionpress/versionpress/statuses/{sha}","languages_url":"https://api.github.com/repos/versionpress/versionpress/languages","stargazers_url":"https://api.github.com/repos/versionpress/versionpress/stargazers","contributors_url":"https://api.github.com/repos/versionpress/versionpress/contributors","subscribers_url":"https://api.github.com/repos/versionpress/versionpress/subscribers","subscription_url":"https://api.github.com/repos/versionpress/versionpress/subscription","commits_url":"https://api.github.com/repos/versionpress/versionpress/commits{/sha}","git_commits_url":"https://api.github.com/repos/versionpress/versionpress/git/commits{/sha}","comments_url":"https://api.github.com/repos/versionpress/versionpress/comments{/number}","issue_comment_url":"https://api.github.com/repos/versionpress/versionpress/issues/comments{/number}","contents_url":"https://api.github.com/repos/versionpress/versionpress/contents/{+path}","compare_url":"https://api.github.com/repos/versionpress/versionpress/compare/{base}...{head}","merges_url":"https://api.github.com/repos/versionpress/versionpress/merges","archive_url":"https://api.github.com/repos/versionpress/versionpress/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/versionpress/versionpress/downloads","issues_url":"https://api.github.com/repos/versionpress/versionpress/issues{/number}","pulls_url":"https://api.github.com/repos/versionpress/versionpress/pulls{/number}","milestones_url":"https://api.github.com/repos/versionpress/versionpress/milestones{/number}","notifications_url":"https://api.github.com/repos/versionpress/versionpress/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/versionpress/versionpress/labels{/name}","releases_url":"https://api.github.com/repos/versionpress/versionpress/releases{/id}","deployments_url":"https://api.github.com/repos/versionpress/versionpress/deployments","created_at":"2015-10-19T07:57:56Z","updated_at":"2017-06-25T22:00:30Z","pushed_at":"2017-06-26T12:56:00Z","git_url":"git://github.com/versionpress/versionpress.git","ssh_url":"git@github.com:versionpress/versionpress.git","clone_url":"https://github.com/versionpress/versionpress.git","svn_url":"https://github.com/versionpress/versionpress","homepage":"https://versionpress.net/","size":5142,"stargazers_count":1325,"watchers_count":1325,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":79,"mirror_url":null,"open_issues_count":142,"forks":79,"open_issues":142,"watchers":1325,"default_branch":"master"}},"base":{"label":"versionpress:master","ref":"master","sha":"d3d0c984dff174d70ca67555a0b0b9ca325958f3","user":{"login":"versionpress","id":13979788,"avatar_url":"https://avatars3.githubusercontent.com/u/13979788?v=3","gravatar_id":"","url":"https://api.github.com/users/versionpress","html_url":"https://github.com/versionpress","followers_url":"https://api.github.com/users/versionpress/followers","following_url":"https://api.github.com/users/versionpress/following{/other_user}","gists_url":"https://api.github.com/users/versionpress/gists{/gist_id}","starred_url":"https://api.github.com/users/versionpress/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/versionpress/subscriptions","organizations_url":"https://api.github.com/users/versionpress/orgs","repos_url":"https://api.github.com/users/versionpress/repos","events_url":"https://api.github.com/users/versionpress/events{/privacy}","received_events_url":"https://api.github.com/users/versionpress/received_events","type":"Organization","site_admin":false},"repo":{"id":44519483,"name":"versionpress","full_name":"versionpress/versionpress","owner":{"login":"versionpress","id":13979788,"avatar_url":"https://avatars3.githubusercontent.com/u/13979788?v=3","gravatar_id":"","url":"https://api.github.com/users/versionpress","html_url":"https://github.com/versionpress","followers_url":"https://api.github.com/users/versionpress/followers","following_url":"https://api.github.com/users/versionpress/following{/other_user}","gists_url":"https://api.github.com/users/versionpress/gists{/gist_id}","starred_url":"https://api.github.com/users/versionpress/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/versionpress/subscriptions","organizations_url":"https://api.github.com/users/versionpress/orgs","repos_url":"https://api.github.com/users/versionpress/repos","events_url":"https://api.github.com/users/versionpress/events{/privacy}","received_events_url":"https://api.github.com/users/versionpress/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/versionpress/versionpress","description":"Git-based version control for WordPress. Whoa!","fork":false,"url":"https://api.github.com/repos/versionpress/versionpress","forks_url":"https://api.github.com/repos/versionpress/versionpress/forks","keys_url":"https://api.github.com/repos/versionpress/versionpress/keys{/key_id}","collaborators_url":"https://api.github.com/repos/versionpress/versionpress/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/versionpress/versionpress/teams","hooks_url":"https://api.github.com/repos/versionpress/versionpress/hooks","issue_events_url":"https://api.github.com/repos/versionpress/versionpress/issues/events{/number}","events_url":"https://api.github.com/repos/versionpress/versionpress/events","assignees_url":"https://api.github.com/repos/versionpress/versionpress/assignees{/user}","branches_url":"https://api.github.com/repos/versionpress/versionpress/branches{/branch}","tags_url":"https://api.github.com/repos/versionpress/versionpress/tags","blobs_url":"https://api.github.com/repos/versionpress/versionpress/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/versionpress/versionpress/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/versionpress/versionpress/git/refs{/sha}","trees_url":"https://api.github.com/repos/versionpress/versionpress/git/trees{/sha}","statuses_url":"https://api.github.com/repos/versionpress/versionpress/statuses/{sha}","languages_url":"https://api.github.com/repos/versionpress/versionpress/languages","stargazers_url":"https://api.github.com/repos/versionpress/versionpress/stargazers","contributors_url":"https://api.github.com/repos/versionpress/versionpress/contributors","subscribers_url":"https://api.github.com/repos/versionpress/versionpress/subscribers","subscription_url":"https://api.github.com/repos/versionpress/versionpress/subscription","commits_url":"https://api.github.com/repos/versionpress/versionpress/commits{/sha}","git_commits_url":"https://api.github.com/repos/versionpress/versionpress/git/commits{/sha}","comments_url":"https://api.github.com/repos/versionpress/versionpress/comments{/number}","issue_comment_url":"https://api.github.com/repos/versionpress/versionpress/issues/comments{/number}","contents_url":"https://api.github.com/repos/versionpress/versionpress/contents/{+path}","compare_url":"https://api.github.com/repos/versionpress/versionpress/compare/{base}...{head}","merges_url":"https://api.github.com/repos/versionpress/versionpress/merges","archive_url":"https://api.github.com/repos/versionpress/versionpress/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/versionpress/versionpress/downloads","issues_url":"https://api.github.com/repos/versionpress/versionpress/issues{/number}","pulls_url":"https://api.github.com/repos/versionpress/versionpress/pulls{/number}","milestones_url":"https://api.github.com/repos/versionpress/versionpress/milestones{/number}","notifications_url":"https://api.github.com/repos/versionpress/versionpress/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/versionpress/versionpress/labels{/name}","releases_url":"https://api.github.com/repos/versionpress/versionpress/releases{/id}","deployments_url":"https://api.github.com/repos/versionpress/versionpress/deployments","created_at":"2015-10-19T07:57:56Z","updated_at":"2017-06-25T22:00:30Z","pushed_at":"2017-06-26T12:56:00Z","git_url":"git://github.com/versionpress/versionpress.git","ssh_url":"git@github.com:versionpress/versionpress.git","clone_url":"https://github.com/versionpress/versionpress.git","svn_url":"https://github.com/versionpress/versionpress","homepage":"https://versionpress.net/","size":5142,"stargazers_count":1325,"watchers_count":1325,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":79,"mirror_url":null,"open_issues_count":142,"forks":79,"open_issues":142,"watchers":1325,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/versionpress/versionpress/pulls/1247"},"html":{"href":"https://github.com/versionpress/versionpress/pull/1247"},"issue":{"href":"https://api.github.com/repos/versionpress/versionpress/issues/1247"},"comments":{"href":"https://api.github.com/repos/versionpress/versionpress/issues/1247/comments"},"review_comments":{"href":"https://api.github.com/repos/versionpress/versionpress/pulls/1247/comments"},"review_comment":{"href":"https://api.github.com/repos/versionpress/versionpress/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/versionpress/versionpress/pulls/1247/commits"},"statuses":{"href":"https://api.github.com/repos/versionpress/versionpress/statuses/8383b5fefb136dbd84ebf49b74d0e10eaaac207d"}},"merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":false,"commits":1,"additions":20,"deletions":9,"changed_files":1}}
{"actor":{"display_login":"JanVoracek"}}