From 3d89bff37c83ff223d8caddd330c93bca6ae152f Mon Sep 17 00:00:00 2001 From: shubham_meena Date: Sun, 1 Jun 2014 19:52:54 +0000 Subject: [PATCH] changes indentation and extra spaces --- .../ams_lib/autoload/plugincache.php | 169 ++---------------- 1 file changed, 15 insertions(+), 154 deletions(-) diff --git a/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/plugincache.php b/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/plugincache.php index df3af960c..2d9e5de06 100644 --- a/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/plugincache.php +++ b/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/plugincache.php @@ -1,262 +1,123 @@ - -setId($values['PluginId']); - $this->setPluginName($values['PluginName']); - $this->setPluginVersion($values['PluginVersion']); - $this->setPluginPermission($values['PluginPermission']); - - $this->setIsActive($values['IsActive']); - + $this->setIsActive($values['IsActive']); } - - - - /** - * loads the object's attributes. - */ - public function load_With_SID( ) { - $dbl = new DBLayer("lib"); - $statement = $dbl->executeWithoutParams("SELECT * FROM plugins"); - $row = $statement->fetch(); - $this->set($row); - } - - - - /** - * updates the entry. - */ - public function update(){ - $dbl = new DBLayer("lib"); - - $query = "UPDATE plugins SET PluginPermission= :t, PluginVersion = :q, IsActive = :d WHERE PluginName=:p_n"; - - $values = Array('p_n' => $this->getPluginName(), 't' => $this->getPluginPermission(), 'q' => $this->getPluginVersion(), 'd' => $this->getIsActive()); - - $statement = $dbl->execute($query, $values); - + $values = Array('t' => $this->getPluginPermission(), 'q' => $this->getPluginVersion(), 'd' => $this->getIsActive()); + $dbl->update("plugins", $values, "PluginName= $this->getPluginName()"); } - - - - public function getId(){ - return $this->Id; - } - - /** - * get plugin permission attribute of the object. - */ - public function getPluginPermission(){ - - return $this->plugin_permission; - + return $this->plugin_permission; } - - /** - * get plugin version attribute of the object. - */ - public function getPluginVersion(){ - return $this->plugin_version; - } - - /** - * get plugin is active attribute of the object. - */ - public function getIsActive(){ - return $this->plugin_isactive; - } - - /** - * get plugin name attribute of the object. - */ - public function getPluginName(){ - return $this->plugin_name; - } - - - - - - /** - * set plugin id attribute of the object. - * @param $s integer id - */ public function setId($s){ - $this->Id = $s; - } - - /** - * set plugin permission attribute of the object. - * @param $t type of the query, set permission - */ - public function setPluginPermission($t){ - - - $this->plugin_permission = $t; - } - - /** - * set plugin version attribute of the object. - * @param $q string to set plugin version - */ - public function setPluginVersion($q){ - $this->plugin_version= $q; - } - - /** - * set plugin is active attribute of the object. - * @param $d tinyint to set plugin is active or not . - */ - public function setIsActive($d){ - $this->plugin_isactive= $d; - } - - - - /** - - * set plugin name attribute of the object. - - * @param $p_n string to set plugin name. - - */ - - public function setPluginName($p_n){ - - $this->plugin_name= $p_n; - - } - - -} - - + /** + * set plugin name attribute of the object. + * @param $p_n string to set plugin name. + */ + public function setPluginName($p_n){ + $this->plugin_name= $p_n; + } +} \ No newline at end of file