Subversion Repositories oidinfo_api

Compare Revisions

Regard whitespace Rev 24 → Rev 23

/trunk/README.md
File deleted
Property changes:
Deleted: svn:mime-type
-text/markdown
\ No newline at end of property
/trunk/index.html
19,7 → 19,7
 
<h1>oid-info.com API for PHP</h1>
 
<p><i>24 November 2021</i></p>
<p><i>12 March 2019</i></p>
 
<h2>Introduction</h2>
 
/trunk/oidinfo_api.inc.phps
3,7 → 3,7
/*
* OID-Info.com API for PHP
* Copyright 2019-2021 Daniel Marschall, ViaThinkSoft
* Version 2021-11-24
* Version 2021-06-19
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
179,8 → 179,6
}
 
public function softCorrectEMail($email, $params) {
$params = $this->init_params($params);
 
$email = str_replace(' ', '', $email);
$email = str_replace('&', '@', $email);
$email = str_replace('(at)', '@', $email);
197,8 → 195,6
}
 
public function softCorrectPhone($phone, $params) {
$params = $this->init_params($params);
 
// TODO: if no "+", add "+1" , but only if address is in USA
// TODO: or use param to fixate country if it is not known
/*
262,8 → 258,6
const OIDINFO_CORRECT_DESC_DISALLOW_ENDING_DOT = 2;
 
public function correctDesc($desc, $params, $ending_dot_policy=self::OIDINFO_CORRECT_DESC_OPTIONAL_ENDING_DOT, $enforce_xhtml_light=false) {
$params = $this->init_params($params);
 
$desc = trim($desc);
 
$desc = preg_replace('@<!\\[CDATA\\[(.+)\\]\\]>@ismU', '\\1', $desc);
491,7 → 485,7
 
echo $oa->createXMLEntry($oid, $elements, $params, $comment);
*/
private function init_params($params) {
public function createXMLEntry($oid, $elements, $params, $comment='') {
// Backward compatibility
if (!isset($params['do_csv_check'])) $params['do_simpleping_check'] = true;
 
509,11 → 503,6
if (!isset($params['tolerant_htmlentities'])) $params['tolerant_htmlentities'] = true;
if (!isset($params['ignore_xhtml_light'])) $params['ignore_xhtml_light'] = false;
 
return $params;
}
public function createXMLEntry($oid, $elements, $params, $comment='') {
$params = $this->init_params($params);
 
$out = '';
if (!empty($comment)) $out .= "\t\t<!-- $comment -->\n";