|
15 | 15 | class PatchtesterModelPull extends JModel |
16 | 16 | { |
17 | 17 |
|
18 | | - /** |
19 | | - * Method to auto-populate the model state. |
20 | | - * |
21 | | - * Note. Calling getState in this method will result in recursion. |
22 | | - * |
23 | | - * @since 1.6 |
24 | | - */ |
25 | | - protected function populateState() |
26 | | - { |
27 | | - // Initialise variables. |
28 | | -// $app = JFactory::getApplication('administrator'); |
29 | | - |
30 | | - // Load the parameters. |
31 | | - $params = JComponentHelper::getParams('com_patchtester'); |
32 | | - $this->setState('params', $params); |
33 | | - $this->setState('github_user', $params->get('org')); |
34 | | - $this->setState('github_repo', $params->get('repo')); |
35 | | - |
36 | | -// parent::populateState(); |
37 | | - } |
| 18 | + /** |
| 19 | + * Method to auto-populate the model state. |
| 20 | + * |
| 21 | + * Note. Calling getState in this method will result in recursion. |
| 22 | + * |
| 23 | + * @since 1.6 |
| 24 | + */ |
| 25 | + protected function populateState() |
| 26 | + { |
| 27 | + // Load the parameters. |
| 28 | + $params = JComponentHelper::getParams('com_patchtester'); |
| 29 | + $this->setState('params', $params); |
| 30 | + $this->setState('github_user', $params->get('org')); |
| 31 | + $this->setState('github_repo', $params->get('repo')); |
38 | 32 |
|
| 33 | + parent::populateState(); |
| 34 | + } |
39 | 35 |
|
40 | 36 | protected function parsePatch($patch) |
41 | 37 | { |
@@ -112,7 +108,7 @@ public function apply($id) |
112 | 108 | $http = new JHttp; |
113 | 109 |
|
114 | 110 | $url = 'https://raw.github.com/' . $pull->head->user->login . '/' . $pull->head->repo->name . '/' . |
115 | | - $pull->head->ref . '/' . $file->new; |
| 111 | + $pull->head->ref . '/' . $file->new; |
116 | 112 |
|
117 | 113 |
|
118 | 114 | // if the backup file already exists, we can't apply the patch |
|
0 commit comments