Changeset 39

Show
Ignore:
Timestamp:
09/03/06 14:04:53 (2 years ago)
Author:
drazzib
Message:

Mise a jour des modifs par rapport aux dernieres modifs sur le SVN de Wifidog.
- Integration du patch http://dev.wifidog.org/ticket/236
- Tri des noeuds sans tenir compte de la casse
- Erreur lors de l'ajout d'un noeud avec un ID deja existant

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • wifidog/wifidog-auth/wifidog/classes/Mail.php

    r30 r39  
    3838 * @author     Francois Proulx <francois.proulx@gmail.com> 
    3939 * @copyright  2005-2006 Francois Proulx, Technologies Coeus inc. 
    40  * @version    Subversion $Id: Mail.php 1017 2006-04-10 18:57:34Z dana
     40 * @version    Subversion $Id: Mail.php 1088 2006-09-03 03:35:06Z max-horvath
    4141 * @link       http://www.wifidog.org/ 
    4242 */ 
     43 
     44/** 
     45 * Load required classes 
     46 */ 
     47require_once('include/class.phpmailer.php'); 
     48require_once('include/class.smtp.php'); 
    4349 
    4450/** 
     
    5056 * @copyright  2005-2006 Francois Proulx, Technologies Coeus inc. 
    5157 */ 
    52  
    53 require_once('include/class.phpmailer.php'); 
    54 require_once('include/class.smtp.php'); 
    55  
    5658class Mail 
    5759{ 
     
    6971           "mytrashmail.com", "simplicato.net", "sneakemail.com", "sofort-mail.de", 
    7072           "spamcon.org", "spamex.com", "spamgourmet.com", "spamhole.com", 
    71            "spammotel.com", "trash-mail.de", "woodyland.org", "domaine.com" 
     73           "spammotel.com", "trash-mail.de", "woodyland.org", "dumpmail.de", 
     74           "antispam24.de", "nervmich.net", "spamday.com", "throwaway.de", "domaine.com" 
    7275           ); 
    73        // :DRAZZIB: Ajout du domaine : "domaine.com" 
     76// :DRAZZIB: Ajout du domaine : "domaine.com" 
    7477 
    7578        /** 
     
    315318        $mail = new PHPMailer(); 
    316319        $mail->CharSet = "utf-8"; 
    317          
    318         $mail->Mailer = EMAIL_MAILER;         
     320 
     321        $mail->Mailer = EMAIL_MAILER; 
    319322        if (EMAIL_MAILER == 'smtp') { 
    320323            $mail->Host = EMAIL_HOST; 
     
    326329            } 
    327330        } 
    328          
     331 
    329332        $mail->AddAddress($this->getRecipientEmail(), $this->getRecipientName()); 
    330333        $mail->From = $this->getSenderEmail(); 
  • wifidog/wifidog-auth/wifidog/classes/Node.php

    r35 r39  
    235235                $html = ''; 
    236236                $name = "{$user_prefix}"; 
    237                 $sql = "SELECT node_id, name, node_deployment_status, is_splash_only_node from nodes WHERE 1=1 $sql_additional_where ORDER BY node_id"; 
     237                $sql = "SELECT node_id, name, node_deployment_status, is_splash_only_node from nodes WHERE 1=1 $sql_additional_where ORDER BY lower(node_id)"; 
    238238                $node_rows = null; 
    239239                $db->execSql($sql, $node_rows, false); 
     
    14531453        } 
    14541454 
    1455         /** Check if an node exists */ 
    1456         private function nodeExists($id) 
    1457         { 
    1458                 global $db; 
     1455        /** 
     1456         * Checks if an node exists 
     1457         * 
     1458         * @param string $id Id of node to be checked 
     1459         * 
     1460         * @return bool True if node exists, else false 
     1461         * 
     1462         * @static 
     1463         * @access private 
     1464         */ 
     1465        private static function nodeExists($id) 
     1466        { 
     1467                // Define globals 
     1468                global $db; 
     1469 
     1470                // Init values 
    14591471                $retval = false; 
     1472 
    14601473                $id_str = $db->escapeString($id); 
    14611474                $sql = "SELECT * FROM nodes WHERE node_id='{$id_str}'"; 
    14621475                $row = null; 
    14631476                $db->execSqlUniqueRes($sql, $row, false); 
    1464                 if ($row != null) 
    1465                
     1477 
     1478                if ($row != null)
    14661479                        $retval = true; 
    14671480                } 
     1481 
    14681482                return $retval; 
    14691483        } 
  • wifidog/wifidog-auth/wifidog/classes/NodeLists/NodeListHTML.php

    r35 r39  
    135135                // Modif PR : list all deployed or non wifidog nodes in all networks 
    136136 
    137         $db->execSql("SELECT *, (NOW()-last_heartbeat_timestamp) AS since_last_heartbeat, EXTRACT(epoch FROM creation_date) as creation_date_epoch, CASE WHEN ((NOW()-last_heartbeat_timestamp) < interval '5 minutes') THEN true ELSE false END AS is_up FROM nodes WHERE node_deployment_status = 'DEPLOYED' OR node_deployment_status = 'NON_WIFIDOG_NODE' ORDER BY name", $this->_nodes, false); 
     137        $db->execSql("SELECT *, (NOW()-last_heartbeat_timestamp) AS since_last_heartbeat, EXTRACT(epoch FROM creation_date) as creation_date_epoch, CASE WHEN ((NOW()-last_heartbeat_timestamp) < interval '5 minutes') THEN true ELSE false END AS is_up FROM nodes WHERE node_deployment_status = 'DEPLOYED' OR node_deployment_status = 'NON_WIFIDOG_NODE' ORDER BY lower(name)", $this->_nodes, false); 
    138138    } 
    139139 
  • wifidog/wifidog-auth/wifidog/classes/NodeLists/NodeListJiWireCSV.php

    r24 r39  
    100100 
    101101        // Query the database, sorting by node name 
    102 //        $db->execSql("SELECT *, (NOW()-last_heartbeat_timestamp) AS since_last_heartbeat, EXTRACT(epoch FROM creation_date) as creation_date_epoch, CASE WHEN ((NOW()-last_heartbeat_timestamp) < interval '5 minutes') THEN true ELSE false END AS is_up FROM nodes WHERE network_id = '" . $db->escapeString($this->_network->getId()) . "' AND (node_deployment_status = 'DEPLOYED' OR node_deployment_status = 'NON_WIFIDOG_NODE') ORDER BY name", $this->_nodes, false); 
     102//        $db->execSql("SELECT *, (NOW()-last_heartbeat_timestamp) AS since_last_heartbeat, EXTRACT(epoch FROM creation_date) as creation_date_epoch, CASE WHEN ((NOW()-last_heartbeat_timestamp) < interval '5 minutes') THEN true ELSE false END AS is_up FROM nodes WHERE network_id = '" . $db->escapeString($this->_network->getId()) . "' AND (node_deployment_status = 'DEPLOYED' OR node_deployment_status = 'NON_WIFIDOG_NODE') ORDER BY lower(name)", $this->_nodes, false); 
    103103// PR 
    104         $db->execSql("SELECT *, (NOW()-last_heartbeat_timestamp) AS since_last_heartbeat, EXTRACT(epoch FROM creation_date) as creation_date_epoch, CASE WHEN ((NOW()-last_heartbeat_timestamp) < interval '5 minutes') THEN true ELSE false END AS is_up FROM nodes WHERE node_deployment_status = 'DEPLOYED' OR node_deployment_status = 'NON_WIFIDOG_NODE' ORDER BY name", $this->_nodes, false); 
     104        $db->execSql("SELECT *, (NOW()-last_heartbeat_timestamp) AS since_last_heartbeat, EXTRACT(epoch FROM creation_date) as creation_date_epoch, CASE WHEN ((NOW()-last_heartbeat_timestamp) < interval '5 minutes') THEN true ELSE false END AS is_up FROM nodes WHERE node_deployment_status = 'DEPLOYED' OR node_deployment_status = 'NON_WIFIDOG_NODE' ORDER BY lower(name)", $this->_nodes, false); 
    105105    } 
    106106 
  • wifidog/wifidog-auth/wifidog/classes/NodeLists/NodeListRSS.php

    r24 r39  
    107107 
    108108        // Query the database, sorting by node name 
    109         $db->execSql("SELECT *, (NOW()-last_heartbeat_timestamp) AS since_last_heartbeat, EXTRACT(epoch FROM creation_date) as creation_date_epoch, CASE WHEN ((NOW()-last_heartbeat_timestamp) < interval '5 minutes') THEN true ELSE false END AS is_up FROM nodes WHERE node_deployment_status = 'DEPLOYED' OR node_deployment_status = 'NON_WIFIDOG_NODE' ORDER BY name", $this->_nodes, false); 
     109        $db->execSql("SELECT *, (NOW()-last_heartbeat_timestamp) AS since_last_heartbeat, EXTRACT(epoch FROM creation_date) as creation_date_epoch, CASE WHEN ((NOW()-last_heartbeat_timestamp) < interval '5 minutes') THEN true ELSE false END AS is_up FROM nodes WHERE node_deployment_status = 'DEPLOYED' OR node_deployment_status = 'NON_WIFIDOG_NODE' ORDER BY lower(name)", $this->_nodes, false); 
    110110    } 
    111111 
  • wifidog/wifidog-auth/wifidog/classes/NodeLists/NodeListXML.php

    r24 r39  
    107107        // Query the database, sorting by node name 
    108108 
    109         $db->execSql("SELECT *, (NOW()-last_heartbeat_timestamp) AS since_last_heartbeat, EXTRACT(epoch FROM creation_date) as creation_date_epoch, CASE WHEN ((NOW()-last_heartbeat_timestamp) < interval '5 minutes') THEN true ELSE false END AS is_up FROM nodes WHERE node_deployment_status = 'DEPLOYED' OR node_deployment_status = 'NON_WIFIDOG_NODE' ORDER BY name", $this->_nodes, false); 
     109        $db->execSql("SELECT *, (NOW()-last_heartbeat_timestamp) AS since_last_heartbeat, EXTRACT(epoch FROM creation_date) as creation_date_epoch, CASE WHEN ((NOW()-last_heartbeat_timestamp) < interval '5 minutes') THEN true ELSE false END AS is_up FROM nodes WHERE node_deployment_status = 'DEPLOYED' OR node_deployment_status = 'NON_WIFIDOG_NODE' ORDER BY lower(name)", $this->_nodes, false); 
    110110    } 
    111111 
  • wifidog/wifidog-auth/wifidog/classes/Statistics.php

    r38 r39  
    395395            $sql_join = " JOIN node_stakeholders ON (nodes.node_id=node_stakeholders.node_id AND user_id='$user_id') "; 
    396396        } 
    397         $sql = "SELECT nodes.node_id, nodes.name from nodes $sql_join WHERE 1=1 ORDER BY node_id"; 
     397        $sql = "SELECT nodes.node_id, nodes.name from nodes $sql_join WHERE 1=1 ORDER BY lower(node_id)"; 
    398398        $node_rows = null; 
    399399        $db->execSql($sql, $node_rows, false);