Platon Technologies
not logged in Login Registration
EnglishSlovak
open source software development celebrating 10 years of open source development! Thursday, October 15, 2026

Diff for scripts/php/sk-nic/SK-NIC.php between version 1.22 and 1.23

version 1.22, 2023/12/10 01:38:47 version 1.23, 2023/12/14 00:21:13
Line 14 
Line 14 
  * 2017-10-07 - added import of expired domains (droplist)   * 2017-10-07 - added import of expired domains (droplist)
  */   */
   
 /* $Platon: scripts/php/sk-nic/SK-NIC.php,v 1.21 2023/12/09 16:48:57 nepto Exp $ */  /* $Platon: scripts/php/sk-nic/SK-NIC.php,v 1.22 2023/12/10 01:38:47 nepto Exp $ */
   
 require_once 'DB.php';  require_once 'DB.php';
   
Line 427  class SK_NIC
Line 427  class SK_NIC
                 DB::isError($result) && $this->error($result);                  DB::isError($result) && $this->error($result);
         } /* }}} */          } /* }}} */
   
         function doComparison() /* {{{ */          function doComparison($debug = false) /* {{{ */
         {          {
                 $changed      = 0;                  $changed      = 0;
                 $import_cols  = $this->_tableColumns($this->table_import);                  $import_cols  = $this->_tableColumns($this->table_import);
Line 447  class SK_NIC
Line 447  class SK_NIC
                         $subqryres = $this->_db->query(sprintf($query, $subquery));                          $subqryres = $this->_db->query(sprintf($query, $subquery));
                         while ($subqryres->fetchInto($rec)) {                          while ($subqryres->fetchInto($rec)) {
                                 if (@strlen($rec["c_$this->primary_key"]) <= 0) { // new domain                                  if (@strlen($rec["c_$this->primary_key"]) <= 0) { // new domain
                                         //echo 'new domain: ',$rec["i_$pkey"],"\n";                                          if ($debug) {
                                                   echo 'NEW: ',$rec["i_domain"],"\n";
                                           }
                                         $changed++;                                          $changed++;
                                         $this->_insertRecord($rec);                                          $this->_insertRecord($rec);
                                         continue;                                          continue;
                                 }                                  }
                                 if (@strlen($rec["i_$this->primary_key"]) <= 0) { // deleted domain                                  if (@strlen($rec["i_$this->primary_key"]) <= 0) { // deleted domain
                                         //echo 'deleted domain: ',$rec["c_$pkey"],"\n";                                          if ($debug) {
                                                   echo 'DELETED: ',$rec["c_domain"],"\n";
                                           }
                                         $changed++;                                          $changed++;
                                         $this->_writeHistory($rec, 1);                                          $this->_writeHistory($rec, 1);
                                         $query = sprintf('DELETE FROM %s WHERE %s = %s',                                          $query = sprintf('DELETE FROM %s WHERE %s = %s',
Line 473  class SK_NIC
Line 477  class SK_NIC
                                 if (count($changed_cols) == 1 && $changed_cols[0] = 'dt_changed') {                                  if (count($changed_cols) == 1 && $changed_cols[0] = 'dt_changed') {
                                         // do nothing                                          // do nothing
                                 } elseif (count($changed_cols) > 0) {                                  } elseif (count($changed_cols) > 0) {
                                         //echo 'changed fields in domain ',$rec['i_domain'],':',"\n\t";                                          if ($debug) {
                                         //echo join("\n\t",$changed_cols),"\n";                                                  echo 'CHANGED: ',$rec['i_domain'];
                                                   echo ' [', join('][',$changed_cols),"]\n";
                                           }
                                         $changed++;                                          $changed++;
                                         $this->_writeHistory($rec);                                          $this->_writeHistory($rec);
                                         $this->_updateRecord($rec, $changed_cols);                                          $this->_updateRecord($rec, $changed_cols);

Legend:
Removed from v.1.22  
changed lines
  Added in v.1.23

Platon Group <platon@platon.org> http://platon.org/
Copyright © 2002-2006 Platon Group
Site powered by Metafox CMS
Go to Top