[prev in list] [next in list] [prev in thread] [next in thread]
List: php-doc-cvs
Subject: [DOC-CVS] [doc-base] master: Remove iniupdate scripts
From: George Peter Banyard <noreply () php ! net>
Date: 2021-05-25 22:50:15
Message-ID: NS8q99EFz4V5wdYNqIhkZzeQ9z1dpce2TAhl8PZU () main ! php ! net
[Download RAW message or body]
Author: George Peter Banyard (Girgias)
Date: 2021-05-25T23:50:29+01:00
Commit: https://github.com/php/doc-base/commit/f4eff8d4b5b2afb8220027194a2ba4811903f51a
Raw diff: https://github.com/php/doc-base/commit/f4eff8d4b5b2afb8220027194a2ba4811903f51a.diff
Remove iniupdate scripts
I think this was meant to be used to fill in information about INI settings but \
hasn't been used in the last decade
Changed paths:
D scripts/iniupdate/README
D scripts/iniupdate/cvs-versions
D scripts/iniupdate/cvs-versions.php
D scripts/iniupdate/generate_changelog.php
D scripts/iniupdate/ini-update.php
D scripts/iniupdate/ini_search_lib.php
D scripts/iniupdate/insert_db.php
D scripts/iniupdate/make_db.php
D scripts/iniupdate/pecl.php
D scripts/iniupdate/print_arrays.php
D scripts/iniupdate/rm-ini-files.php
D scripts/iniupdate/run.php
D scripts/iniupdate/update-all.php
D scripts/iniupdate/update_db.php
Diff:
diff --git a/scripts/iniupdate/README b/scripts/iniupdate/README
deleted file mode 100755
index fd1f0c1b..00000000
--- a/scripts/iniupdate/README
+++ /dev/null
@@ -1,24 +0,0 @@
-ini doc settings updater
-========================
-
-Note: PHP 5.0.2 and sqlite are required
-
-To run this script, you just need to run: 'php run.php'
-To get some help about the supported options run: 'php run.php --help'
-
-The script will update the ini.xml files (if needed). After this, you should run
-a 'cvs diff' and read it carefully and do not commit the changes if you feel
-they are either wrong or the manually entered information is better.
-
-Currently there is still some information that needs to be entered manually.
-This information can be found in the 'cvs-versions' file and describes the active
-CVS development branches.
-
-
-Note: The sources of the PHP and PECL releases take about 1.5 GB of disk space as
-of the end of 2007. However they can be shared with the functable script
-(just do a symlink of the 'sources' folder).
-
-
-Note: most scripts in this dir can be run alone for debugging purposes (they will
-print their output arrays)
diff --git a/scripts/iniupdate/cvs-versions b/scripts/iniupdate/cvs-versions
deleted file mode 100755
index 847888a6..00000000
--- a/scripts/iniupdate/cvs-versions
+++ /dev/null
@@ -1,3 +0,0 @@
-PHP_4_CVS=PHP_4_4
-PHP_5_CVS=PHP_5_3
-PHP_6_CVS=HEAD
diff --git a/scripts/iniupdate/cvs-versions.php b/scripts/iniupdate/cvs-versions.php
deleted file mode 100755
index de9e7636..00000000
--- a/scripts/iniupdate/cvs-versions.php
+++ /dev/null
@@ -1,162 +0,0 @@
-<?php
-/*
- +----------------------------------------------------------------------+
- | ini doc settings updater |
- +----------------------------------------------------------------------+
- | Copyright (c) 1997-2011 The PHP Group |
- +----------------------------------------------------------------------+
- | This source file is subject to version 3.0 of the PHP license, |
- | that is bundled with this package in the file LICENSE, and is |
- | available through the world-wide-web at the following url: |
- | http://www.php.net/license/3_0.txt. |
- | If you did not receive a copy of the PHP license and are unable to |
- | obtain it through the world-wide-web, please send a note to |
- | license@php.net so we can mail you a copy immediately. |
- +----------------------------------------------------------------------+
- | Authors: Nuno Lopes <nlopess@php.net> |
- +----------------------------------------------------------------------+
-
- $Id$
-*/
-
-
-/** fetch the PHP release tags */
-function get_php_release_tags()
-{
- static $tags = null;
-
- if ($tags) return $tags;
-
- chdir('sources');
-
- if (empty($GLOBALS['skip_download']) || !is_dir('php-src')) {
- `cvs -q -d :pserver:cvsread@cvs.php.net:/repository co -P php-src > \
/dev/null`;
- }
-
- chdir('php-src');
-
- if (empty($GLOBALS['skip_download']) || !is_file('.ChangeLog.log')) {
- `cvs -q log ChangeLog > .ChangeLog.log`;
- }
-
- $log = file('.ChangeLog.log', FILE_SKIP_EMPTY_LINES|FILE_IGNORE_NEW_LINES);
- chdir('../..');
-
- do {
- $l = array_shift($log);
- if ($l === 'symbolic names:' || $l === NULL) {
- break;
- }
- } while (1);
-
- $tags = array();
- foreach ($log as $l) {
- if (substr($l, 0, 1) != "\t") {
- break;
- }
- list($tag) = explode(': ', trim($l));
- if (preg_match('/^PHP_[456]_[0-9]+_[0-9]+$/i', $tag)) {
- $tags[] = $tag;
- }
- }
-
- natcasesort($tags);
- $tags = array_map('strtoupper', $tags);
- $tags = array_unique($tags);
-
- return $tags;
-}
-
-
-/** fetch the PECL's packages releases that have been downloaded */
-function get_pecl_releases_local()
-{
- static $cache = null;
- if ($cache) return $cache;
-
- foreach (scandir('sources') as $dir) {
- if ($dir !== '.' &&
- $dir !== '..' &&
- $dir !== 'php-src' &&
- $dir !== 'pecl' &&
- substr_compare($dir, 'PHP_', 0, 4, true) !== 0)
- {
- $releases[] = $dir;
- }
- }
-
- natsort($releases);
-
- return $cache = $releases;
-}
-
-
-// if run alone, it means debug mode and thus no slow network access
-if (basename(__FILE__) == $_SERVER['PHP_SELF']) {
- $skip_download = true;
-}
-
-
-// fetch all version tags
-$tags = get_php_release_tags();
-
-// PHP 4.0.7 wasn't released, although it was tagged in CVS
-$key = array_search('PHP_4_0_7', $tags);
-if ($key !== false) unset($tags[$key]);
-
-$lasttag = 'PHP_4_0_0';
-
-foreach (array_merge($tags, array('php_head')) as $tag) {
- if ($tag[4] === $lasttag[4]) {
- $lasttag = $tag;
- continue;
- }
-
- $last_versions[] = substr($lasttag, 4); // this is the last released version \
from a major version
- $lasttag = $tag;
-}
-
-
-// fetch cvs versions
-$file = file_get_contents('./cvs-versions');
-preg_match_all('/PHP_(\d+)_CVS=(\w+)/', $file, $data, PREG_SET_ORDER);
-
-$cvs_versions = $cvs_branches = array();
-foreach ($data as $v) {
- if ($v[2] == 'HEAD') {
- $version = "$v[1].0.0";
- } else {
- $version = make_cvs_version(substr($v[2], 4));
- }
- $cvs_versions["php_$v[1]_cvs"] = $version;
- $cvs_branches["php_$v[1]_cvs"] = $v[2];
-}
-
-$tags = array_merge(array_keys($cvs_versions), $tags);
-
-// the file was called directly: DEBUG mode
-if (basename(__FILE__) == $_SERVER['PHP_SELF']) {
- print_r($cvs_versions);
- print_r($last_versions);
- print_r($tags);
-}
-
-
-// guess the cvs version number by checking last released versions
-function make_cvs_version($tag) {
- global $last_versions;
-
- foreach ($last_versions as $ver) {
- if (strpos($ver, $tag) === 0) { //found it
- $parts = explode('_', $ver);
- ++$parts[2]; //increment minor version (5.5.1 -> 5.5.2)
- return implode('.', $parts);
- }
- }
-
- // new branch (5.5.0)
- return "$tag[0].$tag[2].0";
-}
-
-unset($file, $data, $last_versions);
-?>
diff --git a/scripts/iniupdate/generate_changelog.php \
b/scripts/iniupdate/generate_changelog.php deleted file mode 100755
index 17b9e186..00000000
--- a/scripts/iniupdate/generate_changelog.php
+++ /dev/null
@@ -1,331 +0,0 @@
-<?php
-/*
- +----------------------------------------------------------------------+
- | ini doc settings updater |
- +----------------------------------------------------------------------+
- | Copyright (c) 1997-2011 The PHP Group |
- +----------------------------------------------------------------------+
- | This source file is subject to version 3.0 of the PHP license, |
- | that is bundled with this package in the file LICENSE, and is |
- | available through the world-wide-web at the following url: |
- | http://www.php.net/license/3_0.txt. |
- | If you did not receive a copy of the PHP license and are unable to |
- | obtain it through the world-wide-web, please send a note to |
- | license@php.net so we can mail you a copy immediately. |
- +----------------------------------------------------------------------+
- | Authors: Nuno Lopes <nlopess@php.net> |
- +----------------------------------------------------------------------+
-
- $Id$
-*/
-
-
-// if run alone, it means debug mode and thus no slow network access
-if (empty($included)) {
- $skip_download = true;
-}
-
-require_once './cvs-versions.php';
-require_once './pecl.php';
-
-
-/** converts a tag like php_5_0_0 into a version like 5.0.0 */
-function tag2version($tag)
-{
- global $cvs_versions;
-
- if (isset($cvs_versions[$tag]))
- return $cvs_versions[$tag];
-
- if (substr_compare($tag, 'PHP_', 0, 4, true) == 0) {
- return strtr(substr($tag, 4), '_', '.');
- } else { // PECL
- return substr($tag, strpos($tag, '-')+1);
- }
-}
-
-
-/** return the major version of a given release tag */
-function major_version($tag)
-{
- $v = tag2version($tag);
- return substr($v, 0, strpos($v, '.'));
-}
-
-
-/** returns TRUE if the tag is a PHP release */
-function is_php($tag)
-{
- return (substr_compare($tag, 'PHP_', 0, 4, true) == 0);
-}
-
-
-/** returns TRUE if the opt is/was present in PHP (i.e. it is not in PECL only) */
-function in_php($array)
-{
- return is_php(key($array));
-}
-
-
-/** returns the package name of the given array/string */
-function pkg_name($array)
-{
- $input = is_array($array) ? key($array) : $array;
- preg_match('/^(.+)-\d+(?:\.\d+)+$/S', $input, $m);
- $lowered = $m[1];
-
- foreach (get_pecl_packages() as $pkg) {
- if (strcasecmp($pkg, $lowered) === 0) {
- return $pkg;
- }
- }
-}
-
-
-/** fetch the local PECL releases of the given pkg name */
-function get_local_pecl_releases($array)
-{
- static $cache = array();
-
- $pecl_releases = get_pecl_releases_local();
-
- $pkg = pkg_name($array);
-
- if (isset($cache[$pkg])) return $cache[$pkg];
-
- $pkg_strlen = strlen($pkg);
-
- foreach ($pecl_releases as $release) {
- if (substr_compare($pkg, $release, 0, $pkg_strlen, true) == 0) {
- $cache[$pkg][] = $release;
- }
- }
-
- return $cache[$pkg];
-}
-
-
-/** return when the option become available */
-function available_since($array)
-{
- $ver = null;
-
- if (in_php($array)) {
- if (!current($array)) {
- foreach ($array as $tag => $val) {
- if ($val) {
- $ver = 'PHP '. tag2version($tag);
- break;
- }
- }
- }
-
- // PECL only
- } else {
- $releases = get_local_pecl_releases($array);
-
- if (key($array) !== current($releases)) {
- foreach ($releases as $rel) {
- if ($rel === key($array)) {
- $ver = pkg_name($array) .' '. tag2version($rel);
- break;
- }
- }
- }
- }
-
- return $ver ? "Available since $ver." : '';
-}
-
-
-/** check for changes between versions */
-function last_version($array)
-{
- $majors = array();
- $last = null;
- $last_tag = null;
- $last_php = true;
- $output = '';
-
- foreach ($array as $tag => $val) {
- if (!$val) continue;
- if (!$last) $last = $val;
- if (!$last_tag) $last_tag = $tag;
-
- $majorver = major_version($tag);
- $first_major_release = false;
- $now_php = is_php($tag);
-
- if (!$now_php && $last_php) { // now we have PECl stuff. reset the major \
versions array
- $majors = array();
- }
-
- if (!isset($majors[$majorver])) {
- $majors[$majorver] = $val;
- $first_major_release = true;
-
- } elseif ($majors[$majorver] !== $val) { // the value isnt the same in this \
major version
- $majors[$majorver] = false;
- }
-
-
- // the change is only significant if not comparing between PHP and PECL \
releases
- if ($val !== $last && ($now_php || !$last_php)) {
-
- $pkg = is_php($tag) ? 'PHP' : pkg_name($tag);
- if ($output) $output .= ' ';
-
- if ($first_major_release) {
- if (empty($majors[$majorver-1]) || count($majors) > 2) {
- $ver = "< $majorver";
- } else {
- $ver = $majorver-1;
- }
- } else {
- $ver = '<= ' . tag2version($last_tag);
- }
-
- $output .= "$last in $pkg ". $ver . '.';
- }
-
- $last = $val;
- $last_tag = $tag;
- $last_php = $now_php;
-
- }
-
- return $output;
-}
-
-
-/** return when the option was removed */
-function removed_in($array)
-{
- $ver = null;
-
- if (in_php($array)) {
- $on = false;
-
- foreach ($array as $tag => $val) {
- if ($val) {
- $on = true;
-
- } elseif ($on) {
- $ver = 'PHP '. tag2version($tag);
- break;
- }
- }
-
- // PECL only
- } else {
- $releases = get_local_pecl_releases($array);
-
- $on = false;
- end($array);
-
- if (end($releases) !== key($array)) {
- foreach ($releases as $release) {
- if ($release === key($array)) {
- $on = true;
-
- } else if ($on) {
- $ver = pkg_name($array) .' '. tag2version($release);
- break;
- }
- }
- }
- }
-
-
- return $ver ? "Removed in $ver." : '';
-}
-
-
-/** generate the changelog column */
-function generate_changelog($array)
-{
- $data = array(
- last_version($array),
- available_since($array),
- removed_in($array),
- );
-
-
- $str = '';
-
- foreach ($data as $s) {
- if ($s) {
- $str .= ($str ? ' ' : '') . $s;
- }
- }
-
- return $str;
-}
-
-
-
-if (!$idx = sqlite_open('ini_changelog.sqlite', 0666, $error)) {
- die("Couldn't open the DB: $error");
-}
-
-$q = sqlite_unbuffered_query($idx, 'SELECT * FROM changelog');
-
-/* This hack is needed because sqlite 2 sort case-sensitive */
-while ($row = sqlite_fetch_array($q, SQLITE_ASSOC)) {
- $name = $row['name'];
- unset($row['name']);
- uksort($row, 'strnatcasecmp');
- $info[$name] = $row;
-}
-
-
-$q = sqlite_unbuffered_query($idx, 'SELECT * FROM pecl_changelog');
-
-while ($row = sqlite_fetch_array($q, SQLITE_ASSOC)) {
- $info[$row['name']][$row['package'].'-'.$row['version']] = $row['value'];
-}
-
-
-/** custom sorting callback, so that PHP releases are listed before PECL ones. */
-function my_strnatcasecmp($a, $b)
-{
- if (is_php($a)) {
- return is_php($b) ? strnatcasecmp($a, $b) : -1;
- } else {
- return is_php($b) ? 1 : strnatcasecmp($a, $b);
- }
-}
-
-// sort releases with the callback above
-foreach ($info as &$r) {
- uksort($r, 'my_strnatcasecmp');
-}
-
-
-uksort($info, 'strnatcasecmp');
-
-foreach ($info as $name => $row) {
- $changelog[$name] = generate_changelog($row);
-
- // WARNING: DEBUG STUFF
- if (isset($argv[1]) && $name === $argv[1]) {
- print_r($row);
- var_dump($changelog[$name]);
- exit;
- }
-}
-
-// special case
-$changelog['max_input_nesting_level'] = 'Available since PHP 4.4.8 and PHP 5.2.3.';
-
-// if in debug mode
-if (empty($included)) {
- foreach ($changelog as $key => $val) {
- echo "$key : $val\n";
- }
-}
-
-sqlite_close($idx);
-unset($idx);
-
-?>
diff --git a/scripts/iniupdate/ini-update.php b/scripts/iniupdate/ini-update.php
deleted file mode 100755
index 72b6589c..00000000
--- a/scripts/iniupdate/ini-update.php
+++ /dev/null
@@ -1,226 +0,0 @@
-<?php
-/*
- +----------------------------------------------------------------------+
- | ini doc settings updater |
- +----------------------------------------------------------------------+
- | Copyright (c) 1997-2011 The PHP Group |
- +----------------------------------------------------------------------+
- | This source file is subject to version 3.0 of the PHP license, |
- | that is bundled with this package in the file LICENSE, and is |
- | available through the world-wide-web at the following url: |
- | http://www.php.net/license/3_0.txt. |
- | If you did not receive a copy of the PHP license and are unable to |
- | obtain it through the world-wide-web, please send a note to |
- | license@php.net so we can mail you a copy immediately. |
- +----------------------------------------------------------------------+
- | Authors: Nuno Lopes <nlopess@php.net> |
- | Jakub Vrána <vrana@php.net> |
- +----------------------------------------------------------------------+
-
- $Id$
-*/
-
-
-/* Configuration Options */
-
-$php_src_dir = 'sources/php-src'; //php-src path
-$pecl_dir = 'sources/pecl'; //pecl path
-$phpdoc_dir = '../..'; //phpdoc path
-
-/******* END of configurations *****/
-
-require_once './ini_search_lib.php';
-
-
-/* Fix ini.xml files */
-
-function fix_ini_xml($filename) {
- global $info;
-
- $original = $file = file_get_contents($filename);
-
- // insert the changelog column if it doesn't exist
- $file = preg_replace('@<tgroup\s+cols=[\'"]3[\'"]>(\s*<thead>\s*<row>\s*<entry>&? \
Name;?</entry>\s*<entry>&?Default;?</entry>(\s*)<entry>&?Changeable;?</entry>)(\s*</row>\s*</thead>)@US', \
'<tgroup cols="4">\1\2<entry>Changelog</entry>\3', $file);
-
- // remove old permissions constants usage about PHP_INI_PERDIR
- $file = preg_replace('/(?:PHP_INI_SYSTEM\s*\|\s*)?PHP_INI_PERDIR(?:\s*\|\s*PHP_INI_SYSTEM)?/', \
'PHP_INI_PERDIR', $file);
-
- preg_match_all('@<tgroup\s+cols="4">.+<tbody>.+</tbody>.+</tgroup>@USs', $file, \
$matches);
-
- foreach ($matches[0] as $match) {
- preg_match_all('@<row>.+</row>@USs', $match, $matches_row);
-
- foreach ($matches_row[0] as $match_row) {
- preg_match_all('@<entry>.*</entry>@USs', $match_row, $matches_entry);
-
- foreach ($matches_entry as $val) {
-
- if (count($val) < 3) {
- echo "problem in $filename:\n" . print_r($val, 1) . "\n";
- continue;
- }
-
- // create changelog column
- if (count($val) == 3) {
- $file = \
preg_replace("@(<row>\s*$val[0]\s*$val[1](\s*)".preg_quote($val[2]).')(\s*</row>)@', \
'\1\2<entry></entry>\3', $file);
- $val[3] = '<entry></entry>';
- }
-
- // now update the info
- $entry = substr($val[0], 7, -8);
- if (isset($info[$entry])) {
- $file = \
preg_replace("@(<row>\s*$val[0]\s*)$val[1](\s*)".preg_quote($val[2])."(\s*)$val[3](\s*</row>)@", \
"\\1<entry>{$info[$entry]['default']}</entry>\\2<entry>{$info[$entry]['permissions']}</entry>\\3<entry>{$info[$entry]['changelog']}</entry>\\4", \
$file);
- }
- }
-
- }
-
- }
-
-
- // if the file was modified, write the changes
- if ($original != $file) {
- file_put_contents($filename, $file);
- echo "Wrote $filename\n";
- }
-}
-
-
-
-/* Start the main program */
-
-$array = array();
-$replace = array();
-recurse(array($pecl_dir, $php_src_dir), true);
-
-$string = '';
-
-echo 'Found ' . count($array) . " entries\n";
-
-// get the changelog info
-$included = true;
-require_once './generate_changelog.php';
-unset($info, $included, $error, $row);
-
-
-/* &php.ini; only */
-$special = array('disable_functions' => 1, 'disable_classes' => 1, 'expose_php' => \
1, 'mail.force_extra_parameters' => 1);
-
-/* Find links to documentation */
-$links = array();
-$link_files = array();
-$ini_files = glob("$phpdoc_dir/en/reference/*/ini.xml");
-$ini_files[] = "$phpdoc_dir/en/features/safe-mode.xml";
-$ini_files[] = "$phpdoc_dir/en/appendices/ini.core.xml";
-
-foreach ($ini_files as $filename) {
-
- preg_match_all('~<varlistentry\s+(?:xml:)?id="(ini\.[^"]+)">(.*)</varlistentry>~USs', \
file_get_contents($filename), $matches, PREG_SET_ORDER);
- foreach ($matches as $varlistentry) {
- preg_match_all('~<term>.*<parameter>(.*)</parameter>~USs', $varlistentry[2], \
$matches2);
- foreach ($matches2[1] as $parameter) {
- $links[trim($parameter)] = $varlistentry[1];
- $link_files[trim($parameter)] = $filename;
- }
- }
-}
-
-
-if (!$idx = sqlite_open('ini_changelog.sqlite', 0666, $error)) {
- die("Couldn't open the DB: $error");
-}
-
-// fetch info from removed opts
-foreach ($changelog as $name => $entry) {
- if (empty($array[$name])) {
- $q = sqlite_unbuffered_query($idx, "SELECT defaultval, permissions FROM \
last_seen_values WHERE name='$name'");
- $array[$name] = sqlite_fetch_array($q, SQLITE_NUM);
- }
-}
-
-sqlite_close($idx);
-unset($idx);
-
-
-// remove bogus ini opt values
-$bogus = array('pdo.global_value');
-foreach ($bogus as $x) {
- unset($array[$x]);
-}
-
-uksort($array, 'strnatcasecmp');
-
-
-/* Generate the XML code */
-foreach($array as $entry => $arr) {
-
- $oldentry = $entry;
-
- /* link entries */
- if (isset($links[$entry])) {
- $entry = '<link linkend="' . $links[$entry] . '">' . $entry . '</link>';
- unset($link_files[$oldentry]);
- }
-
- $default = expand_macros($arr[0]);
-
- if(preg_match_all('/"([^"]+)"/S', $default, $match) > 1) {
- $default = '"';
-
- foreach($match[1] as $add) {
- $default .= $add;
- }
- $default .= '"';
- }
-
- // replace the @PREFIX@ stuff
- $default = preg_replace(array('~@PREFIX@~i', '~[\\\\]{2}~'), \
array('/path/to/php', '/'), $default);
-
- /* end of $default stuff */
-
- $permissions = isset($special[$oldentry]) ? '&php.ini; only' : $arr[1];
-
-
- $info[$oldentry]['default'] = $default;
- $info[$oldentry]['permissions'] = $permissions;
- $info[$oldentry]['changelog'] = isset($changelog[$oldentry]) ? \
$changelog[$oldentry] : '';
-
-
- $string .= ' <row>' . PHP_EOL.
- " <entry>$entry</entry>" . PHP_EOL.
- " <entry>$default</entry>" . PHP_EOL.
- " <entry>$permissions</entry>" . PHP_EOL.
- " <entry>{$info[$oldentry]['changelog']}</entry>" . PHP_EOL.
- ' </row>'.PHP_EOL;
-}
-
-
-/* Print unmatched links */
-$deprecated = array('debugger.host', 'debugger.port', 'debugger.enabled', \
'sesam_oml', 'sesam_configfile', 'sesam_messagecatalog', 'allow_webdav_methods', \
'warn_plus_overloading');
-foreach ($deprecated as $val) {
- unset($link_files[$val]);
-}
-if ($link_files) {
- echo "Warning - unmatched links:\n";
- foreach ($link_files as $ini => $file) {
- echo str_pad($ini, 30, ' ', STR_PAD_RIGHT) . ' => ' . substr($file, \
strlen($phpdoc_dir)+4) . "\n";
- }
-}
-
-
-/* Now write the final result */
-$file = file_get_contents("$phpdoc_dir/en/appendices/ini.list.xml");
-
-$pos = strpos($file, '<tbody>', strpos($file, '<title>Configuration \
options</title>')) + strlen('<tbody>');
-$pos2 = strpos($file, '</tbody>', $pos);
-
-file_put_contents("$phpdoc_dir/en/appendices/ini.list.xml", substr($file, 0, $pos) . \
PHP_EOL . $string . ' ' . substr($file, $pos2));
-echo "\n\nWrote the main table\n";
-
-
-/* fix ini.xml files (if needed) */
-foreach ($ini_files as $file) {
- fix_ini_xml($file);
-}
-
-?>
diff --git a/scripts/iniupdate/ini_search_lib.php \
b/scripts/iniupdate/ini_search_lib.php deleted file mode 100755
index 613ab2c1..00000000
--- a/scripts/iniupdate/ini_search_lib.php
+++ /dev/null
@@ -1,143 +0,0 @@
-<?php
-/*
- +----------------------------------------------------------------------+
- | ini doc settings updater |
- +----------------------------------------------------------------------+
- | Copyright (c) 1997-2011 The PHP Group |
- +----------------------------------------------------------------------+
- | This source file is subject to version 3.0 of the PHP license, |
- | that is bundled with this package in the file LICENSE, and is |
- | available through the world-wide-web at the following url: |
- | http://www.php.net/license/3_0.txt. |
- | If you did not receive a copy of the PHP license and are unable to |
- | obtain it through the world-wide-web, please send a note to |
- | license@php.net so we can mail you a copy immediately. |
- +----------------------------------------------------------------------+
- | Authors: Nuno Lopes <nlopess@php.net> |
- +----------------------------------------------------------------------+
-
- $Id$
-*/
-
-// limit the macro expansion to avoid possible infinite loops
-define('MAX_MACRO_EXPAND_DEPTH', 10);
-
-
-
-function recurse($dirs, $search_macros = false) {
- global $array;
-
- $cfg_get = array();
-
- if (is_array($dirs)) {
- foreach($dirs as $dir)
- recurse_aux($dir, $search_macros, $cfg_get);
- } else {
- recurse_aux($dirs, $search_macros, $cfg_get);
- }
-
- /* insert only if the key doesn't exist, as will probably have
- more accurant data in $array than here */
- foreach($cfg_get as $entry) {
- if (!isset($array[$entry[0]]))
- $array[$entry[0]] = array($entry[1], 'PHP_INI_ALL');
- }
-
- uksort($array, 'strnatcasecmp');
-}
-
-
-// recurse through the dirs and do the 'dirty work'
-function recurse_aux($dir, $search_macros, &$cfg_get) {
- global $array, $replace;
-
- if (is_file($dir)) {
- $files = array(basename($dir));
- $dir = dirname($dir);
- } else {
- if (!is_file($dir) && !$files = @scandir($dir)) {
- echo "$dir - FAILED TO SCAN DIR\n";
- return;
- }
- unset($files[0], $files[1]); //remove the . and ..
- }
-
- foreach ($files as $file) {
-
- $path = $dir . '/' .$file;
-
- if (is_dir($path)) {
- recurse_aux($path, $search_macros, $cfg_get);
- } else {
- $file = file_get_contents($path);
-
- /* delete comments */
- $file = preg_replace('@(//.*$)|(/\*.*\*/)@SmsU', '', $file);
-
- /* The MAGIC Regexp :) */
- if (preg_match_all('/(?:PHP|ZEND)_INI_(?:ENTRY(?:_EX)?|BOOLEAN)\s*\(\s*"([^"]+)"\s*,((?:".*"|[^,])+)\s*,\s*([^,]+)/S', \
$file, $matches)) {
-
- $count = count($matches[0]);
- for ($i=0; $i<$count; ++$i) {
-
- $default = htmlspecialchars(trim($matches[2][$i]), \
ENT_NOQUOTES);
-
- $permissions = preg_replace(array('/\s+/', '/ZEND/'), array('', \
'PHP'), $matches[3][$i]);
- $permissions = ($permissions == 'PHP_INI_PERDIR|PHP_INI_SYSTEM' \
|| $permissions == 'PHP_INI_SYSTEM|PHP_INI_PERDIR') ? 'PHP_INI_PERDIR' : \
$permissions;
-
- $array[$matches[1][$i]] = array($default, $permissions);
- }
-
- } //end of the magic regex
-
-
- // find the nasty cfg_get_*() stuff
- if (preg_match_all('/cfg_get_([^(]+)\s*\(\s*"([^"]+)",\s*&([^\s=]+)\s*\)/S', \
$file, $match, PREG_SET_ORDER)) {
-
- foreach ($match as $arr) {
- \
preg_match('/(?:(FAILURE|SUCCESS)\s*==\s*)?'.preg_quote($arr[0]).'(?:\s*==\s*(FAILURE|SUCCESS))?(?:(?:[^=]|==){1,40}'.preg_quote($arr[3]).'\s*=\s*(.+);)?/', \
$file, $m);
-
- // if the default value wasn't found default to SUCCESS
- if (isset($m[1]) && ($m[1] === 'FAILURE' || $m[2] === \
'FAILURE')) {
- $cfg_get[] = array($arr[2], $arr[1] == 'string' ? $m[3] : \
'"'.$m[3].'"');
-
- } else { //$m[1] == 'SUCCESS'
- if ($arr[1] == 'string')
- $cfg_get[] = array($arr[2], '""');
- else
- $cfg_get[] = array($arr[2], '"0"');
- }
- } //foreach cfg_get_*()
- } //end of nasty cfg_get_*() regex
-
-
- /* search for C macros */
- if($search_macros && preg_match_all('/#\s*define\s+(\S{5,})[ \
\t]+(.+)/S', $file, $matches)) {
- $count = count($matches[0]);
- for($i=0;$i<$count;$i++) {
- $replace[$matches[1][$i]] = rtrim($matches[2][$i]);
- }
- } // end of macros
-
-
- } //!is_dir()
- } //while() loop
-}
-
-
-/** expand macros on the given string */
-function expand_macros($str)
-{
- global $replace;
-
- $new = $str;
- $old = null;
- $i = 0;
-
- while ($new[0] !== '"' && $new !== $old && ++$i < MAX_MACRO_EXPAND_DEPTH) {
- $old = $new;
- $new = strtr($new,$replace);
- }
-
- return $new;
-}
diff --git a/scripts/iniupdate/insert_db.php b/scripts/iniupdate/insert_db.php
deleted file mode 100755
index 0ab24f6d..00000000
--- a/scripts/iniupdate/insert_db.php
+++ /dev/null
@@ -1,99 +0,0 @@
-<?php
-/*
- +----------------------------------------------------------------------+
- | ini doc settings updater |
- +----------------------------------------------------------------------+
- | Copyright (c) 1997-2011 The PHP Group |
- +----------------------------------------------------------------------+
- | This source file is subject to version 3.0 of the PHP license, |
- | that is bundled with this package in the file LICENSE, and is |
- | available through the world-wide-web at the following url: |
- | http://www.php.net/license/3_0.txt. |
- | If you did not receive a copy of the PHP license and are unable to |
- | obtain it through the world-wide-web, please send a note to |
- | license@php.net so we can mail you a copy immediately. |
- +----------------------------------------------------------------------+
- | Authors: Nuno Lopes <nlopess@php.net> |
- +----------------------------------------------------------------------+
-
- $Id$
-*/
-
-require_once './ini_search_lib.php';
-require_once './cvs-versions.php';
-
-function insert_in_db($tag) {
- global $array, $idx;
-
- $sql = '';
-
- foreach ($array as $key => $data) {
-
- if (sqlite_single_query($idx, "SELECT name FROM changelog WHERE \
name='$key'")) {
- $sql .= "UPDATE changelog SET $tag='{$data[1]}' WHERE name='$key';";
- } else {
- $sql .= "INSERT INTO changelog (name, $tag) VALUES ('$key', \
'{$data[1]}');";
- }
-
- $sql .= "REPLACE INTO last_seen_values (name, defaultval, permissions) \
VALUES ('$key', '".sqlite_escape_string(expand_macros($data[0]))."', \
'$data[1]');";
-
- }
-
- if ($sql) sqlite_query($idx, $sql);
-}
-
-
-
-$db_open = isset($idx) ? true : false;
-
-if (!$db_open && !$idx = sqlite_open('ini_changelog.sqlite', 0666, $error)) {
- die("Couldn't create the DB: $error");
-}
-
-// process PHP sources
-foreach ($tags as $tag) {
- $array = $replace = array();
- recurse("./sources/$tag", true);
- insert_in_db($tag);
-
- echo "$tag\n";
-}
-
-// process PECL sources
-foreach (get_pecl_releases_local() as $release) {
-
- preg_match('/^(.+)-(\d+(?:\.\d+)+)$/S', $release, $m);
- $pkg = $m[1];
- $version = $m[2];
-
- // if it has an entry already, just skip it
- if (sqlite_single_query($idx, "SELECT COUNT(*) FROM pecl_changelog WHERE \
package='".sqlite_escape_string($pkg)."' AND version='$version'") > \
0) {
- continue;
- }
-
- $array = $replace = array();
- recurse("./sources/$release", true);
-
- $sql = '';
-
- foreach ($array as $key => $data) {
- $sql .= "INSERT INTO pecl_changelog (package, version, name, value) VALUES \
('".sqlite_escape_string($pkg)."', '$version', '$key', '$data[1]');";
-
- // prefer information from PHP sources
- if (!sqlite_single_query($idx, "SELECT name FROM changelog WHERE \
name='$key'")) {
- $sql .= "REPLACE INTO last_seen_values (name, defaultval, permissions) \
VALUES ('$key', '".sqlite_escape_string(expand_macros($data[0]))."', \
'$data[1]');";
- }
- }
-
- if ($sql) sqlite_query($idx, $sql);
-
- echo "$release\n";
-}
-
-
-if (!$db_open) {
- sqlite_close($idx);
- unset($idx);
-}
-
-?>
diff --git a/scripts/iniupdate/make_db.php b/scripts/iniupdate/make_db.php
deleted file mode 100755
index 9deff99e..00000000
--- a/scripts/iniupdate/make_db.php
+++ /dev/null
@@ -1,67 +0,0 @@
-<?php
-/*
- +----------------------------------------------------------------------+
- | ini doc settings updater |
- +----------------------------------------------------------------------+
- | Copyright (c) 1997-2011 The PHP Group |
- +----------------------------------------------------------------------+
- | This source file is subject to version 3.0 of the PHP license, |
- | that is bundled with this package in the file LICENSE, and is |
- | available through the world-wide-web at the following url: |
- | http://www.php.net/license/3_0.txt. |
- | If you did not receive a copy of the PHP license and are unable to |
- | obtain it through the world-wide-web, please send a note to |
- | license@php.net so we can mail you a copy immediately. |
- +----------------------------------------------------------------------+
- | Authors: Nuno Lopes <nlopess@php.net> |
- +----------------------------------------------------------------------+
-
- $Id$
-*/
-
-require_once './cvs-versions.php';
-$db_open = isset($idx) ? true : false;
-
-if (!$db_open && !$idx = sqlite_open('ini_changelog.sqlite', 0666, $error)) {
- die("Couldn't create the DB: $error");
-}
-
-$sql = '
-CREATE TABLE pecl_changelog (
- package TEXT,
- version TEXT,
- name TEXT,
- value TEXT
-);
-';
-
-$sql2 = '
-CREATE TABLE last_seen_values (
- name TEXT PRIMARY KEY,
- defaultval TEXT,
- permissions TEXT
-);
-';
-
-// the query may fail if the tables already exists
-@sqlite_query($idx, $sql);
-@sqlite_query($idx, $sql2);
-
-
-$sql = 'CREATE TABLE changelog (
-name TEXT PRIMARY KEY,';
-
-foreach($tags as $tag) {
- $sql .= "$tag TEXT,";
-}
-
-$sql = substr($sql, 0, -1) . ');';
-
-sqlite_query($idx, $sql);
-
-if (!$db_open) {
- sqlite_close($idx);
- unset($idx);
-}
-
-?>
diff --git a/scripts/iniupdate/pecl.php b/scripts/iniupdate/pecl.php
deleted file mode 100644
index b342d4c0..00000000
--- a/scripts/iniupdate/pecl.php
+++ /dev/null
@@ -1,99 +0,0 @@
-<?php
-/*
- +----------------------------------------------------------------------+
- | ini doc settings updater |
- +----------------------------------------------------------------------+
- | Copyright (c) 1997-2011 The PHP Group |
- +----------------------------------------------------------------------+
- | This source file is subject to version 3.0 of the PHP license, |
- | that is bundled with this package in the file LICENSE, and is |
- | available through the world-wide-web at the following url: |
- | http://www.php.net/license/3_0.txt. |
- | If you did not receive a copy of the PHP license and are unable to |
- | obtain it through the world-wide-web, please send a note to |
- | license@php.net so we can mail you a copy immediately. |
- +----------------------------------------------------------------------+
- | Authors: Nuno Lopes <nlopess@php.net> |
- +----------------------------------------------------------------------+
-
- $Id$
-*/
-
-
-/** returns an array with the PECL packages */
-function get_pecl_packages()
-{
- static $cache = null;
- if ($cache) return $cache;
-
- $packages = array();
- $XE = @new SimpleXMLElement('http://pecl.php.net/rest/p/packages.xml', NULL, \
true);
-
- foreach ($XE as $Element) {
- if ($Element->getName() == 'p') {
- $packages[] = (string) $Element;
- }
- }
-
- return $cache = $packages;
-}
-
-
-/** returns an array with the releases of the given PECL package */
-function get_pecl_releases($package)
-{
- try {
- $releases = array();
- $package = strtolower($package);
- $url = "http://pecl.php.net/rest/r/$package/allreleases.xml";
-
- // simplexml doesnt seem to be able to handle the 404 errors as I would \
like..
- if (@file_get_contents($url, 0, null, 0, 1) === false) return $releases;
-
- $XE = @new SimpleXMLElement($url, NULL, true);
-
- foreach ($XE as $Element) {
- if ($Element->getName() == 'r') {
- if (preg_match('/\d+\.\d+(?:\.\d+)?$/', (string) $Element->v)) {
- $releases[] = (string) $Element->v;
- }
- }
- }
-
- natsort($releases);
- return $releases;
-
- } catch (Exception $e) {
- print_r($e);
- exit;
- }
-}
-
-
-/** download a PECL release (if needed) */
-function grab_pecl_release($package, $release)
-{
- $package = strtolower($package);
-
- $url = 'http://pecl.php.net/get/'. urlencode($package) . '-' . \
urlencode($release);
- $dir = "$package-$release";
- $file = "$dir.tgz";
-
- download_sources($url, $dir, $file, $dir);
-}
-
-
-/** update PECL sources */
-function update_pecl_sources()
-{
- `cvs -q -d :pserver:cvsread@cvs.php.net:/repository co -P pecl > /dev/null`;
-
- foreach (get_pecl_packages() as $pkg) {
- $releases = get_pecl_releases($pkg);
-
- foreach ($releases as $ver) {
- echo "fetching PECL package: $pkg-$ver... ";
- grab_pecl_release($pkg, $ver);
- }
- }
-}
diff --git a/scripts/iniupdate/print_arrays.php b/scripts/iniupdate/print_arrays.php
deleted file mode 100755
index f2217c75..00000000
--- a/scripts/iniupdate/print_arrays.php
+++ /dev/null
@@ -1,14 +0,0 @@
-<?php
-
-include 'ini_search_lib.php';
-
-if ($argc == 1) die('specify a name!');
-
-$array = $replace = array();
-
-recurse($argv[1], true);
-
-print_r($array);
-print_r($replace);
-
-?>
diff --git a/scripts/iniupdate/rm-ini-files.php b/scripts/iniupdate/rm-ini-files.php
deleted file mode 100755
index 4ad4fb96..00000000
--- a/scripts/iniupdate/rm-ini-files.php
+++ /dev/null
@@ -1,19 +0,0 @@
-<?php
-
-/* this script will delete all files that can be modified by
- the ini updater. It's very usefull when debugging! */
-
-$phpdoc_dir = '../..';
-
-$ini_files = glob("$phpdoc_dir/en/reference/*/ini.xml");
-$ini_files[] = "$phpdoc_dir/en/features/safe-mode.xml";
-$ini_files[] = "$phpdoc_dir/en/appendices/ini.xml";
-
-foreach ($ini_files as $file) {
- unlink($file);
- echo "Deleted $file\n";
-}
-
-echo "fetch files from CVS again...\n";
-system('cvs up ' . implode(' ', $ini_files));
-?>
diff --git a/scripts/iniupdate/run.php b/scripts/iniupdate/run.php
deleted file mode 100755
index c889a413..00000000
--- a/scripts/iniupdate/run.php
+++ /dev/null
@@ -1,56 +0,0 @@
-<?php
-/*
- +----------------------------------------------------------------------+
- | ini doc settings updater |
- +----------------------------------------------------------------------+
- | Copyright (c) 1997-2011 The PHP Group |
- +----------------------------------------------------------------------+
- | This source file is subject to version 3.0 of the PHP license, |
- | that is bundled with this package in the file LICENSE, and is |
- | available through the world-wide-web at the following url: |
- | http://www.php.net/license/3_0.txt. |
- | If you did not receive a copy of the PHP license and are unable to |
- | obtain it through the world-wide-web, please send a note to |
- | license@php.net so we can mail you a copy immediately. |
- +----------------------------------------------------------------------+
- | Authors: Nuno Lopes <nlopess@php.net> |
- +----------------------------------------------------------------------+
-
- $Id$
-*/
-
-@mkdir('sources');
-
-array_shift($argv);
-
-foreach ($argv as $arg) {
- if ($arg === '-h' || $arg === '--help') {
- echo <<< HELP
-possible options:
---skip-download Do not download or update anything
-
-
-HELP;
- exit;
-
- } elseif ($arg === '--skip-download') {
- $skip_download = true;
- } else {
- die("option not recognized: '$arg'\n");
- }
-
-}
-
-
-if (empty($skip_download)) {
- require_once './update-all.php';
-}
-
-if (is_file('ini_changelog.sqlite')) {
- require_once './update_db.php';
-} else {
- require_once './make_db.php';
- require_once './insert_db.php';
-}
-
-require_once './ini-update.php';
diff --git a/scripts/iniupdate/update-all.php b/scripts/iniupdate/update-all.php
deleted file mode 100755
index 4115624d..00000000
--- a/scripts/iniupdate/update-all.php
+++ /dev/null
@@ -1,128 +0,0 @@
-<?php
-/*
- +----------------------------------------------------------------------+
- | ini doc settings updater |
- +----------------------------------------------------------------------+
- | Copyright (c) 1997-2011 The PHP Group |
- +----------------------------------------------------------------------+
- | This source file is subject to version 3.0 of the PHP license, |
- | that is bundled with this package in the file LICENSE, and is |
- | available through the world-wide-web at the following url: |
- | http://www.php.net/license/3_0.txt. |
- | If you did not receive a copy of the PHP license and are unable to |
- | obtain it through the world-wide-web, please send a note to |
- | license@php.net so we can mail you a copy immediately. |
- +----------------------------------------------------------------------+
- | Authors: Nuno Lopes <nlopess@php.net> |
- +----------------------------------------------------------------------+
-
- $Id$
-*/
-
-require_once './cvs-versions.php';
-require_once './pecl.php';
-
-
-/** find a dir inside the current pwd */
-function find_a_dir()
-{
- foreach (scandir('.') as $f) {
- if ($f !== '.' && $f !== '..' && is_dir($f)) return $f;
- }
-
- return false;
-}
-
-
-/** fetch a tag sources */
-function download_sources($url, $dir, $filename, $finaldir)
-{
- if (is_dir($finaldir)) {
- echo "already there\n";
- return;
- }
-
- @mkdir('tmp');
- chdir('tmp');
-
- if (!@copy($url, $filename)) {
- echo "\033[1;31mFAILED\033[0m\n";
- chdir('..');
- `rm -fr tmp`;
- return;
- }
-
- $filename = escapeshellarg($filename);
-
- `tar xfz $filename 2>&1 | grep -v "A lone zero block at"`; // silence some \
warnings from tar
-
- // this is needed because PECL packages don't have a naming standard for \
directories
- $dir = find_a_dir();
- if (!$dir) {
- die("directory not found for the following file: $filename\n");
- }
-
- $dir = escapeshellarg($dir);
- $finaldir = escapeshellarg($finaldir);
-
- if ($finaldir !== $dir) {
- $cmds[] = "mv $dir $finaldir";
- }
-
- $cmds[] = 'find ' .$finaldir. ' -type f -and -not -regex \
".*\.\([chly]\|cpp\|cc\)" -and -not -name "*.ec" -and -not -name \
"*.lex" -delete';
- $cmds[] = 'while ( find ' .$finaldir. ' -depth -mindepth 1 -type d -and -empty | \
xargs rm -r 2>/dev/null ) ; do true ; done';
- $cmds[] = "mv $finaldir ..";
-
- foreach ($cmds as $cmd) {
- exec($cmd);
- }
-
- chdir('..');
- `rm -fr tmp`;
-
- echo "\033[1;32mdone\033[0m\n";
-}
-
-
-/** fetch a tag sources */
-function checkout_tag($tag)
-{
- // $tag = PHP_x_x_x
- $majorversion = substr($tag, 4, 1);
- $dir = 'php-'.strtr(substr($tag, 4), '_', '.');
- $filename = "$dir.tar.gz";
- $url = "http://museum.php.net/php$majorversion/$filename";
-
- download_sources($url, $dir, $filename, $tag);
-}
-
-
-chdir('sources');
-
-foreach (get_php_release_tags() as $tag) {
- $tag = strtoupper($tag);
- echo "Getting tag: $tag... ";
- checkout_tag($tag);
-}
-
-foreach ($cvs_branches as $tag => $branch) {
- echo "Getting tag: $tag... ";
- $dir = strtolower($tag);
-
- // if the dir already exists, perform an update rather than a checkout
- if (is_dir($dir)) {
- `cd $dir && cvs -q up -dP -r $branch`;
-
- // zend dirs require special handling because cvs is damn stupid..
- if (is_dir("$dir/Zend")) `cd $dir/Zend && cvs -q up -dP -r $branch`;
- if (is_dir("$dir/ZendEngine2")) `cd $dir/ZendEngine2 && cvs -q up -dP -r \
$branch`;
- } else {
- `cvs -q -d :pserver:cvsread@cvs.php.net:/repository co -d $dir -r $branch -P \
php-src`;
- }
-
- echo "done\n";
-}
-
-update_pecl_sources();
-
-chdir('..');
diff --git a/scripts/iniupdate/update_db.php b/scripts/iniupdate/update_db.php
deleted file mode 100755
index ba86c158..00000000
--- a/scripts/iniupdate/update_db.php
+++ /dev/null
@@ -1,64 +0,0 @@
-<?php
-/*
- +----------------------------------------------------------------------+
- | ini doc settings updater |
- +----------------------------------------------------------------------+
- | Copyright (c) 1997-2011 The PHP Group |
- +----------------------------------------------------------------------+
- | This source file is subject to version 3.0 of the PHP license, |
- | that is bundled with this package in the file LICENSE, and is |
- | available through the world-wide-web at the following url: |
- | http://www.php.net/license/3_0.txt. |
- | If you did not receive a copy of the PHP license and are unable to |
- | obtain it through the world-wide-web, please send a note to |
- | license@php.net so we can mail you a copy immediately. |
- +----------------------------------------------------------------------+
- | Authors: Nuno Lopes <nlopess@php.net> |
- +----------------------------------------------------------------------+
-
- $Id$
-*/
-
-require_once './cvs-versions.php';
-
-copy('ini_changelog.sqlite', 'backup.sqlite');
-
-if (!$idx = sqlite_open('ini_changelog.sqlite', 0666, $error)) {
- die("Couldn't open the DB: $error");
-}
-
-$olddata = sqlite_fetch_all(sqlite_query($idx, 'SELECT * FROM changelog'), \
SQLITE_ASSOC);
-$columns = $olddata[0];
-$columns_str = implode(',', array_keys($columns));
-
-sqlite_query($idx, 'DROP TABLE changelog; VACUUM;');
-
-// make a new table. this also fills the $tags array
-include './make_db.php';
-
-$sql = '';
-
-foreach ($olddata as $row) {
- $sql .= "INSERT INTO changelog ($columns_str) VALUES (\"" . implode('", "', \
$row) . '");';
-}
-
-sqlite_query($idx, $sql);
-
-// check which versions need to be updated
-$tmp = $tags;
-$tags = array_keys($cvs_versions); //always update cvs versions
-
-foreach($tmp as $tag) {
- if (!isset($columns[$tag])) {
- $tags[] = $tag;
- }
-}
-
-unset($tmp, $columns, $sql, $olddata);
-
-// finally recurse through the new PHP versions
-include './insert_db.php';
-
-sqlite_close($idx);
-
-?>
--
PHP Documentation Commits Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic