Diff for scripts/php/sk-nic/SK-NIC.php between version 1.4 and 1.5
| version 1.4, 2007/03/12 04:47:23 |
version 1.5, 2007/03/14 00:25:27 |
|
|
| * |
* |
| */ |
*/ |
| |
|
| /* $Platon: scripts/php/sk-nic/SK-NIC.php,v 1.3 2007-03-12 03:50:10 nepto Exp $ */ |
/* $Platon: scripts/php/sk-nic/SK-NIC.php,v 1.4 2007-03-12 04:47:23 nepto Exp $ */ |
| |
|
| require_once 'DB.php'; |
require_once 'DB.php'; |
| |
|
|
|
| return $changed_date; |
return $changed_date; |
| } /* }}} */ |
} /* }}} */ |
| |
|
| |
function _getMaxChangedDate() /* {{{ */ |
| |
{ |
| |
$query = 'SELECT MAX(dt_changed) FROM sknic_domains'; |
| |
$date = $this->_db->getOne($query); |
| |
DB::isError($date) && $this->error($date); |
| |
return $date; |
| |
} /* }}} */ |
| |
|
| function doImport($filename, $changed_date = null) /* {{{ */ |
function doImport($filename, $changed_date = null) /* {{{ */ |
| { |
{ |
| if ($changed_date == null) { |
if ($changed_date == null) { |
| $changed_date = $this->_getChangedDateFromFilename($filename); |
$changed_date = $this->_getChangedDateFromFilename($filename); |
| } |
} |
| |
if (strncmp($changed_date, $this->_getMaxChangedDate(), 10) <= 0) { |
| |
return false; |
| |
} |
| $this->_cleanImport(); |
$this->_cleanImport(); |
| $this->_writeImportWithLoadData($filename, $changed_date); |
$this->_writeImportWithLoadData($filename, $changed_date); |
| |
return true; |
| } /* }}} */ |
} /* }}} */ |
| |
|
| function _cleanImport() /* {{{ */ |
function _cleanImport() /* {{{ */ |
Platon Group <platon@platon.org> http://platon.org/
|
|