Re: [PHP-DOC] phpdoc-ru write permission

2009-01-16 Thread Hannes Magnusson
On Thu, Jan 15, 2009 at 22:25, Nick Shaforostoff shaforost...@kde.ru wrote:
 Hi. Please give me write access permission to phpdoc-ru.

 As can be seen from http://news.php.net/php.doc.ru
 the last activity ofAntony Dovgal (he may be called phpdoc-ru maintainer, 
 from what I see)
 was Sat Oct 25 17:19:00 2008.

 There is 'Control structures' translation awaiting to be commited.

 I'm long term KDE (www.kde.org) Russian translator/editor
 and would like to do some updating to Russian php doc translation.

 My login is shafff. Right now I get:
 COMMITINFO /repository/phpdoc-ru/language control-structures.xml
  Access denied: insufficient karma (shafff|phpdoc-ru/language)
 Contact phpdoc@lists.php.net for access to phpdoc-ru/language
 cvs commit: Pre-commit check failed
 cvs [commit aborted]: correct above errors first!


There is a typo in your avail entry, Pierre, Andrei.. could either of
you fix it?

avail|freespace,shaff,sveta,wanderer,kozloffsky,santiago|phpdoc-ru

Should be shafff

-Hannes


Re: [PHP-DOC] CVS Account Request: michaelhood

2009-01-16 Thread Hannes Magnusson
On Thu, Jan 15, 2009 at 23:47, Michael Hood michaelh...@gmail.com wrote:
 Maintaining documentation


You should probably start by sending patches to the mailinglist...

-Hannes


[PHP-DOC] cvs: php-src /main main.c win32_internal_function_disabled.h

2009-01-16 Thread Pierre-Alain Joye
pajoye  Fri Jan 16 10:02:50 2009 UTC

  Modified files:  
/php-src/main   win32_internal_function_disabled.h main.c 
  Log:
  MFB: 
   - add EG(windows_version_info), set at init time once per instance
 contains a OSVERSIONINFOEX struct. It lets us determine easily on which 
windows version is used (for example)
   - [DOC] add the ability to disable a function when the windows function does 
not support a feature (for example symlink)
   - [DOC] symlink, hardlink  co support (1/3)
  
http://cvs.php.net/viewvc.cgi/php-src/main/win32_internal_function_disabled.h?r1=1.1r2=1.2diff_format=u
Index: php-src/main/win32_internal_function_disabled.h
diff -u /dev/null php-src/main/win32_internal_function_disabled.h:1.2
--- /dev/null   Fri Jan 16 10:02:50 2009
+++ php-src/main/win32_internal_function_disabled.h Fri Jan 16 10:02:50 2009
@@ -0,0 +1,25 @@
+/*
+   +--+
+   | PHP Version 5|
+   +--+
+   | Copyright (c) 1997-2009 The PHP Group|
+   +--+
+   | This source file is subject to version 3.01 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_01.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  |
+   | lice...@php.net so we can mail you a copy immediately.   |
+   +--+
+   | Author: Pierre A. Joye pie...@php.net  |
+   +--+
+ */
+
+/* $Id: win32_internal_function_disabled.h,v 1.2 2009/01/16 10:02:50 pajoye 
Exp $ */
+
+/* 5 means the min version is 5 (XP/2000), 6 (2k8/vista), etc. */
+static const char *function_name_5[] = {link, NULL};
+const int function_name_cnt_5 = 1;
+static const char *function_name_6[] = {readlink, symlink, NULL};
+const int function_name_cnt_6 = 2;
http://cvs.php.net/viewvc.cgi/php-src/main/main.c?r1=1.788r2=1.789diff_format=u
Index: php-src/main/main.c
diff -u php-src/main/main.c:1.788 php-src/main/main.c:1.789
--- php-src/main/main.c:1.788   Fri Jan  9 15:00:36 2009
+++ php-src/main/main.c Fri Jan 16 10:02:50 2009
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: main.c,v 1.788 2009/01/09 15:00:36 iliaa Exp $ */
+/* $Id: main.c,v 1.789 2009/01/16 10:02:50 pajoye Exp $ */
 
 /* {{{ includes
  */
