{"action":"created","comment":{"url":"https://api.github.com/repos/kaltura/server/pulls/comments/44336315","id":44336315,"diff_hunk":"@@ -0,0 +1,96 @@\n+<?php\n+\n+// TODO: remove when done\n+//require_once (\"/opt/kaltura/app/plugins/collaajUpdatePlugin/lib/model/iniReader.php\");\n+// This class handles all the data queries relevant for colaaj and the ini file\n+class collaajInstallData\n+{\n+\n+//returnFilteredByOs - done as returnFilteredByExtension\n+//returnNewerVersion - not needed\n+//getLatestVersionData - done\n+//returnVersionUpdateInfo - done\n+\n+\n+    // private members  ///////////////////////////////////////////////////////////////////////////////////////\n+    private $ini_handle = \"\";  // handle to the ini object\n+    private $ini_content = \"\";\n+    private $ini_sorted_versions_array = array ();\n+\n+    // Constructor\n+//    public function __construct($ini_file_name, $current_version, $needed_extension ){\n+    public function __construct($ini_file_name){\n+        if ($ini_file_name) {\n+            $this->ini_handle = new iniReader($ini_file_name);\n+            $this->ini_content = $this->ini_handle->getIni_content();\n+            $this->shift_array_lables_to_version($this->ini_handle->getIni_content());\n+        } else throw new Exception (\"ini file name was not provided\");\n+    }\n+\n+    // functions /////////////////////////////////////////////////////////////////////////////////////////////\n+\n+    public function getLatestVersionData ($needed_extension) {\n+        $ini_filtered_by_extension = $this->returnFilteredByExtension($needed_extension);\n+        $temp_keys = array_keys($ini_filtered_by_extension);\n+        uasort($temp_keys, \"version_compare\");\n+        if (count ($ini_filtered_by_extension)) {\n+            return $ini_filtered_by_extension[array_pop($temp_keys)];\n+        } else return NULL;\n+    }\n+\n+\n+    public function returnVersionUpdateInfo ($needed_extension, $current_version) {\n+        //Check if there is such a version in the ini file\n+        if (in_array($current_version, $this->ini_sorted_versions_array)) {\n+            $this->ini_content = $this->ini_handle->getIni_content();\n+            if ($this->ini_content[$current_version]) {\n+                $version_content = $this->ini_content[$current_version];\n+                $version_content_keys = array_keys( $version_content );\n+                // Checking if the needed extension exists\n+                if ( in_array( $needed_extension,  $version_content_keys ))  {\n+                    return  ($version_content[$needed_extension]);\n+                } else {\n+                    print \"NOT FOUND $needed_extension\\n\"; // TODO: remove this line when done","path":"plugins/collaajUpdatePlugin/lib/model/collaajInstallData.php","position":53,"original_position":53,"commit_id":"4c682c65825273decc575058d8972d5070c58baa","original_commit_id":"4c682c65825273decc575058d8972d5070c58baa","user":{"login":"MosheMaorKaltura","id":10695851,"avatar_url":"https://avatars.githubusercontent.com/u/10695851?v=3","gravatar_id":"","url":"https://api.github.com/users/MosheMaorKaltura","html_url":"https://github.com/MosheMaorKaltura","followers_url":"https://api.github.com/users/MosheMaorKaltura/followers","following_url":"https://api.github.com/users/MosheMaorKaltura/following{/other_user}","gists_url":"https://api.github.com/users/MosheMaorKaltura/gists{/gist_id}","starred_url":"https://api.github.com/users/MosheMaorKaltura/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MosheMaorKaltura/subscriptions","organizations_url":"https://api.github.com/users/MosheMaorKaltura/orgs","repos_url":"https://api.github.com/users/MosheMaorKaltura/repos","events_url":"https://api.github.com/users/MosheMaorKaltura/events{/privacy}","received_events_url":"https://api.github.com/users/MosheMaorKaltura/received_events","type":"User","site_admin":false},"body":"Use logger instead of print","created_at":"2015-11-09T21:41:14Z","updated_at":"2015-11-09T21:41:14Z","html_url":"https://github.com/kaltura/server/pull/3463#discussion_r44336315","pull_request_url":"https://api.github.com/repos/kaltura/server/pulls/3463","_links":{"self":{"href":"https://api.github.com/repos/kaltura/server/pulls/comments/44336315"},"html":{"href":"https://github.com/kaltura/server/pull/3463#discussion_r44336315"},"pull_request":{"href":"https://api.github.com/repos/kaltura/server/pulls/3463"}}},"pull_request":{"url":"https://api.github.com/repos/kaltura/server/pulls/3463","id":50180276,"html_url":"https://github.com/kaltura/server/pull/3463","diff_url":"https://github.com/kaltura/server/pull/3463.diff","patch_url":"https://github.com/kaltura/server/pull/3463.patch","issue_url":"https://api.github.com/repos/kaltura/server/issues/3463","number":3463,"state":"open","locked":false,"title":"Capturespace commit","user":{"login":"kobimichaeli","id":11015004,"avatar_url":"https://avatars.githubusercontent.com/u/11015004?v=3","gravatar_id":"","url":"https://api.github.com/users/kobimichaeli","html_url":"https://github.com/kobimichaeli","followers_url":"https://api.github.com/users/kobimichaeli/followers","following_url":"https://api.github.com/users/kobimichaeli/following{/other_user}","gists_url":"https://api.github.com/users/kobimichaeli/gists{/gist_id}","starred_url":"https://api.github.com/users/kobimichaeli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kobimichaeli/subscriptions","organizations_url":"https://api.github.com/users/kobimichaeli/orgs","repos_url":"https://api.github.com/users/kobimichaeli/repos","events_url":"https://api.github.com/users/kobimichaeli/events{/privacy}","received_events_url":"https://api.github.com/users/kobimichaeli/received_events","type":"User","site_admin":false},"body":"PLAT-3434\r\nNeeds CR","created_at":"2015-11-09T21:30:13Z","updated_at":"2015-11-09T21:41:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f7e05b594ce0026644b19f5420e3335a715958d9","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/kaltura/server/pulls/3463/commits","review_comments_url":"https://api.github.com/repos/kaltura/server/pulls/3463/comments","review_comment_url":"https://api.github.com/repos/kaltura/server/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kaltura/server/issues/3463/comments","statuses_url":"https://api.github.com/repos/kaltura/server/statuses/4c682c65825273decc575058d8972d5070c58baa","head":{"label":"kaltura:Kajam-11.2.0-PLAT-3434","ref":"Kajam-11.2.0-PLAT-3434","sha":"4c682c65825273decc575058d8972d5070c58baa","user":{"login":"kaltura","id":319096,"avatar_url":"https://avatars.githubusercontent.com/u/319096?v=3","gravatar_id":"","url":"https://api.github.com/users/kaltura","html_url":"https://github.com/kaltura","followers_url":"https://api.github.com/users/kaltura/followers","following_url":"https://api.github.com/users/kaltura/following{/other_user}","gists_url":"https://api.github.com/users/kaltura/gists{/gist_id}","starred_url":"https://api.github.com/users/kaltura/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaltura/subscriptions","organizations_url":"https://api.github.com/users/kaltura/orgs","repos_url":"https://api.github.com/users/kaltura/repos","events_url":"https://api.github.com/users/kaltura/events{/privacy}","received_events_url":"https://api.github.com/users/kaltura/received_events","type":"Organization","site_admin":false},"repo":{"id":11364783,"name":"server","full_name":"kaltura/server","owner":{"login":"kaltura","id":319096,"avatar_url":"https://avatars.githubusercontent.com/u/319096?v=3","gravatar_id":"","url":"https://api.github.com/users/kaltura","html_url":"https://github.com/kaltura","followers_url":"https://api.github.com/users/kaltura/followers","following_url":"https://api.github.com/users/kaltura/following{/other_user}","gists_url":"https://api.github.com/users/kaltura/gists{/gist_id}","starred_url":"https://api.github.com/users/kaltura/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaltura/subscriptions","organizations_url":"https://api.github.com/users/kaltura/orgs","repos_url":"https://api.github.com/users/kaltura/repos","events_url":"https://api.github.com/users/kaltura/events{/privacy}","received_events_url":"https://api.github.com/users/kaltura/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/kaltura/server","description":"The official Kaltura server. ","fork":false,"url":"https://api.github.com/repos/kaltura/server","forks_url":"https://api.github.com/repos/kaltura/server/forks","keys_url":"https://api.github.com/repos/kaltura/server/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kaltura/server/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kaltura/server/teams","hooks_url":"https://api.github.com/repos/kaltura/server/hooks","issue_events_url":"https://api.github.com/repos/kaltura/server/issues/events{/number}","events_url":"https://api.github.com/repos/kaltura/server/events","assignees_url":"https://api.github.com/repos/kaltura/server/assignees{/user}","branches_url":"https://api.github.com/repos/kaltura/server/branches{/branch}","tags_url":"https://api.github.com/repos/kaltura/server/tags","blobs_url":"https://api.github.com/repos/kaltura/server/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kaltura/server/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kaltura/server/git/refs{/sha}","trees_url":"https://api.github.com/repos/kaltura/server/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kaltura/server/statuses/{sha}","languages_url":"https://api.github.com/repos/kaltura/server/languages","stargazers_url":"https://api.github.com/repos/kaltura/server/stargazers","contributors_url":"https://api.github.com/repos/kaltura/server/contributors","subscribers_url":"https://api.github.com/repos/kaltura/server/subscribers","subscription_url":"https://api.github.com/repos/kaltura/server/subscription","commits_url":"https://api.github.com/repos/kaltura/server/commits{/sha}","git_commits_url":"https://api.github.com/repos/kaltura/server/git/commits{/sha}","comments_url":"https://api.github.com/repos/kaltura/server/comments{/number}","issue_comment_url":"https://api.github.com/repos/kaltura/server/issues/comments{/number}","contents_url":"https://api.github.com/repos/kaltura/server/contents/{+path}","compare_url":"https://api.github.com/repos/kaltura/server/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kaltura/server/merges","archive_url":"https://api.github.com/repos/kaltura/server/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kaltura/server/downloads","issues_url":"https://api.github.com/repos/kaltura/server/issues{/number}","pulls_url":"https://api.github.com/repos/kaltura/server/pulls{/number}","milestones_url":"https://api.github.com/repos/kaltura/server/milestones{/number}","notifications_url":"https://api.github.com/repos/kaltura/server/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kaltura/server/labels{/name}","releases_url":"https://api.github.com/repos/kaltura/server/releases{/id}","created_at":"2013-07-12T08:59:26Z","updated_at":"2015-11-05T11:13:02Z","pushed_at":"2015-11-09T21:30:15Z","git_url":"git://github.com/kaltura/server.git","ssh_url":"git@github.com:kaltura/server.git","clone_url":"https://github.com/kaltura/server.git","svn_url":"https://github.com/kaltura/server","homepage":"http://www.kaltura.org","size":1001920,"stargazers_count":67,"watchers_count":67,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":81,"mirror_url":null,"open_issues_count":81,"forks":81,"open_issues":81,"watchers":67,"default_branch":"Kajam-11.2.0"}},"base":{"label":"kaltura:Kajam-11.2.0","ref":"Kajam-11.2.0","sha":"f7416de5572003b25f7772504a38dc151f02dad0","user":{"login":"kaltura","id":319096,"avatar_url":"https://avatars.githubusercontent.com/u/319096?v=3","gravatar_id":"","url":"https://api.github.com/users/kaltura","html_url":"https://github.com/kaltura","followers_url":"https://api.github.com/users/kaltura/followers","following_url":"https://api.github.com/users/kaltura/following{/other_user}","gists_url":"https://api.github.com/users/kaltura/gists{/gist_id}","starred_url":"https://api.github.com/users/kaltura/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaltura/subscriptions","organizations_url":"https://api.github.com/users/kaltura/orgs","repos_url":"https://api.github.com/users/kaltura/repos","events_url":"https://api.github.com/users/kaltura/events{/privacy}","received_events_url":"https://api.github.com/users/kaltura/received_events","type":"Organization","site_admin":false},"repo":{"id":11364783,"name":"server","full_name":"kaltura/server","owner":{"login":"kaltura","id":319096,"avatar_url":"https://avatars.githubusercontent.com/u/319096?v=3","gravatar_id":"","url":"https://api.github.com/users/kaltura","html_url":"https://github.com/kaltura","followers_url":"https://api.github.com/users/kaltura/followers","following_url":"https://api.github.com/users/kaltura/following{/other_user}","gists_url":"https://api.github.com/users/kaltura/gists{/gist_id}","starred_url":"https://api.github.com/users/kaltura/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaltura/subscriptions","organizations_url":"https://api.github.com/users/kaltura/orgs","repos_url":"https://api.github.com/users/kaltura/repos","events_url":"https://api.github.com/users/kaltura/events{/privacy}","received_events_url":"https://api.github.com/users/kaltura/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/kaltura/server","description":"The official Kaltura server. ","fork":false,"url":"https://api.github.com/repos/kaltura/server","forks_url":"https://api.github.com/repos/kaltura/server/forks","keys_url":"https://api.github.com/repos/kaltura/server/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kaltura/server/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kaltura/server/teams","hooks_url":"https://api.github.com/repos/kaltura/server/hooks","issue_events_url":"https://api.github.com/repos/kaltura/server/issues/events{/number}","events_url":"https://api.github.com/repos/kaltura/server/events","assignees_url":"https://api.github.com/repos/kaltura/server/assignees{/user}","branches_url":"https://api.github.com/repos/kaltura/server/branches{/branch}","tags_url":"https://api.github.com/repos/kaltura/server/tags","blobs_url":"https://api.github.com/repos/kaltura/server/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kaltura/server/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kaltura/server/git/refs{/sha}","trees_url":"https://api.github.com/repos/kaltura/server/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kaltura/server/statuses/{sha}","languages_url":"https://api.github.com/repos/kaltura/server/languages","stargazers_url":"https://api.github.com/repos/kaltura/server/stargazers","contributors_url":"https://api.github.com/repos/kaltura/server/contributors","subscribers_url":"https://api.github.com/repos/kaltura/server/subscribers","subscription_url":"https://api.github.com/repos/kaltura/server/subscription","commits_url":"https://api.github.com/repos/kaltura/server/commits{/sha}","git_commits_url":"https://api.github.com/repos/kaltura/server/git/commits{/sha}","comments_url":"https://api.github.com/repos/kaltura/server/comments{/number}","issue_comment_url":"https://api.github.com/repos/kaltura/server/issues/comments{/number}","contents_url":"https://api.github.com/repos/kaltura/server/contents/{+path}","compare_url":"https://api.github.com/repos/kaltura/server/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kaltura/server/merges","archive_url":"https://api.github.com/repos/kaltura/server/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kaltura/server/downloads","issues_url":"https://api.github.com/repos/kaltura/server/issues{/number}","pulls_url":"https://api.github.com/repos/kaltura/server/pulls{/number}","milestones_url":"https://api.github.com/repos/kaltura/server/milestones{/number}","notifications_url":"https://api.github.com/repos/kaltura/server/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kaltura/server/labels{/name}","releases_url":"https://api.github.com/repos/kaltura/server/releases{/id}","created_at":"2013-07-12T08:59:26Z","updated_at":"2015-11-05T11:13:02Z","pushed_at":"2015-11-09T21:30:15Z","git_url":"git://github.com/kaltura/server.git","ssh_url":"git@github.com:kaltura/server.git","clone_url":"https://github.com/kaltura/server.git","svn_url":"https://github.com/kaltura/server","homepage":"http://www.kaltura.org","size":1001920,"stargazers_count":67,"watchers_count":67,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":81,"mirror_url":null,"open_issues_count":81,"forks":81,"open_issues":81,"watchers":67,"default_branch":"Kajam-11.2.0"}},"_links":{"self":{"href":"https://api.github.com/repos/kaltura/server/pulls/3463"},"html":{"href":"https://github.com/kaltura/server/pull/3463"},"issue":{"href":"https://api.github.com/repos/kaltura/server/issues/3463"},"comments":{"href":"https://api.github.com/repos/kaltura/server/issues/3463/comments"},"review_comments":{"href":"https://api.github.com/repos/kaltura/server/pulls/3463/comments"},"review_comment":{"href":"https://api.github.com/repos/kaltura/server/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kaltura/server/pulls/3463/commits"},"statuses":{"href":"https://api.github.com/repos/kaltura/server/statuses/4c682c65825273decc575058d8972d5070c58baa"}}}}