PluginProbe
CSS & JavaScript Toolbox / 8.0.3
CSS & JavaScript Toolbox v8.0.3
trunk 0.3 0.8 10 10.1 11 11.2 11.3 11.4 11.5 11.6 11.7 11.8 11.9 11.9.1 12 12.0 12.0.1 12.0.3 12.0.4 12.0.5 12.0.6 12.0.7 6.0 6.0.11 All 60 releases
← All changes | models/installer.php +25 -1 6.0.118.0.3 View file →
@@ -130,8 +130,10 @@
130 130 *
131 131 * @return void
132 132 */
133 133 public function install() {
134 + // Initialize.
135 + $result = FALSE;
134 136 // Read input!
135 137 $rOperation = $this->input['operation'];
136 138 $type = $rOperation['type'];
137 139 // Get allowed operations with their state!
@@ -162,14 +164,36 @@
162 164 $operation['state'] = self::OPERATION_STATE_INSTALLED;
163 165 // Update operations cache to reflect the new state!
164 166 update_option(self::INSTALLATION_STATE, $operations);
165 167 // Say OK!
166 - $this->response = array('state' => self::OPERATION_STATE_INSTALLED);
168 + $result = array('state' => self::OPERATION_STATE_INSTALLED);
167 169 }
168 170 }
169 171 }
172 + return $result;
170 173 }
171 174
175 + /**
176 + * put your comment there...
177 + *
178 + */
179 + public function isCommonRelease() {
180 + // Check weather the current installed version is in the same
181 + // release with the running version.
182 + // Get instaleled version components.
183 + $ivComponent = explode('.', str_replace('-', '.', $this->getInstalledDbVersion()));
184 + $nvComponent = explode('.', str_replace('-', '.', CJTPlugin::DB_VERSION));
185 + // Use PE-Edition sign if not sign used!
186 + if (!isset($ivComponent[2])) {
187 + $ivComponent[2] = 'PE';
188 + }
189 + if (!isset($nvComponent[2])) {
190 + $nvComponent[2] = 'PE';
191 + }
192 + // TRUE if same, FALSE otherwise.
193 + return (($ivComponent[0] == $nvComponent[0]) && ($ivComponent[2] == $nvComponent[2]));
194 + }
195 +
172 196 /**
173 197 * put your comment there...
174 198 *
175 199 */