@@ -99,6 +99,33 @@
 PHPAPI int core_globals_id;
 #endif
 
+#ifdef PHP_WIN32
+#include win32_internal_function_disabled.h
+
+static php_win32_disable_functions() {
+   int i;
+   TSRMLS_FETCH();
+
+   if (EG(windows_version_info).dwMajorVersion  5) {
+   for (i = 0; i  function_name_cnt_5; i++) {
+   if (zend_hash_del(CG(function_table), 
function_name_5[i], strlen(function_name_5[i]) + 1)==FAILURE) {
+   php_printf(Unable to disable function '%s'\n, 
function_name_5[i]);
+   return FAILURE;
+   }
+   }
+   }
+
+   if (EG(windows_version_info).dwMajorVersion  6) {
+   for (i = 0; i  function_name_cnt_6; i++) {
+   if (zend_hash_del(CG(function_table), 
function_name_6[i], strlen(function_name_6[i]) + 1)==FAILURE) {
+   php_printf(Unable to disable function '%s'\n, 
function_name_6[i]);
+   return FAILURE;
+   }
+   }
+   }
+}
+#endif
+
 #define SAFE_FILENAME(f) ((f)?(f):-)
 
 /* {{{ PHP_INI_MH
@@ -1788,6 +1815,9 @@
 #ifdef ZTS
zend_executor_globals *executor_globals;
void ***tsrm_ls;
+#ifdef PHP_WIN32
+   DWORD dwVersion = GetVersion();
+#endif
 
php_core_globals *core_globals;
 #endif
@@ -1796,16 +1826,12 @@
WSADATA wsaData;
 #endif
 #ifdef PHP_WIN32
-   {
-   DWORD dwVersion = GetVersion();
-
/* Get build numbers for Windows NT or Win95 */
if (dwVersion  0x8000){
php_os=WINNT;
} else {
php_os=WIN32;
}
-   }
 #if defined(_MSC_VER)  (_MSC_VER = 1400)
old_invalid_parameter_handler =
_set_invalid_parameter_handler(dummy_invalid_parameter_handler);
@@ -1862,6 +1888,18 @@
 #endif
gc_globals_ctor(TSRMLS_C);
 
+#ifdef PHP_WIN32
+   {
+   OSVERSIONINFOEX *osvi = 

Re: [PHP-DOC] phpdoc-ru write permission

2009-01-16 Thread Hannes Magnusson
On Fri, Jan 16, 2009 at 09:22, Hannes Magnusson
hannes.magnus...@gmail.com wrote:
 On Thu, Jan 15, 2009 at 22:25, Nick Shaforostoff shaforost...@kde.ru wrote:
 Hi. Please give me write access permission to phpdoc-ru.

 As can be seen from http://news.php.net/php.doc.ru
 the last activity ofAntony Dovgal (he may be called phpdoc-ru 
 maintainer, from what I see)
 was Sat Oct 25 17:19:00 2008.

 There is 'Control structures' translation awaiting to be commited.

 I'm long term KDE (www.kde.org) Russian translator/editor
 and would like to do some updating to Russian php doc translation.

 My login is shafff. Right now I get:
 COMMITINFO /repository/phpdoc-ru/language control-structures.xml
  Access denied: insufficient karma (shafff|phpdoc-ru/language)
 Contact phpdoc@lists.php.net for access to phpdoc-ru/language
 cvs commit: Pre-commit check failed
 cvs [commit aborted]: correct above errors first!


 There is a typo in your avail entry, Pierre, Andrei.. could either of
 you fix it?

You should have karma now Nick.

-Hannes


[PHP-DOC] Re: [PHP-CVS] cvs: php-src /main main.c win32_internal_function_disabled.h

2009-01-16 Thread Hannes Magnusson
On Fri, Jan 16, 2009 at 11:02, Pierre-Alain Joye paj...@php.net wrote:
 pajoye  Fri Jan 16 10:02:50 2009 UTC

  Modified files:
/php-src/main   win32_internal_function_disabled.h main.c
  Log:
  MFB:
   - add EG(windows_version_info), set at init time once per instance
 contains a OSVERSIONINFOEX struct. It lets us determine easily on which 
 windows version is used (for example)
   - [DOC] add the ability to disable a function when the windows function 
 does not support a feature (for example symlink)

I don't understand how this is useful.
Is the user now responsible to disable_function=symlink?
That doesn't quite make sense to me. Could you please provide make
more info so this can be documented?

-Hannes


[PHP-DOC] Re: [PHP-CVS] cvs: php-src /main main.c win32_internal_function_disabled.h

2009-01-16 Thread Hannes Magnusson
On Fri, Jan 16, 2009 at 11:45, Hannes Magnusson
hannes.magnus...@gmail.com wrote:
 On Fri, Jan 16, 2009 at 11:02, Pierre-Alain Joye paj...@php.net wrote:
 pajoye  Fri Jan 16 10:02:50 2009 UTC

  Modified files:
/php-src/main   win32_internal_function_disabled.h main.c
  Log:
  MFB:
   - add EG(windows_version_info), set at init time once per instance
 contains a OSVERSIONINFOEX struct. It lets us determine easily on which 
 windows version is used (for example)
   - [DOC] add the ability to disable a function when the windows function 
 does not support a feature (for example symlink)

 I don't understand how this is useful.
 Is the user now responsible to disable_function=symlink?
 That doesn't quite make sense to me. Could you please provide make
 more info so this can be documented?


Talked to Pierre on IRC. Apparently I read this wrong :)
This has nothing to do with disable_functions INI entry.

