com web/doc: Trim trailing whitespace: cron/cron include/lib_ revcheck.inc.php scripts/gen_doc_activity_email.p hp scripts/gen_picture_info.php
scripts/generation. sh tutorial/structure.md tutorial/translating.md tuto rial/whitespace.md www/index.php www/redirect.php w ww/rest/r/phd/0.4.3.xml
www/rest/r/phd/package. 0.4.3.xml www/rest/r/phd/v2.0.4.3 .xml www/revcheck.php
| From: | Peter Kokot | Date: | Mon, 01 Oct 2018 21:21:45 +0000 |
| Subject: | com web/doc: Trim trailing whitespace: cron/cron include/lib_ revcheck.inc.php scripts/gen_doc_activity_email.p hp scripts/gen_picture_info.php scripts/generation. sh tutorial/structure.md tutorial/translating.md tuto rial/whitespace.md www/index.php www/redirect.php w ww/rest/r/phd/0.4.3.xml www/rest/r/phd/package. 0.4.3.xml www/rest/r/phd/v2.0.4.3 .xml www/revcheck.php |
||
| Groups: | php.doc.web | ||
| Request: | Send a blank email to doc-web+get-2438@lists.php.net to get a copy of this message | ||
Commit: 5d425c443881595096ed76566a859efc2a289319
Author: Peter Kokot <peterkokot@gmail.com> Mon, 1 Oct 2018 23:21:45 +0200
Parents: cb81c040898446c2e71432a3a7098a945d8b2c97
Branches: master
Link: http://git.php.net/?p=web/doc.git;a=commitdiff;h=5d425c443881595096ed76566a859efc2a289319
Log:
Trim trailing whitespace
Changed paths:
M cron/cron
M include/lib_revcheck.inc.php
M scripts/gen_doc_activity_email.php
M scripts/gen_picture_info.php
M scripts/generation.sh
M tutorial/structure.md
M tutorial/translating.md
M tutorial/whitespace.md
M www/index.php
M www/redirect.php
M www/rest/r/phd/0.4.3.xml
M www/rest/r/phd/package.0.4.3.xml
M www/rest/r/phd/v2.0.4.3.xml
M www/revcheck.php
diff --git a/cron/cron b/cron/cron index 5625d27..5db6b03 100755 --- a/cron/cron +++ b/cron/cron @@ -7,7 +7,7 @@ if [ -d $CRONSETPATH ] then pushd . > /dev/null cd $CRONSETPATH - + for job in `ls -1` do if [ -f ./$job ] && [ -x ./$job ] @@ -15,9 +15,9 @@ then ./$job > $OUTPUT fi done - + popd > /dev/null - + else echo "'$1' is not a valid cron set" diff --git a/include/lib_revcheck.inc.php b/include/lib_revcheck.inc.php index 0495ecf..1b31466 100644 --- a/include/lib_revcheck.inc.php +++ b/include/lib_revcheck.inc.php @@ -22,25 +22,25 @@ // Return an array of directory containing outdated files function get_dirs($idx, $lang) { $sql = 'SELECT - DISTINCT b.name AS name, + DISTINCT b.name AS name, a.dir AS dir - FROM - files a, - dirs b + FROM + files a, + dirs b LEFT JOIN - files c + files c ON - c.name = a.name + c.name = a.name AND - c.dir = a.dir - WHERE - b.id = a.dir + c.dir = a.dir + WHERE + b.id = a.dir AND - a.lang="' . $lang . '" + a.lang="' . $lang . '" AND - c.lang="en" + c.lang="en" AND - a.revision != c.revision + a.revision != c.revision AND a.revision != "n/a" ORDER BY @@ -112,22 +112,22 @@ function count_en_files($idx) function get_missfiles($idx, $lang) { $sql = 'SELECT - d.name as dir, - b.size as size, - a.name as file + d.name as dir, + b.size as size, + a.name as file FROM - files a, - dirs d + files a, + dirs d LEFT JOIN - files b - ON - a.dir = b.dir + files b + ON + a.dir = b.dir AND - a.name = b.name - WHERE - a.lang="' . $lang . '" + a.name = b.name + WHERE + a.lang="' . $lang . '" AND - b.lang="en" + b.lang="en" AND a.revision IS NULL AND @@ -172,8 +172,8 @@ function get_misstags($idx, $lang) { $sql = 'SELECT d.name AS dir, b.size AS en_size, a.size AS trans_size, a.name AS name - FROM files a, dirs d - LEFT JOIN files b ON a.dir = b.dir AND a.name = b.name + FROM files a, dirs d + LEFT JOIN files b ON a.dir = b.dir AND a.name = b.name WHERE a.lang="'.$lang.'" AND b.lang="en" AND (a.revision IS NULL OR a.revision = "n/a") AND a.size IS NOT NULL AND a.dir = d.id ORDER BY dir, name'; diff --git a/scripts/gen_doc_activity_email.php b/scripts/gen_doc_activity_email.php index 1e247e7..80f4a38 100644 --- a/scripts/gen_doc_activity_email.php +++ b/scripts/gen_doc_activity_email.php @@ -16,10 +16,10 @@ | Author: Philip Olson <philip@php.net> | +----------------------------------------------------------------------+ -Notes: - - This emails the documentation list each # days (7, via cron) with +Notes: + - This emails the documentation list each # days (7, via cron) with PHP documentation activity information. - - These are only numbers/statistics, so there are no winners or + - These are only numbers/statistics, so there are no winners or losers except for the documentation. Todo: - Add SVN lines changed/added/deleted instead of # commits @@ -47,7 +47,7 @@ if (!function_exists('sqlite_open')) { if (!function_exists('simplexml_load_string')) { echo 'Fail. I require ext/simplexml to work.', PHP_EOL; exit; -} +} $email_text = <<<TEMPLATE @@ -74,7 +74,7 @@ Those who handled user notes: NOTES_HANDLED --- -See also: +See also: - Edit the documentation online: https://edit.php.net/ - Documentation HOWTO: https://doc.php.net/dochowto/ @@ -87,10 +87,10 @@ TEMPLATE; $counts = array(); $text = ''; foreach ($svn_modules as $svn_module) { - + $command = "svn log http://svn.php.net/repository/$svn_module --revision \{$time_past}:\{$time_future} --non-interactive --xml"; $results = shell_exec($command); - + // Elementless XML file has strlen of 35 if (!$results || strlen($results) < 35) { continue; @@ -130,9 +130,9 @@ $rawbuginfo = file_get_contents('http://bugs.php.net/api.php?type=docs&action=cl $text = ''; if (!empty($rawbuginfo)) { - + $buginfo = unserialize($rawbuginfo); - + if (!is_array($buginfo)) { $text = 'Incorrect bugs information gathered.'; } else { @@ -168,9 +168,9 @@ if (is_readable($dbfile) && $db = sqlite_open($dbfile, 0666)) { if ($res) { if (sqlite_num_fields($res) > 0) { - + $rows = sqlite_fetch_all($res, SQLITE_ASSOC); - + foreach ($rows as $row) { $text .= sprintf("%20s %5s\n", $row['who'], $row['count']); } diff --git a/scripts/gen_picture_info.php b/scripts/gen_picture_info.php index 1f4345b..7853917 100644 --- a/scripts/gen_picture_info.php +++ b/scripts/gen_picture_info.php @@ -61,7 +61,7 @@ function generate_image($lang, $idx) { $graph = new PieGraph(530,300); $graph->SetShadow(); - + $graph->title->Set($title); $graph->title->Align('left'); $graph->title->SetFont(FF_FONT1,FS_BOLD); @@ -72,10 +72,10 @@ function generate_image($lang, $idx) { $graph->subtitle->Align('left'); $graph->subtitle->SetColor('darkred'); - $t1 = new Text(date('m/d/Y')); + $t1 = new Text(date('m/d/Y')); $t1->SetPos(522,294); $t1->SetFont(FF_FONT1,FS_NORMAL); - $t1->Align("right", 'bottom'); + $t1->Align("right", 'bottom'); $t1->SetColor("black"); $graph->AddText($t1); diff --git a/scripts/generation.sh b/scripts/generation.sh index 07c6b27..7350a76 100755 --- a/scripts/generation.sh +++ b/scripts/generation.sh @@ -4,7 +4,7 @@ echo "Generating revcheck databases" -# cd back again +# cd back again cd ${SCRIPTSDIR} # PHP diff --git a/tutorial/structure.md b/tutorial/structure.md index a2ffe3b..4c96434 100644 --- a/tutorial/structure.md +++ b/tutorial/structure.md @@ -16,8 +16,8 @@ where you change `{LANG}` to a desired language, such as `en` for only English: svn checkout https://svn.php.net/repository/phpdoc/modules/doc-{LANG} phpdoc-{LANG} ``` -This command creates a directory named `phpdoc-{LANG}` because the source is -the first 'svn checkout' argument, and the second argument defines the directory name +This command creates a directory named `phpdoc-{LANG}` because the source is +the first 'svn checkout' argument, and the second argument defines the directory name that stores the checked out directories and files (this name can be anything you wish). This directory will contain a directory with the sources of your chosen language, named *{LANG}*, and also *doc-base* folder, which is home to some helpful tools. @@ -30,7 +30,7 @@ not a translation, use: svn checkout https://svn.php.net/repository/phpdoc/modules/doc-en phpdoc-en ``` -The "modules" directory used by these examples defines a set of SVN external definitions +The "modules" directory used by these examples defines a set of SVN external definitions that are configured to checkout multiple source directories. For example: - *doc-en*: checks out "en" and "doc-base" @@ -54,7 +54,7 @@ The structure of the manual sources is hopefully rather intuitive. The most complicated part is the documentation for extensions, which is also the biggest part of manual as all functions are grouped into extensions. -The documentation for extensions is located in `/phpdoc/{LANG}/reference/extension_name/`. For example, +The documentation for extensions is located in `/phpdoc/{LANG}/reference/extension_name/`. For example, the calendar extension documentation exists in `/phpdoc/{LANG}/reference/calendar/`. There you'll find several files: - *book.xml* - acts as the container for the extension and contains the preface. Other files (like examples.xml) are included from here. @@ -69,7 +69,7 @@ A procedural extension (like calendar) also has: - *reference.xml* - container for the functions, rarely contains any info - *functions/* - folder with one XML file per function that the extension declares -And OO extensions (such as imagick) contain: +And OO extensions (such as imagick) contain: - *classname.xml* - container for the methods defined by the class, contains also basic info about it - *classname/* - folder with one XML per method that the class declares diff --git a/tutorial/translating.md b/tutorial/translating.md index 898c27f..923e4fc 100644 --- a/tutorial/translating.md +++ b/tutorial/translating.md @@ -3,7 +3,7 @@ **Watch out:** this chapter describes special parts of the whole editing process. You will also have to follow other steps from the [editing manual sources](editing.php) section. -Translating documentation into other languages might look like a complicated +Translating documentation into other languages might look like a complicated process, but in fact, it's rather simple. Every file in SVN has a *revision number*. It is basically the current version of @@ -44,7 +44,7 @@ Otherwise, it needs to be synced. ## Updating translation of existing file Let's assume that you want to update the translation of `password_needs_rehash()`. There are two simple ways to see which files require updating and what has to be -changed to sync with English version: using [Online Editor](https://edit.php.net) +changed to sync with English version: using [Online Editor](https://edit.php.net) or [doc.php.net tools](http://doc.php.net). The second way is described below. Choose your language from the right sidebar and then use the "Outdated files" tool. diff --git a/tutorial/whitespace.md b/tutorial/whitespace.md index 8bf5c36..deef33d 100644 --- a/tutorial/whitespace.md +++ b/tutorial/whitespace.md @@ -7,7 +7,7 @@ have been strict and anal about this topic and here's why: ## Consistent look to the documentation All the documentation ends up looking the same within all editors. The indention here is one -space, no tabs, and only PHP code itself is four spaces as per our [coding standards](http://pear.php.net/manual/en/standards.php). +space, no tabs, and only PHP code itself is four spaces as per our [coding standards](http://pear.php.net/manual/en/standards.php). This is a beautiful and consistent feature of the PHP manual sources. ## Pretty diffs diff --git a/www/index.php b/www/index.php index 73d30ca..0e6f810 100644 --- a/www/index.php +++ b/www/index.php @@ -15,7 +15,7 @@ some improvements from the others on an occasional basis (the PEAR documentation team uses a variant of the revcheck developed for phpdoc for example). This site is aimed at getting documentation efforts closer, and provide more tools and information for manual authors and translators.</p> - + <h2>Join Us!</h2> <p>The developers of PHP extensions all have access to the PHP documentation modules, although the different projects diff --git a/www/redirect.php b/www/redirect.php index 78ff53b..5b3c9ca 100644 --- a/www/redirect.php +++ b/www/redirect.php @@ -43,10 +43,10 @@ function part_get_filename($part) { // remove webroot-escape attempts $filename = str_replace('..', '', $filename); - + // remove obsolete slashes $filename = preg_replace('#/{2,}#', '/', $filename); - + // strip ending slashes $filename = rtrim($filename, '/'); @@ -111,7 +111,7 @@ if (isset($uri)) { // Validate the mime type $mime = false; foreach ($mime_types as $ext => $type) { - + if (substr($uri, -strlen($ext)) == $ext) { $mime = $type; break; @@ -122,7 +122,7 @@ if (isset($uri)) { header("Content-Type: $mime"); readfile($uri); return; - } + } } } // script has not exited yet, an error must have occured, display 404. diff --git a/www/rest/r/phd/0.4.3.xml b/www/rest/r/phd/0.4.3.xml index 531f6ab..0969565 100644 --- a/www/rest/r/phd/0.4.3.xml +++ b/www/rest/r/phd/0.4.3.xml @@ -19,7 +19,7 @@ - Fixed bug#46931 (wrong order of the META tag in the HEAD element). (Chen Gang) - Fixed bug#46924 (parameter elements force incorrect line breaks). (Hannes) - Fixed bug#46726 (Incorrect HTML output). (Hannes) -- Fixed bug#46714 (change deprecated ereg_replace(Since PHP 5.3.0) to preg_replace). (Chen Gang) +- Fixed bug#46714 (change deprecated ereg_replace(Since PHP 5.3.0) to preg_replace). (Chen Gang) - Fixed bug#45570 (PhD doesn't use the colspec "align" attribute in xhtml output). (Hannes) - Fixed bug#45318 (table colspec rendering issues). (Hannes) - Fixed bug#44598 (Much space on 'expected output' section). (Hannes)</n> diff --git a/www/rest/r/phd/package.0.4.3.xml b/www/rest/r/phd/package.0.4.3.xml index 9c41bd2..f30052c 100644 --- a/www/rest/r/phd/package.0.4.3.xml +++ b/www/rest/r/phd/package.0.4.3.xml @@ -49,7 +49,7 @@ - Fixed bug#46931 (wrong order of the META tag in the HEAD element). (Chen Gang) - Fixed bug#46924 (parameter elements force incorrect line breaks). (Hannes) - Fixed bug#46726 (Incorrect HTML output). (Hannes) -- Fixed bug#46714 (change deprecated ereg_replace(Since PHP 5.3.0) to preg_replace). (Chen Gang) +- Fixed bug#46714 (change deprecated ereg_replace(Since PHP 5.3.0) to preg_replace). (Chen Gang) - Fixed bug#45570 (PhD doesn't use the colspec "align" attribute in xhtml output). (Hannes) - Fixed bug#45318 (table colspec rendering issues). (Hannes) - Fixed bug#44598 (Much space on 'expected output' section). (Hannes)</notes> diff --git a/www/rest/r/phd/v2.0.4.3.xml b/www/rest/r/phd/v2.0.4.3.xml index 14e577c..1e13f8a 100644 --- a/www/rest/r/phd/v2.0.4.3.xml +++ b/www/rest/r/phd/v2.0.4.3.xml @@ -21,7 +21,7 @@ - Fixed bug#46931 (wrong order of the META tag in the HEAD element). (Chen Gang) - Fixed bug#46924 (parameter elements force incorrect line breaks). (Hannes) - Fixed bug#46726 (Incorrect HTML output). (Hannes) -- Fixed bug#46714 (change deprecated ereg_replace(Since PHP 5.3.0) to preg_replace). (Chen Gang) +- Fixed bug#46714 (change deprecated ereg_replace(Since PHP 5.3.0) to preg_replace). (Chen Gang) - Fixed bug#45570 (PhD doesn't use the colspec "align" attribute in xhtml output). (Hannes) - Fixed bug#45318 (table colspec rendering issues). (Hannes) - Fixed bug#44598 (Much space on 'expected output' section). (Hannes)</n> diff --git a/www/revcheck.php b/www/revcheck.php index 0341cc3..089092c 100644 --- a/www/revcheck.php +++ b/www/revcheck.php @@ -4,12 +4,12 @@ error_reporting(E_ALL ^ E_NOTICE); include '../include/init.inc.php'; include '../include/lib_revcheck.inc.php'; -if (isset($_GET['lang']) && in_array($_GET['lang'], array_keys($LANGUAGES))) { - $lang = $_GET['lang']; +if (isset($_GET['lang']) && in_array($_GET['lang'], array_keys($LANGUAGES))) { + $lang = $_GET['lang']; } else { $lang = 'en'; -} +} $lang_name = $LANGUAGES[$lang]; @@ -187,7 +187,7 @@ TRANSLATORS_HEAD; array (REV_NOREV, 'Files without revision number'), array (REV_NOTRANS, 'Files available for translation') ); - + $file_summary_array = array( REV_UPTODATE => array(0,0), REV_OUTDATED => array(0,0),
diff --git a/cron/cron b/cron/cron index 5625d27..5db6b03 100755 --- a/cron/cron +++ b/cron/cron @@ -7,7 +7,7 @@ if [ -d $CRONSETPATH ] then pushd . > /dev/null cd $CRONSETPATH - + for job in `ls -1` do if [ -f ./$job ] && [ -x ./$job ] @@ -15,9 +15,9 @@ then ./$job > $OUTPUT fi done - + popd > /dev/null - + else echo "'$1' is not a valid cron set" diff --git a/include/lib_revcheck.inc.php b/include/lib_revcheck.inc.php index 0495ecf..1b31466 100644 --- a/include/lib_revcheck.inc.php +++ b/include/lib_revcheck.inc.php @@ -22,25 +22,25 @@ // Return an array of directory containing outdated files function get_dirs($idx, $lang) { $sql = 'SELECT - DISTINCT b.name AS name, + DISTINCT b.name AS name, a.dir AS dir - FROM - files a, - dirs b + FROM + files a, + dirs b LEFT JOIN - files c + files c ON - c.name = a.name + c.name = a.name AND - c.dir = a.dir - WHERE - b.id = a.dir + c.dir = a.dir + WHERE + b.id = a.dir AND - a.lang="' . $lang . '" + a.lang="' . $lang . '" AND - c.lang="en" + c.lang="en" AND - a.revision != c.revision + a.revision != c.revision AND a.revision != "n/a" ORDER BY @@ -112,22 +112,22 @@ function count_en_files($idx) function get_missfiles($idx, $lang) { $sql = 'SELECT - d.name as dir, - b.size as size, - a.name as file + d.name as dir, + b.size as size, + a.name as file FROM - files a, - dirs d + files a, + dirs d LEFT JOIN - files b - ON - a.dir = b.dir + files b + ON + a.dir = b.dir AND - a.name = b.name - WHERE - a.lang="' . $lang . '" + a.name = b.name + WHERE + a.lang="' . $lang . '" AND - b.lang="en" + b.lang="en" AND a.revision IS NULL AND @@ -172,8 +172,8 @@ function get_misstags($idx, $lang) { $sql = 'SELECT d.name AS dir, b.size AS en_size, a.size AS trans_size, a.name AS name - FROM files a, dirs d - LEFT JOIN files b ON a.dir = b.dir AND a.name = b.name + FROM files a, dirs d + LEFT JOIN files b ON a.dir = b.dir AND a.name = b.name WHERE a.lang="'.$lang.'" AND b.lang="en" AND (a.revision IS NULL OR a.revision = "n/a") AND a.size IS NOT NULL AND a.dir = d.id ORDER BY dir, name'; diff --git a/scripts/gen_doc_activity_email.php b/scripts/gen_doc_activity_email.php index 1e247e7..80f4a38 100644 --- a/scripts/gen_doc_activity_email.php +++ b/scripts/gen_doc_activity_email.php @@ -16,10 +16,10 @@ | Author: Philip Olson <philip@php.net> | +----------------------------------------------------------------------+ -Notes: - - This emails the documentation list each # days (7, via cron) with +Notes: + - This emails the documentation list each # days (7, via cron) with PHP documentation activity information. - - These are only numbers/statistics, so there are no winners or + - These are only numbers/statistics, so there are no winners or losers except for the documentation. Todo: - Add SVN lines changed/added/deleted instead of # commits @@ -47,7 +47,7 @@ if (!function_exists('sqlite_open')) { if (!function_exists('simplexml_load_string')) { echo 'Fail. I require ext/simplexml to work.', PHP_EOL; exit; -} +} $email_text = <<<TEMPLATE @@ -74,7 +74,7 @@ Those who handled user notes: NOTES_HANDLED --- -See also: +See also: - Edit the documentation online: https://edit.php.net/ - Documentation HOWTO: https://doc.php.net/dochowto/ @@ -87,10 +87,10 @@ TEMPLATE; $counts = array(); $text = ''; foreach ($svn_modules as $svn_module) { - + $command = "svn log http://svn.php.net/repository/$svn_module --revision \{$time_past}:\{$time_future} --non-interactive --xml"; $results = shell_exec($command); - + // Elementless XML file has strlen of 35 if (!$results || strlen($results) < 35) { continue; @@ -130,9 +130,9 @@ $rawbuginfo = file_get_contents('http://bugs.php.net/api.php?type=docs&action=cl $text = ''; if (!empty($rawbuginfo)) { - + $buginfo = unserialize($rawbuginfo); - + if (!is_array($buginfo)) { $text = 'Incorrect bugs information gathered.'; } else { @@ -168,9 +168,9 @@ if (is_readable($dbfile) && $db = sqlite_open($dbfile, 0666)) { if ($res) { if (sqlite_num_fields($res) > 0) { - + $rows = sqlite_fetch_all($res, SQLITE_ASSOC); - + foreach ($rows as $row) { $text .= sprintf("%20s %5s\n", $row['who'], $row['count']); } diff --git a/scripts/gen_picture_info.php b/scripts/gen_picture_info.php index 1f4345b..7853917 100644 --- a/scripts/gen_picture_info.php +++ b/scripts/gen_picture_info.php @@ -61,7 +61,7 @@ function generate_image($lang, $idx) { $graph = new PieGraph(530,300); $graph->SetShadow(); - + $graph->title->Set($title); $graph->title->Align('left'); $graph->title->SetFont(FF_FONT1,FS_BOLD); @@ -72,10 +72,10 @@ function generate_image($lang, $idx) { $graph->subtitle->Align('left'); $graph->subtitle->SetColor('darkred'); - $t1 = new Text(date('m/d/Y')); + $t1 = new Text(date('m/d/Y')); $t1->SetPos(522,294); $t1->SetFont(FF_FONT1,FS_NORMAL); - $t1->Align("right", 'bottom'); + $t1->Align("right", 'bottom'); $t1->SetColor("black"); $graph->AddText($t1); diff --git a/scripts/generation.sh b/scripts/generation.sh index 07c6b27..7350a76 100755 --- a/scripts/generation.sh +++ b/scripts/generation.sh @@ -4,7 +4,7 @@ echo "Generating revcheck databases" -# cd back again +# cd back again cd ${SCRIPTSDIR} # PHP diff --git a/tutorial/structure.md b/tutorial/structure.md index a2ffe3b..4c96434 100644 --- a/tutorial/structure.md +++ b/tutorial/structure.md @@ -16,8 +16,8 @@ where you change `{LANG}` to a desired language, such as `en` for only English: svn checkout https://svn.php.net/repository/phpdoc/modules/doc-{LANG} phpdoc-{LANG} ``` -This command creates a directory named `phpdoc-{LANG}` because the source is -the first 'svn checkout' argument, and the second argument defines the directory name +This command creates a directory named `phpdoc-{LANG}` because the source is +the first 'svn checkout' argument, and the second argument defines the directory name that stores the checked out directories and files (this name can be anything you wish). This directory will contain a directory with the sources of your chosen language, named *{LANG}*, and also *doc-base* folder, which is home to some helpful tools. @@ -30,7 +30,7 @@ not a translation, use: svn checkout https://svn.php.net/repository/phpdoc/modules/doc-en phpdoc-en ``` -The "modules" directory used by these examples defines a set of SVN external definitions +The "modules" directory used by these examples defines a set of SVN external definitions that are configured to checkout multiple source directories. For example: - *doc-en*: checks out "en" and "doc-base" @@ -54,7 +54,7 @@ The structure of the manual sources is hopefully rather intuitive. The most complicated part is the documentation for extensions, which is also the biggest part of manual as all functions are grouped into extensions. -The documentation for extensions is located in `/phpdoc/{LANG}/reference/extension_name/`. For example, +The documentation for extensions is located in `/phpdoc/{LANG}/reference/extension_name/`. For example, the calendar extension documentation exists in `/phpdoc/{LANG}/reference/calendar/`. There you'll find several files: - *book.xml* - acts as the container for the extension and contains the preface. Other files (like examples.xml) are included from here. @@ -69,7 +69,7 @@ A procedural extension (like calendar) also has: - *reference.xml* - container for the functions, rarely contains any info - *functions/* - folder with one XML file per function that the extension declares -And OO extensions (such as imagick) contain: +And OO extensions (such as imagick) contain: - *classname.xml* - container for the methods defined by the class, contains also basic info about it - *classname/* - folder with one XML per method that the class declares diff --git a/tutorial/translating.md b/tutorial/translating.md index 898c27f..923e4fc 100644 --- a/tutorial/translating.md +++ b/tutorial/translating.md @@ -3,7 +3,7 @@ **Watch out:** this chapter describes special parts of the whole editing process. You will also have to follow other steps from the [editing manual sources](editing.php) section. -Translating documentation into other languages might look like a complicated +Translating documentation into other languages might look like a complicated process, but in fact, it's rather simple. Every file in SVN has a *revision number*. It is basically the current version of @@ -44,7 +44,7 @@ Otherwise, it needs to be synced. ## Updating translation of existing file Let's assume that you want to update the translation of `password_needs_rehash()`. There are two simple ways to see which files require updating and what has to be -changed to sync with English version: using [Online Editor](https://edit.php.net) +changed to sync with English version: using [Online Editor](https://edit.php.net) or [doc.php.net tools](http://doc.php.net). The second way is described below. Choose your language from the right sidebar and then use the "Outdated files" tool. diff --git a/tutorial/whitespace.md b/tutorial/whitespace.md index 8bf5c36..deef33d 100644 --- a/tutorial/whitespace.md +++ b/tutorial/whitespace.md @@ -7,7 +7,7 @@ have been strict and anal about this topic and here's why: ## Consistent look to the documentation All the documentation ends up looking the same within all editors. The indention here is one -space, no tabs, and only PHP code itself is four spaces as per our [coding standards](http://pear.php.net/manual/en/standards.php). +space, no tabs, and only PHP code itself is four spaces as per our [coding standards](http://pear.php.net/manual/en/standards.php). This is a beautiful and consistent feature of the PHP manual sources. ## Pretty diffs diff --git a/www/index.php b/www/index.php index 73d30ca..0e6f810 100644 --- a/www/index.php +++ b/www/index.php @@ -15,7 +15,7 @@ some improvements from the others on an occasional basis (the PEAR documentation team uses a variant of the revcheck developed for phpdoc for example). This site is aimed at getting documentation efforts closer, and provide more tools and information for manual authors and translators.</p> - + <h2>Join Us!</h2> <p>The developers of PHP extensions all have access to the PHP documentation modules, although the different projects diff --git a/www/redirect.php b/www/redirect.php index 78ff53b..5b3c9ca 100644 --- a/www/redirect.php +++ b/www/redirect.php @@ -43,10 +43,10 @@ function part_get_filename($part) { // remove webroot-escape attempts $filename = str_replace('..', '', $filename); - + // remove obsolete slashes $filename = preg_replace('#/{2,}#', '/', $filename); - + // strip ending slashes $filename = rtrim($filename, '/'); @@ -111,7 +111,7 @@ if (isset($uri)) { // Validate the mime type $mime = false; foreach ($mime_types as $ext => $type) { - + if (substr($uri, -strlen($ext)) == $ext) { $mime = $type; break; @@ -122,7 +122,7 @@ if (isset($uri)) { header("Content-Type: $mime"); readfile($uri); return; - } + } } } // script has not exited yet, an error must have occured, display 404. diff --git a/www/rest/r/phd/0.4.3.xml b/www/rest/r/phd/0.4.3.xml index 531f6ab..0969565 100644 --- a/www/rest/r/phd/0.4.3.xml +++ b/www/rest/r/phd/0.4.3.xml @@ -19,7 +19,7 @@ - Fixed bug#46931 (wrong order of the META tag in the HEAD element). (Chen Gang) - Fixed bug#46924 (parameter elements force incorrect line breaks). (Hannes) - Fixed bug#46726 (Incorrect HTML output). (Hannes) -- Fixed bug#46714 (change deprecated ereg_replace(Since PHP 5.3.0) to preg_replace). (Chen Gang) +- Fixed bug#46714 (change deprecated ereg_replace(Since PHP 5.3.0) to preg_replace). (Chen Gang) - Fixed bug#45570 (PhD doesn't use the colspec "align" attribute in xhtml output). (Hannes) - Fixed bug#45318 (table colspec rendering issues). (Hannes) - Fixed bug#44598 (Much space on 'expected output' section). (Hannes)</n> diff --git a/www/rest/r/phd/package.0.4.3.xml b/www/rest/r/phd/package.0.4.3.xml index 9c41bd2..f30052c 100644 --- a/www/rest/r/phd/package.0.4.3.xml +++ b/www/rest/r/phd/package.0.4.3.xml @@ -49,7 +49,7 @@ - Fixed bug#46931 (wrong order of the META tag in the HEAD element). (Chen Gang) - Fixed bug#46924 (parameter elements force incorrect line breaks). (Hannes) - Fixed bug#46726 (Incorrect HTML output). (Hannes) -- Fixed bug#46714 (change deprecated ereg_replace(Since PHP 5.3.0) to preg_replace). (Chen Gang) +- Fixed bug#46714 (change deprecated ereg_replace(Since PHP 5.3.0) to preg_replace). (Chen Gang) - Fixed bug#45570 (PhD doesn't use the colspec "align" attribute in xhtml output). (Hannes) - Fixed bug#45318 (table colspec rendering issues). (Hannes) - Fixed bug#44598 (Much space on 'expected output' section). (Hannes)</notes> diff --git a/www/rest/r/phd/v2.0.4.3.xml b/www/rest/r/phd/v2.0.4.3.xml index 14e577c..1e13f8a 100644 --- a/www/rest/r/phd/v2.0.4.3.xml +++ b/www/rest/r/phd/v2.0.4.3.xml @@ -21,7 +21,7 @@ - Fixed bug#46931 (wrong order of the META tag in the HEAD element). (Chen Gang) - Fixed bug#46924 (parameter elements force incorrect line breaks). (Hannes) - Fixed bug#46726 (Incorrect HTML output). (Hannes) -- Fixed bug#46714 (change deprecated ereg_replace(Since PHP 5.3.0) to preg_replace). (Chen Gang) +- Fixed bug#46714 (change deprecated ereg_replace(Since PHP 5.3.0) to preg_replace). (Chen Gang) - Fixed bug#45570 (PhD doesn't use the colspec "align" attribute in xhtml output). (Hannes) - Fixed bug#45318 (table colspec rendering issues). (Hannes) - Fixed bug#44598 (Much space on 'expected output' section). (Hannes)</n> diff --git a/www/revcheck.php b/www/revcheck.php index 0341cc3..089092c 100644 --- a/www/revcheck.php +++ b/www/revcheck.php @@ -4,12 +4,12 @@ error_reporting(E_ALL ^ E_NOTICE); include '../include/init.inc.php'; include '../include/lib_revcheck.inc.php'; -if (isset($_GET['lang']) && in_array($_GET['lang'], array_keys($LANGUAGES))) { - $lang = $_GET['lang']; +if (isset($_GET['lang']) && in_array($_GET['lang'], array_keys($LANGUAGES))) { + $lang = $_GET['lang']; } else { $lang = 'en'; -} +} $lang_name = $LANGUAGES[$lang]; @@ -187,7 +187,7 @@ TRANSLATORS_HEAD; array (REV_NOREV, 'Files without revision number'), array (REV_NOTRANS, 'Files available for translation') ); - + $file_summary_array = array( REV_UPTODATE => array(0,0), REV_OUTDATED => array(0,0),