From: dj3c1t Date: Sun, 15 Jun 2014 12:02:54 +0000 (+0200) Subject: syntaxe POO (visibilite) X-Git-Tag: mw_thumbs.0.5 X-Git-Url: http://git.dj3c1t.com/?p=mw_thumbs;a=commitdiff_plain;h=29b71f744e84dca7aec2b3eba8a977a323286fbf syntaxe POO (visibilite) --- diff --git a/app/data/modules/share/mw_data_thumbs.php b/app/data/modules/share/mw_data_thumbs.php index c7cf3a4..e594a26 100644 --- a/app/data/modules/share/mw_data_thumbs.php +++ b/app/data/modules/share/mw_data_thumbs.php @@ -2,11 +2,11 @@ class mw_data_thumbs extends mw_data{ - function mw_thumbs_activated(){ + public function mw_thumbs_activated(){ return true; } - function img_thumb($src, $max_width, $max_height, $thumbs_dir = "", $background_color = array(255, 255, 255), $CROP = false){ + public function img_thumb($src, $max_width, $max_height, $thumbs_dir = "", $background_color = array(255, 255, 255), $CROP = false){ if(strlen($thumbs_dir) > 0){ if(!@is_dir($thumbs_dir)) @mkdir($thumbs_dir); if(!@is_dir($thumbs_dir)) return false; @@ -91,7 +91,7 @@ return $thumb; } - function make_thumb( + public function make_thumb( $src, $max_width, $max_height, @@ -212,7 +212,7 @@ return false; } - function new_thumb_file_name($dest, $file_name, $prefix = "img_"){ + public function new_thumb_file_name($dest, $file_name, $prefix = "img_"){ $dest .= strlen($dest) > 0 && substr($dest, -1) != "/" ? "/" : ""; if(is_dir($dest)){ $ext = ""; @@ -228,5 +228,3 @@ } } - -?> \ No newline at end of file diff --git a/mw_thumbs.php b/mw_thumbs.php index 211d8fd..ce7334a 100644 --- a/mw_thumbs.php +++ b/mw_thumbs.php @@ -2,15 +2,15 @@ class mw_thumbs extends mw_plugin{ - function title(){ + public function title(){ return "Thumbs"; } - function description(){ + public function description(){ return "Un générateur de miniatures"; } - function install($env){ + public function install($env){ if( $env->bdd("sgbd") == "mysql" || $env->bdd("sgbd") == "pdo_mysql" @@ -33,7 +33,7 @@ return true; } - function install_mysql($env){ + public function install_mysql($env){ $data = $env->data(); $sgbd = $data->sgbd(); try{ @@ -68,7 +68,7 @@ return true; } - function install_sqlite($env){ + public function install_sqlite($env){ $data = $env->data(); $sgbd = $data->sgbd(); try{ @@ -102,7 +102,7 @@ return true; } - function install_xml($env){ + public function install_xml($env){ $data = $env->data(); $sgbd = $data->sgbd(); $EXISTS = $sgbd->data_exists("thumbs"); @@ -123,7 +123,7 @@ else return $this->uninstall_sql($env); } - function uninstall_xml($env){ + public function uninstall_xml($env){ $data = $env->data(); $sgbd = $data->sgbd(); if(!$this->disable($env)) return "impossible de desactiver le plugin"; @@ -140,7 +140,7 @@ return true; } - function uninstall_sql($env){ + public function uninstall_sql($env){ $data = $env->data(); $sgbd = $data->sgbd(); if(!$this->disable($env)) return "impossible de desactiver le plugin";