If PHP is build on Windows version that has symlink support then the
binary contains symlink support.
If you however run the binary on WindowsXP the actual function entry
is removed at runtime.

All this means is: As of PHP5.3 symlink() and readlink() are
supported on Windows2003 and above
And As of PHP5.3 link() is supported on Windows2000 and above

-Hannes


[PHP-DOC] Re: [DOC-CVS] cvs: phpdoc /en/reference/strings/functions number-format.xml

2009-01-16 Thread Richard Quadling
2009/1/16 Jakub Vrana vr...@php.net:
 vrana   Fri Jan 16 16:12:42 2009 UTC

  Modified files:
/phpdoc/en/reference/strings/functions  number-format.xml
  Log:
  Join two syntaxes

 http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/strings/functions/number-format.xml?r1=1.13r2=1.14diff_format=u
 Index: phpdoc/en/reference/strings/functions/number-format.xml
 diff -u phpdoc/en/reference/strings/functions/number-format.xml:1.13 
 phpdoc/en/reference/strings/functions/number-format.xml:1.14
 --- phpdoc/en/reference/strings/functions/number-format.xml:1.13Wed 
 May 21 21:13:53 2008
 +++ phpdoc/en/reference/strings/functions/number-format.xml Fri Jan 16 
 16:12:42 2009
 @@ -1,5 +1,5 @@
  ?xml version=1.0 encoding=utf-8?
 -!-- $Revision: 1.13 $ --
 +!-- $Revision: 1.14 $ --
  refentry xmlns=http://docbook.org/ns/docbook; 
 xml:id=function.number-format xmlns:xlink=http://www.w3.org/1999/xlink;
  refnamediv
   refnamenumber_format/refname
 @@ -12,12 +12,7 @@
typestring/typemethodnamenumber_format/methodname
methodparamtypefloat/typeparameternumber/parameter/methodparam
methodparam 
 choice=opttypeint/typeparameterdecimals/parameter/methodparam
 -  /methodsynopsis
 -  methodsynopsis
 -   typestring/typemethodnamenumber_format/methodname
 -   methodparamtypefloat/typeparameternumber/parameter/methodparam
 -   methodparamtypeint/typeparameterdecimals/parameter/methodparam
 -   
 methodparamtypestring/typeparameterdec_point/parameter/methodparam
 +   methodparam 
 choice=opttypestring/typeparameterdec_point/parameter/methodparam

 methodparamtypestring/typeparameterthousands_sep/parameter/methodparam
   /methodsynopsis
   para

