diff --git a/configure.php b/configure.php index 1a07591639..2f508447f7 100755 --- a/configure.php +++ b/configure.php @@ -43,7 +43,6 @@ // xinclude_residua() done // xml_partial_output // xml_validate() done -// phd_acronym() done // phd_sources() done // phd_version() done // php_history() done @@ -1073,7 +1072,6 @@ function xml_validate_libxml( $dom ) // All PhD stuff, after XML validation. -phd_acronym(); php_history(); phd_sources(); phd_version(); @@ -1085,10 +1083,6 @@ function xml_validate_libxml( $dom ) // TODO: Should this moved to github/php/phd? // Any input/state can be serialized into doc-base/temp/phd-conf.json. -function phd_acronym() -{ -} - function php_history() { global $ac; diff --git a/entities/acronyms.xml b/entities/acronyms.xml deleted file mode 100644 index 260299052a..0000000000 --- a/entities/acronyms.xml +++ /dev/null @@ -1,596 +0,0 @@ - - - - -
- Acronyms - - - AKA - - Also Known As - - - - API - - Application Programming Interface - - - - ASCII - - American Standard Code for Information Interchange - - - - BMP - - Bitmap - - - - CA - - Certificate Authority - - - - CGI - - Common Gateway Interface - - - - CLI - - Command Line Interpreter/Interface - - - - CSPRNG - - Cryptographically Secure PseudoRandom Number Generator - - - - CSR - - Certificate Signing Request - - - - CSS - - Cascading Style Sheets - - - - CSV - - Comma Separated Value - - - - cURL - - Client URL Library - - - - CVS - - Concurrent Versions System - - - - DER - - Distinguished Encoding Rules - - - - DLL - - Dynamic Link Library - - - - DNF - - Disjunctive Normal Form - - - - DNS - - Domain Name System - - - - DOM - - Document Object Model - - - - DSSSL - - Document Style Semantics and Specification Language - - - - EOF - - End Of File - - - - EXIF - - Exchangeable Image File - - - - FAQ - - Frequently Asked Questions - - - - FPM - - FastCGI Process Manager - - - - FTP - - File Transfer Protocol - - - - FTPS - - File Transfer Protocol SSL/Secure - - - - GD - - Graphics Draw - - - - GIF - - Graphic Interchange Format - - - - GLE - - getLastError - - - - GMP - - GNU Multiple Precision - - - - HIS - - Hyperwave Information Server - - - - HKDF - - HMAC Key Definition Function - - - - HMAC - - Hash-based Message Authentication Code - - - - HTML - - Hyper Text Markup Language - - - - HTTP - - Hypertext Transfer Protocol - - - - HTTPS - - Hypertext Transfer Protocol Secure - - - - HSTS - - HTTP Strict Transport Security - - - - IDE - - Integrated Development Environment - - - - IFD - - Image File Directory - - - - IFF - - Interchange File Format - - - - IMAP - - Internet Message Access Protocol - - - - IP - - Internet Protocol - - - - IPv4 - - Internet Protocol version 4 - - - - IPv6 - - Internet Protocol version 6 - - - - JB2 - - Joint Bilevel Image Experts Group - - - - JP2 - - JPEG-2000 - - - - JPC - - Japan Picture - - - - JPEG - - Joint Photographic Experts Group - - - - JSON - - JavaScript Object Notation - - - - LDAP - - Lightweight Directory Access Protocol - - - - LFS - - Large File Support - - - - MIME - - Multipurpose Internet Mail Extensions - - - - MP - - Multiple Precision - - - - MSDN - - Microsoft Developer Network - - - - NNTP - - Network News Transfer Protocol - - - - PBKDF2 - - Password-Based Key Derivation Function 2 - - - - PDF - - Portable Document Format - - - - PDO - - PHP Data Objects - - - - PECL - - PHP Extension and Application Repository - - - - PEM - - Privacy-Enhanced Mail - - - - Phar - - PHP archive - - - - PHP - - PHP: Hypertext Preprocessor - - - - PKCS - - Public Key Cryptography Standards - - - - PNG - - Portable Network Graphics - - - - POP3 - - Post Office Protocol version 3 - - - - POSIX - - Portable Operating System Interface - - - - PSD - - Photoshop Document - - - - QoS - - Quality of Service - - - - RGB - - Red-Green-Blue - - - - RTSP - - Real-Time Streaming Protocol - - - - SAPI - - Server Application Programming Interface - - - - SASL - - Simple Authentication and Security Layer - - - - SFTP - - SSH/Secure File Transfer Protocol - - - - SMTP - - Simple Mail Transfer Protocol - - - - SNMP - - Simple Network Management Protocol - - - - SPL - - Standard PHP Library - - - - SSH - - Secure Shell Protocol - - - - SSL - - Secure Sockets Layer - - - - SWF - - Shockwave Flash - - - - TCP - - Transmission Control Protocol - - - - TIFF - - Tagged Image File Format - - - - TLS - - Transport Layer Security - - - - TNS - - Transparent Network Substrate - - - - UDF - - User Defined Functions - - - - UDP - - User Datagram Protocol - - - - Unicode - - Unique, Universal, and Uniform character enCoding - - - - URI - - Uniform Resource Identifier - - - - URL - - Uniform Resource Locator - - - - WBMP - - Wireless Bitmap - - - - WSDL - - Web Services Description Language - - - - XBM - - X Bitmap - - - - XML - - eXtensible Markup Language - - - - XPath - - XML Path Language - - - - XSLT - - eXtensible Stylesheet Language Transformations - - - - -
- - diff --git a/entities/global.ent b/entities/global.ent index 56710b24e0..a3778f024e 100644 --- a/entities/global.ent +++ b/entities/global.ent @@ -700,46 +700,3 @@ .user.ini'> httpd.conf'> .htaccess'> - - -API'> -ASCII'> -CA'> -CGI'> -CLI'> -CLI SAPI'> -cURL'> -DER'> -DNS'> -DOM'> -FPM'> -FTP'> -FTPS'> -HMAC'> -HTML'> -HTTP'> -HTTPS'> -HSTS'> -IP'> -IPv4'> -IPv6'> -JSON'> -LDAP'> -PDO'> -PEM'> -Phar'> -PHP'> -POP3'> -RTSP'> -SAPI'> -SFTP'> -SMTP'> -SPL'> -SSH'> -SSL'> -TCP'> -TLS'> -UDP'> -URI'> -URL'> -XML'> diff --git a/scripts/qa/check-acronyms.php b/scripts/qa/check-acronyms.php index b41086e548..1b98aa46ce 100755 --- a/scripts/qa/check-acronyms.php +++ b/scripts/qa/check-acronyms.php @@ -27,16 +27,27 @@ define('M_VERBOSE', 3); // display complete informations about every acronyms if ($_SERVER['argc'] == 2 && - in_array($_SERVER['argv'][1], array('--help', '-help', '-h', '-?')) - || - $_SERVER['argc'] < 2) { + in_array($_SERVER['argv'][1], array('--help', '-help', '-h', '-?')) + || + $_SERVER['argc'] < 3) { echo "Display acronyms statistics\n\n"; - echo "Usage: {$_SERVER['argv'][0]} [-v] \n"; - echo "Usage: {$_SERVER['argv'][0]} -i [acronym...]\n"; + echo "Usage: {$_SERVER['argv'][0]} [-v] \n"; + echo "Usage: {$_SERVER['argv'][0]} -i [acronym...]\n"; echo " --help, -help, -h, -? - to get this help\n"; echo " -v - verbose\n"; - + echo "\n"; + echo "The acronyms file usually is doc-en/entities/entities.acronyms.ent\n"; + + exit(1); + +} + +$acronyms_file = $_SERVER['argv'][1]; + +if (!is_file($acronyms_file)) { + + echo "ERROR: Acronyms file not found: $acronyms_file\n"; exit(1); } @@ -44,26 +55,26 @@ $requested_acronyms = array(); // select mode -if ($_SERVER['argv'][1] !== '-i') { +if ($_SERVER['argv'][2] !== '-i') { + + if ($_SERVER['argv'][2] === '-v' && isset($_SERVER['argv'][3])) { - if ($_SERVER['argv'][1] === '-v' && isset($_SERVER['argv'][2])) { - $mode = M_VERBOSE; - $start_path = $_SERVER['argv'][2]; - + $start_path = $_SERVER['argv'][3]; + } else { - + $mode = M_GLOBAL; - $start_path = $_SERVER['argv'][1]; - + $start_path = $_SERVER['argv'][2]; + } -} else if (isset($_SERVER['argv'][2])) { +} else if (isset($_SERVER['argv'][3])) { $mode = M_SPECIFIC; - $start_path = 'en/'; + $start_path = dirname(dirname($acronyms_file)); - $requested_acronyms = array_slice($_SERVER['argv'], 2); + $requested_acronyms = array_slice($_SERVER['argv'], 3); } else { @@ -88,24 +99,26 @@ // complete with information about definition -$content = file_get_contents('entities/acronyms.xml'); +$content = file_get_contents($acronyms_file); -if (preg_match_all('#(.+?)\s+\s+(.+?)(.*?)#s', $content, $matches)) { foreach($matches[1] as $id => $acronym) { - + + $description = trim(preg_replace('#\s+#', ' ', $matches[2][$id])); + if (!isset($acronyms_infos[$acronym])) { $acronyms_infos[$acronym] = array('defined' => true, - 'description' => $matches[2][$id], + 'description' => $description, 'locations' => array()); - + } else { $acronyms_infos[$acronym]['defined'] = true; - $acronyms_infos[$acronym]['description'] = $matches[2][$id]; + $acronyms_infos[$acronym]['description'] = $description; } - + } - + } @@ -144,7 +157,7 @@ $total_uNd = $total_used-$total_UNNd; echo "Found $total_occs occurrences of $total_used acronyms in $start_path\n"; - echo " $total_defined acronyms are defined in acronyms.ent\n"; + echo " $total_defined acronyms are defined in " . basename($acronyms_file) . "\n"; echo " $total_uNd (".round(100*$total_uNd/$total_used)."%) acronyms used are defined\n"; if ($total_UNNd) {