]> git.mxchange.org Git - core.git/commitdiff
Misc fixes/code cleanups
authorRoland Häder <roland@mxchange.org>
Mon, 30 Mar 2009 05:41:53 +0000 (05:41 +0000)
committerRoland Häder <roland@mxchange.org>
Mon, 30 Mar 2009 05:41:53 +0000 (05:41 +0000)
inc/classes/exceptions/database/general/class_DatabaseUpdateSupportException.php
inc/classes/interfaces/database/class_Updateable.php
inc/classes/main/user/class_BaseUser.php
inc/classes/main/user/member/class_Member.php
inc/config/config-hubmaster.php

index 79b7deaffb8d0a19f8cec5e9e9ba45cf870e6274..59e76f5cbd55e09374aafe675ab3076fdcc0d9db 100644 (file)
@@ -7,7 +7,8 @@
  * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 Core Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.ship-simu.org
- * 
+ * @deprecated
+ *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation, either version 3 of the License, or
index 84b81ced9ec905026cda710dcdef65c3ad3a2d7d..57e34f2dc2a5ddcb71fdc3f7c7679383f8b931ea 100644 (file)
@@ -28,7 +28,6 @@ interface Updateable extends FrameworkInterface {
         * @param       $fieldName              Field to update
         * @param       $fieldValue             New value to store
         * @return      void
-        * @throws      DatabaseUpdateSupportException  If this class does not support database updates
         */
        function updateDatabaseField ($fieldName, $fieldValue);
 }
index c7240e5987eae1ef20eca3f31379ac007314daf0..7943b7c27fb93749734c2975405f6b421a66614c 100644 (file)
@@ -21,7 +21,7 @@
  * You should have received a copy of the GNU General Public License
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  */
-class BaseUser extends BaseFrameworkSystem {
+class BaseUser extends BaseFrameworkSystem implements Updateable {
        // Exception constances
        const EXCEPTION_USERNAME_NOT_FOUND   = 0x150;
        const EXCEPTION_USER_EMAIL_NOT_FOUND = 0x151;
@@ -306,16 +306,9 @@ class BaseUser extends BaseFrameworkSystem {
         * @param       $fieldName              Field to update
         * @param       $fieldValue             New value to store
         * @return      void
-        * @throws      DatabaseUpdateSupportException  If this class does not support database updates
         * @todo        Try to make this method more generic so we can move it in BaseFrameworkSystem
         */
        public function updateDatabaseField ($fieldName, $fieldValue) {
-               // Is updating database fields allowed by interface?
-               if (!$this instanceof Updateable) {
-                       // Update not supported!
-                       throw new DatabaseUpdateSupportException($this, self::EXCEPTION_DATABASE_UPDATED_NOT_ALLOWED);
-               } // END - if
-
                // Get a critieria instance
                $searchInstance = ObjectFactory::createObjectByConfiguredName('search_criteria_class');
 
index 9fd68192a175a8db01db59da7a608a82777423eb..9fc5883996641dcb38651c5e2bf5914305270a67 100644 (file)
@@ -21,7 +21,7 @@
  * You should have received a copy of the GNU General Public License
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  */
-class Member extends BaseUser implements ManageableMember, Registerable, Updateable {
+class Member extends BaseUser implements ManageableMember, Registerable {
        /**
         * Protected constructor
         *
index f1c3ebf675958f00d0d82412c4e54dcb5100f147..cd07b8cce8618dd7728ef7e1b49fb99d1cfdf9b5 100644 (file)
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  */
 
-///////////////////////////////////////////////////////////////////////////////
-/// DO NOT RELY ON THIS CONFIG ENTRIES! THEY ARE SUBJECT OF BEING REPLACED. ///
-///////////////////////////////////////////////////////////////////////////////
-
 // Get the configuration instance
 $cfg = FrameworkConfiguration::getInstance();
 
-// CFG: HUB-LISTEN-ADDR
-$cfg->setConfigEntry('hub_listen_addr', "0.0.0.0");
-
-// CFG: HUB-LISTEN-PORT (zero = auto-choose)
-$cfg->setConfigEntry('hub_listen_port', 9060);
-
-// CFG: HUB-MAX-AUTH-TRIES
-$cfg->setConfigEntry('hub_max_auth_tries', 3);
-
-// CFG: HUB-MSG-AUTH-TRIES
-$cfg->setConfigEntry('hub_msg_auth_tries', "AUTH_MAX_TRIES");
-
-// CFG: HUB-MSG-SPOOFING
-$cfg->setConfigEntry('hub_msg_spoofing', "SPOOFING");
-
-// CFG: HUB-MSG-AUTH-REPLY
-$cfg->setConfigEntry('hub_msg_auth_reply_timeout', "TIMEOUT_AUTH");
-
-// CFG: HUB-MSG-BYE
-$cfg->setConfigEntry('hub_msg_bye', "BYE");
-
-// CFG: HUB-MASTER-IP
-$cfg->setConfigEntry('hub_master_ip', "192.168.1.1");
-
-// CFG: HUB-MASTER-PORT
-$cfg->setConfigEntry('hub_master_port', 9060);
-
-// CFG: HUB-AUTH-REQUEST
-$cfg->setConfigEntry('hub_auth_request', "AUTH");
-
-// CFG: HUB-AUTH-REQUEST-TIMEOUT (5 seconds for whole auth procedure shall be fine)
-$cfg->setConfigEntry('hub_auth_request_timeout', 5);
-
-// CFG: HUB-PEER-HELLO
-$cfg->setConfigEntry('hub_peer_hello', "HELLO");
-
-// CFG: HUB-HELLO-REPLY
-$cfg->setConfigEntry('hub_hello_reply', "ELHO");
-
-// CFG: HUB-HELLO-TIMEOUT
-$cfg->setConfigEntry('hub_hello_timeout', 30);
-
-// CFG: HUB-HELLO-RETRIES
-$cfg->setConfigEntry('hub_hello_retires', 3);
-
-// CFG: HUB-PEER-PING
-$cfg->setConfigEntry('hub_peer_ping', "PING");
-
-// CFG: HUB-PING-REPLY
-$cfg->setConfigEntry('hub_ping_reply', "PONG");
-
-// CFG: HUB-PING-TIMEOUT
-$cfg->setConfigEntry('hub_ping_timeout', 10);
-
-// CFG: HUB-PING-MAXDROPS
-$cfg->setConfigEntry('hub_ping_maxdrops', 3);
-
-// CFG: HUB-PEER-MISS-PONG
-$cfg->setConfigEntry('hub_peer_miss_pong', "PONG_MISS");
-
-// CFG: HUB-INTRO-ENABLED
-$cfg->setConfigEntry('hub_intro_enabled', "Y");
+// CFG: HUB-BOOTSTRAP-NODES
+$cfg->setConfigEntry('hub_bootstrap_nodes', "192.168.1.1:9060");
 
 // [EOF]
 ?>