Bladeren bron

Fix extension API (coding style)

is_enabled() becomes isEnabled(). Sorry for this coding style mistake :s
Marien Fressinaud 11 jaren geleden
bovenliggende
commit
8968288600
3 gewijzigde bestanden met toevoegingen van 4 en 4 verwijderingen
  1. 2 2
      app/Controllers/extensionController.php
  2. 1 1
      app/views/extension/index.phtml
  3. 1 1
      lib/Minz/Extension.php

+ 2 - 2
app/Controllers/extensionController.php

@@ -73,7 +73,7 @@ class FreshRSS_extension_Controller extends Minz_ActionController {
 				                  $url_redirect);
 			}
 
-			if ($ext->is_enabled()) {
+			if ($ext->isEnabled()) {
 				Minz_Request::bad(_t('feedback.extensions.already_enabled', $ext_name),
 				                  $url_redirect);
 			}
@@ -129,7 +129,7 @@ class FreshRSS_extension_Controller extends Minz_ActionController {
 				                  $url_redirect);
 			}
 
-			if (!$ext->is_enabled()) {
+			if (!$ext->isEnabled()) {
 				Minz_Request::bad(_t('feedback.extensions.not_enabled', $ext_name),
 				                  $url_redirect);
 			}

+ 1 - 1
app/views/extension/index.phtml

@@ -14,7 +14,7 @@
 			<?php $name_encoded = urlencode($ext->getName()); ?>
 			<div class="stick">
 				<a class="btn open-slider" href="<?php echo _url('extension', 'configure', 'e', $name_encoded); ?>"><?php echo _i('configure'); ?> <?php echo _t('gen.action.manage'); ?></a>
-				<?php if ($ext->is_enabled()) { ?>
+				<?php if ($ext->isEnabled()) { ?>
 				<button class="btn active" form="form-extension" formaction="<?php echo _url('extension', 'disable', 'e', $name_encoded); ?>"><?php echo _t('gen.action.disable'); ?></button>
 				<?php } else { ?>
 				<button class="btn" form="form-extension" formaction="<?php echo _url('extension', 'enable', 'e', $name_encoded); ?>"><?php echo _t('gen.action.enable'); ?></button>

+ 1 - 1
lib/Minz/Extension.php

@@ -92,7 +92,7 @@ class Minz_Extension {
 	 *
 	 * @return true if extension is enabled, false else.
 	 */
-	public function is_enabled() {
+	public function isEnabled() {
 		return $this->is_enabled;
 	}