{"action":"created","comment":{"url":"https://api.github.com/repos/friendica/friendica/pulls/comments/84605678","pull_request_review_id":5372877,"id":84605678,"diff_hunk":"@@ -108,38 +108,61 @@ public function server_info() {\n \t\treturn $return;\n \t}\n \n+\t/**\n+\t * @brief Returns the number of rows\n+\t *\n+\t * @return integer\n+\t */\n+\tpublic function num_rows() {\n+\t\tif (!$this->result)\n+\t\t\treturn 0;\n+\n+\t\tif ($this->mysqli) {\n+\t\t\t$return = $this->result->num_rows;\n+\t\t} else {\n+\t\t\t$return = mysql_num_rows($this->result);\n+\t\t}\n+\t\treturn $return;\n+\t}\n+\n \tpublic function q($sql, $onlyquery = false) {\n \t\tglobal $a;\n \n-\t\tif((! $this->db) || (! $this->connected))\n+\t\tif ((!$this->db) || (!$this->connected))","path":"include/dba.php","position":98,"original_position":98,"commit_id":"deb2fee2f0863e772ba893cb80645183fb7069ca","original_commit_id":"deb2fee2f0863e772ba893cb80645183fb7069ca","user":{"login":"Hypolite","id":925415,"avatar_url":"https://avatars.githubusercontent.com/u/925415?v=3","gravatar_id":"","url":"https://api.github.com/users/Hypolite","html_url":"https://github.com/Hypolite","followers_url":"https://api.github.com/users/Hypolite/followers","following_url":"https://api.github.com/users/Hypolite/following{/other_user}","gists_url":"https://api.github.com/users/Hypolite/gists{/gist_id}","starred_url":"https://api.github.com/users/Hypolite/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Hypolite/subscriptions","organizations_url":"https://api.github.com/users/Hypolite/orgs","repos_url":"https://api.github.com/users/Hypolite/repos","events_url":"https://api.github.com/users/Hypolite/events{/privacy}","received_events_url":"https://api.github.com/users/Hypolite/received_events","type":"User","site_admin":false},"body":"[standards] Please add braces.","created_at":"2016-10-23T21:42:27Z","updated_at":"2016-10-23T21:42:27Z","html_url":"https://github.com/friendica/friendica/pull/2861#discussion_r84605678","pull_request_url":"https://api.github.com/repos/friendica/friendica/pulls/2861","_links":{"self":{"href":"https://api.github.com/repos/friendica/friendica/pulls/comments/84605678"},"html":{"href":"https://github.com/friendica/friendica/pull/2861#discussion_r84605678"},"pull_request":{"href":"https://api.github.com/repos/friendica/friendica/pulls/2861"}}},"pull_request":{"url":"https://api.github.com/repos/friendica/friendica/pulls/2861","id":89695261,"html_url":"https://github.com/friendica/friendica/pull/2861","diff_url":"https://github.com/friendica/friendica/pull/2861.diff","patch_url":"https://github.com/friendica/friendica/pull/2861.patch","issue_url":"https://api.github.com/repos/friendica/friendica/issues/2861","number":2861,"state":"open","locked":false,"title":"Some more performance stuff","user":{"login":"annando","id":844208,"avatar_url":"https://avatars.githubusercontent.com/u/844208?v=3","gravatar_id":"","url":"https://api.github.com/users/annando","html_url":"https://github.com/annando","followers_url":"https://api.github.com/users/annando/followers","following_url":"https://api.github.com/users/annando/following{/other_user}","gists_url":"https://api.github.com/users/annando/gists{/gist_id}","starred_url":"https://api.github.com/users/annando/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/annando/subscriptions","organizations_url":"https://api.github.com/users/annando/orgs","repos_url":"https://api.github.com/users/annando/repos","events_url":"https://api.github.com/users/annando/events{/privacy}","received_events_url":"https://api.github.com/users/annando/received_events","type":"User","site_admin":false},"body":"There is now a new function to execute queries that can be done on uncommitted data. (Everything that is used for displaying data and not processing data) These database queries shouldn't lock the database and should have no problems with database locks. it won't improve performance on MyISAM systems - but they shouldn't have problems with it either.\r\n\r\nAdditionally some queries are improved and the data for the last user activity is now fetched from a stored value the contact table instead of generating it live.","created_at":"2016-10-17T20:21:53Z","updated_at":"2016-10-23T21:42:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":"230a75fdd2b54b9d2d52e1ca1bf9272c7e49060b","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/friendica/friendica/pulls/2861/commits","review_comments_url":"https://api.github.com/repos/friendica/friendica/pulls/2861/comments","review_comment_url":"https://api.github.com/repos/friendica/friendica/pulls/comments{/number}","comments_url":"https://api.github.com/repos/friendica/friendica/issues/2861/comments","statuses_url":"https://api.github.com/repos/friendica/friendica/statuses/deb2fee2f0863e772ba893cb80645183fb7069ca","head":{"label":"annando:1610-performance","ref":"1610-performance","sha":"deb2fee2f0863e772ba893cb80645183fb7069ca","user":{"login":"annando","id":844208,"avatar_url":"https://avatars.githubusercontent.com/u/844208?v=3","gravatar_id":"","url":"https://api.github.com/users/annando","html_url":"https://github.com/annando","followers_url":"https://api.github.com/users/annando/followers","following_url":"https://api.github.com/users/annando/following{/other_user}","gists_url":"https://api.github.com/users/annando/gists{/gist_id}","starred_url":"https://api.github.com/users/annando/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/annando/subscriptions","organizations_url":"https://api.github.com/users/annando/orgs","repos_url":"https://api.github.com/users/annando/repos","events_url":"https://api.github.com/users/annando/events{/privacy}","received_events_url":"https://api.github.com/users/annando/received_events","type":"User","site_admin":false},"repo":{"id":3302872,"name":"friendica","full_name":"annando/friendica","owner":{"login":"annando","id":844208,"avatar_url":"https://avatars.githubusercontent.com/u/844208?v=3","gravatar_id":"","url":"https://api.github.com/users/annando","html_url":"https://github.com/annando","followers_url":"https://api.github.com/users/annando/followers","following_url":"https://api.github.com/users/annando/following{/other_user}","gists_url":"https://api.github.com/users/annando/gists{/gist_id}","starred_url":"https://api.github.com/users/annando/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/annando/subscriptions","organizations_url":"https://api.github.com/users/annando/orgs","repos_url":"https://api.github.com/users/annando/repos","events_url":"https://api.github.com/users/annando/events{/privacy}","received_events_url":"https://api.github.com/users/annando/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/annando/friendica","description":"Friendica Communications Platform - MIT license","fork":true,"url":"https://api.github.com/repos/annando/friendica","forks_url":"https://api.github.com/repos/annando/friendica/forks","keys_url":"https://api.github.com/repos/annando/friendica/keys{/key_id}","collaborators_url":"https://api.github.com/repos/annando/friendica/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/annando/friendica/teams","hooks_url":"https://api.github.com/repos/annando/friendica/hooks","issue_events_url":"https://api.github.com/repos/annando/friendica/issues/events{/number}","events_url":"https://api.github.com/repos/annando/friendica/events","assignees_url":"https://api.github.com/repos/annando/friendica/assignees{/user}","branches_url":"https://api.github.com/repos/annando/friendica/branches{/branch}","tags_url":"https://api.github.com/repos/annando/friendica/tags","blobs_url":"https://api.github.com/repos/annando/friendica/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/annando/friendica/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/annando/friendica/git/refs{/sha}","trees_url":"https://api.github.com/repos/annando/friendica/git/trees{/sha}","statuses_url":"https://api.github.com/repos/annando/friendica/statuses/{sha}","languages_url":"https://api.github.com/repos/annando/friendica/languages","stargazers_url":"https://api.github.com/repos/annando/friendica/stargazers","contributors_url":"https://api.github.com/repos/annando/friendica/contributors","subscribers_url":"https://api.github.com/repos/annando/friendica/subscribers","subscription_url":"https://api.github.com/repos/annando/friendica/subscription","commits_url":"https://api.github.com/repos/annando/friendica/commits{/sha}","git_commits_url":"https://api.github.com/repos/annando/friendica/git/commits{/sha}","comments_url":"https://api.github.com/repos/annando/friendica/comments{/number}","issue_comment_url":"https://api.github.com/repos/annando/friendica/issues/comments{/number}","contents_url":"https://api.github.com/repos/annando/friendica/contents/{+path}","compare_url":"https://api.github.com/repos/annando/friendica/compare/{base}...{head}","merges_url":"https://api.github.com/repos/annando/friendica/merges","archive_url":"https://api.github.com/repos/annando/friendica/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/annando/friendica/downloads","issues_url":"https://api.github.com/repos/annando/friendica/issues{/number}","pulls_url":"https://api.github.com/repos/annando/friendica/pulls{/number}","milestones_url":"https://api.github.com/repos/annando/friendica/milestones{/number}","notifications_url":"https://api.github.com/repos/annando/friendica/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/annando/friendica/labels{/name}","releases_url":"https://api.github.com/repos/annando/friendica/releases{/id}","deployments_url":"https://api.github.com/repos/annando/friendica/deployments","created_at":"2012-01-30T06:45:26Z","updated_at":"2015-05-04T20:16:37Z","pushed_at":"2016-10-23T07:50:40Z","git_url":"git://github.com/annando/friendica.git","ssh_url":"git@github.com:annando/friendica.git","clone_url":"https://github.com/annando/friendica.git","svn_url":"https://github.com/annando/friendica","homepage":"http://friendica.com","size":67824,"stargazers_count":1,"watchers_count":1,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":1,"default_branch":"develop"}},"base":{"label":"friendica:develop","ref":"develop","sha":"d8f5f517c948c91e36475ac353b188a8a6a6f016","user":{"login":"friendica","id":1176581,"avatar_url":"https://avatars.githubusercontent.com/u/1176581?v=3","gravatar_id":"","url":"https://api.github.com/users/friendica","html_url":"https://github.com/friendica","followers_url":"https://api.github.com/users/friendica/followers","following_url":"https://api.github.com/users/friendica/following{/other_user}","gists_url":"https://api.github.com/users/friendica/gists{/gist_id}","starred_url":"https://api.github.com/users/friendica/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/friendica/subscriptions","organizations_url":"https://api.github.com/users/friendica/orgs","repos_url":"https://api.github.com/users/friendica/repos","events_url":"https://api.github.com/users/friendica/events{/privacy}","received_events_url":"https://api.github.com/users/friendica/received_events","type":"User","site_admin":false},"repo":{"id":2722709,"name":"friendica","full_name":"friendica/friendica","owner":{"login":"friendica","id":1176581,"avatar_url":"https://avatars.githubusercontent.com/u/1176581?v=3","gravatar_id":"","url":"https://api.github.com/users/friendica","html_url":"https://github.com/friendica","followers_url":"https://api.github.com/users/friendica/followers","following_url":"https://api.github.com/users/friendica/following{/other_user}","gists_url":"https://api.github.com/users/friendica/gists{/gist_id}","starred_url":"https://api.github.com/users/friendica/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/friendica/subscriptions","organizations_url":"https://api.github.com/users/friendica/orgs","repos_url":"https://api.github.com/users/friendica/repos","events_url":"https://api.github.com/users/friendica/events{/privacy}","received_events_url":"https://api.github.com/users/friendica/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/friendica/friendica","description":"Friendica Communications Platform","fork":true,"url":"https://api.github.com/repos/friendica/friendica","forks_url":"https://api.github.com/repos/friendica/friendica/forks","keys_url":"https://api.github.com/repos/friendica/friendica/keys{/key_id}","collaborators_url":"https://api.github.com/repos/friendica/friendica/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/friendica/friendica/teams","hooks_url":"https://api.github.com/repos/friendica/friendica/hooks","issue_events_url":"https://api.github.com/repos/friendica/friendica/issues/events{/number}","events_url":"https://api.github.com/repos/friendica/friendica/events","assignees_url":"https://api.github.com/repos/friendica/friendica/assignees{/user}","branches_url":"https://api.github.com/repos/friendica/friendica/branches{/branch}","tags_url":"https://api.github.com/repos/friendica/friendica/tags","blobs_url":"https://api.github.com/repos/friendica/friendica/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/friendica/friendica/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/friendica/friendica/git/refs{/sha}","trees_url":"https://api.github.com/repos/friendica/friendica/git/trees{/sha}","statuses_url":"https://api.github.com/repos/friendica/friendica/statuses/{sha}","languages_url":"https://api.github.com/repos/friendica/friendica/languages","stargazers_url":"https://api.github.com/repos/friendica/friendica/stargazers","contributors_url":"https://api.github.com/repos/friendica/friendica/contributors","subscribers_url":"https://api.github.com/repos/friendica/friendica/subscribers","subscription_url":"https://api.github.com/repos/friendica/friendica/subscription","commits_url":"https://api.github.com/repos/friendica/friendica/commits{/sha}","git_commits_url":"https://api.github.com/repos/friendica/friendica/git/commits{/sha}","comments_url":"https://api.github.com/repos/friendica/friendica/comments{/number}","issue_comment_url":"https://api.github.com/repos/friendica/friendica/issues/comments{/number}","contents_url":"https://api.github.com/repos/friendica/friendica/contents/{+path}","compare_url":"https://api.github.com/repos/friendica/friendica/compare/{base}...{head}","merges_url":"https://api.github.com/repos/friendica/friendica/merges","archive_url":"https://api.github.com/repos/friendica/friendica/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/friendica/friendica/downloads","issues_url":"https://api.github.com/repos/friendica/friendica/issues{/number}","pulls_url":"https://api.github.com/repos/friendica/friendica/pulls{/number}","milestones_url":"https://api.github.com/repos/friendica/friendica/milestones{/number}","notifications_url":"https://api.github.com/repos/friendica/friendica/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/friendica/friendica/labels{/name}","releases_url":"https://api.github.com/repos/friendica/friendica/releases{/id}","deployments_url":"https://api.github.com/repos/friendica/friendica/deployments","created_at":"2011-11-06T22:19:41Z","updated_at":"2016-10-23T13:22:39Z","pushed_at":"2016-10-23T11:57:51Z","git_url":"git://github.com/friendica/friendica.git","ssh_url":"git@github.com:friendica/friendica.git","clone_url":"https://github.com/friendica/friendica.git","svn_url":"https://github.com/friendica/friendica","homepage":"","size":73491,"stargazers_count":429,"watchers_count":429,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":162,"mirror_url":null,"open_issues_count":241,"forks":162,"open_issues":241,"watchers":429,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/friendica/friendica/pulls/2861"},"html":{"href":"https://github.com/friendica/friendica/pull/2861"},"issue":{"href":"https://api.github.com/repos/friendica/friendica/issues/2861"},"comments":{"href":"https://api.github.com/repos/friendica/friendica/issues/2861/comments"},"review_comments":{"href":"https://api.github.com/repos/friendica/friendica/pulls/2861/comments"},"review_comment":{"href":"https://api.github.com/repos/friendica/friendica/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/friendica/friendica/pulls/2861/commits"},"statuses":{"href":"https://api.github.com/repos/friendica/friendica/statuses/deb2fee2f0863e772ba893cb80645183fb7069ca"}}}}
{"actor":{"display_login":"Hypolite"}}