Remoting Classes, bug ?

Discussion in 'Developers' Forum' started by jmans, Apr 2, 2013.

  1. jmans

    jmans New Member

    Hello,

    There is a mistake in the class Remoting.
    This prevents the "$ client-> dns_zone_get_id ($ session," igigoiejfe.org. ")"
    not work!

    Here is a patch which I hope to bring good solution.

    Code:
    cd /tmp
    wget http://www.ispconfig.org/downloads/ISPConfig-3-stable.tar.gz
    tar xvfz ISPConfig-3-stable.tar.gz
    
    [B]diff[/B] -ar -p /tmp/ispconfig3_install/interface/lib/classes/remoting.inc.php /usr/local/ispconfig/interface/lib/classes/remoting.inc.php
    *** /tmp/ispconfig3_install/interface/lib/classes/remoting.inc.php      2012-12-04 14:36:35.000000000 +0100
    --- /usr/local/ispconfig/interface/lib/classes/remoting.inc.php 2013-04-02 11:40:28.800116179 +0200
    *************** class remoting {
    *** 2142,2148 ****
                  return false;
              }
    
    !         $rec = $app->db->queryOneRecord("SELECT id FROM dns_soa WHERE origin like '".$origin.[COLOR="Red"]'%'[/COLOR]);
              if(isset($rec['id'])) {
                  return $app->functions->intval($rec['id']);
              } else {
    --- 2142,2148 ----
                  return false;
              }
    
    !         $rec = $app->db->queryOneRecord("SELECT id FROM dns_soa WHERE origin like '".$origin.[COLOR="red"]"'"[/COLOR]);
              if(isset($rec['id'])) {
                  return $app->functions->intval($rec['id']);
              } else {
    
    
     
  2. till

    till Super Moderator

    You use the function in the wrong way, so ther is no bug.
    The ID parameter has to be either numerical or you have to pass an array if you want to search for a domain name.

    Example for correct usage of the zone get fuction to return a zone by domain name:

    $client->dns_zone_get($session, array('origin' => 'igigoiejfe.org.'));
     

Share This Page