Jakub,

The choice=opt attribute only applies to a single parameter. phd
incorrectly renders this as ...

string number_format ( float $number [, int $decimals [, string
$dec_point ]], string $thousands_sep )

Rather than ...

string number_format ( float $number [, int $decimals [, string
$dec_point, string $thousands_sep]] )


I put a proposal through to DocBook (and it was accepted and is to be
part of DocBook 5.1) to introduce a methodparamgroup tag.

This tag would allow for grouping of optional params.


The correct methodsynopsis would be (when phd supports DocBook 5.1)

 methodsynopsis
  typestring/typemethodnamenumber_format/methodname
  methodparamtypefloat/typeparameternumber/parameter/methodparam
  methodparamgroup choice=opt
methodparamtypeint/typeparameterdecimals/parameter/methodparam
methodparamgroup choice=opt
  
methodparamtypestring/typeparameterdec_point/parameter/methodparam
  
methodparamtypestring/typeparameterthousands_sep/parameter/methodparam
/methodparamgroup
  /methodparamgroup
 /methodsynopsis

See : [docbook] RFE #1998852: Provide a mechanism to group parameters

http://www.nabble.com/Grouping-methodparams-td18971164.html


I know Hannes is aware of this, but I've not got the expertise to
integrate it into phd.

In the meantime, I think this change should be reverted to maintain an
accurate rendering

Regards,

Richard.
-- 
-
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498r=213474731
Standing on the shoulders of some very clever giants!


Re: [PHP-DOC] Re: [DOC-CVS] cvs: phpdoc /en/reference/strings/functions number-format.xml

2009-01-16 Thread Hannes Magnusson
On Fri, Jan 16, 2009 at 20:58, Richard Quadling
rquadl...@googlemail.com wrote:
 The correct methodsynopsis would be (when phd supports DocBook 5.1)

  methodsynopsis
  typestring/typemethodnamenumber_format/methodname
  methodparamtypefloat/typeparameternumber/parameter/methodparam
  methodparamgroup choice=opt
methodparamtypeint/typeparameterdecimals/parameter/methodparam
methodparamgroup choice=opt
  
 methodparamtypestring/typeparameterdec_point/parameter/methodparam
  
 methodparamtypestring/typeparameterthousands_sep/parameter/methodparam
/methodparamgroup
  /methodparamgroup
  /methodsynopsis

 See : [docbook] RFE #1998852: Provide a mechanism to group parameters

I keep forgetting about it. Could you file a bug report for it?
We also have to update our DTD to support it.

-Hannes


Re: [PHP-DOC] Re: [DOC-CVS] cvs: phpdoc /en/reference/strings/functions number-format.xml

2009-01-16 Thread Richard Quadling
2009/1/16 Hannes Magnusson hannes.magnus...@gmail.com:
 On Fri, Jan 16, 2009 at 20:58, Richard Quadling
 rquadl...@googlemail.com wrote:
 The correct methodsynopsis would be (when phd supports DocBook 5.1)

  methodsynopsis
  typestring/typemethodnamenumber_format/methodname
  methodparamtypefloat/typeparameternumber/parameter/methodparam
  methodparamgroup choice=opt
methodparamtypeint/typeparameterdecimals/parameter/methodparam
methodparamgroup choice=opt
  
 methodparamtypestring/typeparameterdec_point/parameter/methodparam
  
 methodparamtypestring/typeparameterthousands_sep/parameter/methodparam
/methodparamgroup
  /methodparamgroup
  /methodsynopsis

 See : [docbook] RFE #1998852: Provide a mechanism to group parameters

 I keep forgetting about it. Could you file a bug report for it?
 We also have to update our DTD to support it.

 -Hannes


http://bugs.php.net/bug.php?id=44885

and

http://bugs.php.net/bug.php?id=47132

-- 
-
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498r=213474731
Standing on the shoulders of some very clever giants!