[PHP-DOC] cvs: livedocs / livedoc_funcs.php

2005-09-14 Thread Ilia Alshanetsky
iliaa   Wed Sep 14 18:02:39 2005 EDT

  Modified files:  
/livedocs   livedoc_funcs.php 
  Log:
  Place extension's function list at the top of the nav bar.
  
  # Credit and Thanks goes out to Sean
  
  
http://cvs.php.net/diff.php/livedocs/livedoc_funcs.php?r1=1.30&r2=1.31&ty=u
Index: livedocs/livedoc_funcs.php
diff -u livedocs/livedoc_funcs.php:1.30 livedocs/livedoc_funcs.php:1.31
--- livedocs/livedoc_funcs.php:1.30 Thu Jul 14 15:05:38 2005
+++ livedocs/livedoc_funcs.php  Wed Sep 14 18:02:38 2005
@@ -24,9 +24,6 @@
 if (!defined('NAV_END')) {
define('NAV_END', "\n");
 }
-if (!defined('NAV_CHILDREN_EMBEDED')) {
-   define('NAV_CHILDREN_EMBEDED', false);
-}
 if (!function_exists('nav_item')) {
function nav_item($data, $class ) {
return "$data\n";
@@ -39,7 +36,8 @@
 function do_nav($idx, $fb_idx, $lang, $current_page, &$nav, &$children) 
 {
$children = array();
-   $nav = NAV_START;
+   $nav_start = NAV_START;
+   $nav = '';
 
/* Get the fileinfo for the reference */
$current_page = sqlite_escape_string($current_page);
@@ -61,36 +59,29 @@
if (($r = sqlite_single_query($idx, "SELECT path FROM toc WHERE 
docbook_id = '$current_page' LIMIT 1"))) {
$path = explode(",", $r);
foreach ($path as $item) {
-   $nav .= do_nav_line($item, $head_class, $current_page, 
$lang, $dummy);
+   $nav_start .= do_nav_line($item, $head_class, 
$current_page, $lang, $dummy);
$last_item = $item;
$head_class = 'header up';
}
} else {
-   $nav .= do_nav_line(ROOT_NODE, 'up', $current_page, $lang, 
$dummy);
+   $nav_start .= do_nav_line(ROOT_NODE, 'up', $current_page, 
$lang, $dummy);
}
 
$after_child_class = '';
/* With $last_item we're going to show all brothers */
$r = (array) sqlite_single_query($idx, "SELECT docbook_id FROM toc 
WHERE parent_docbook_id = '$last_item' ORDER BY id");
foreach ($r as $val) {
-   $nav .= do_nav_line($val, 'down'.$after_child_class, 
$current_page, $lang, $dummy);
-   $after_child_class = '';
-
/* Include the children here */ 
-   if (NAV_CHILDREN_EMBEDED && $current_page == $val) {
-   do_nav_children($idx, $val, $lang, $current_page, $nav, 
$children);
+   if ($current_page == $val) {
+   $nav_start .= do_nav_line($current_page, 'down active', 
$current_page, $lang, $dummy);
+   do_nav_children($idx, $val, $lang, $current_page, 
$nav_start, $children);
}
-
-   }
-
-   /* And finally all children, but only if $current_page != $last_item
-* because showing the same thing twice makes no sense */
-   if ( !NAV_CHILDREN_EMBEDED && $current_page != $last_item) {
-   do_nav_children($idx, $val, $lang, $current_page, $nav, 
$children);
+   $nav .= do_nav_line($val, 'down'.$after_child_class, 
$current_page, $lang, $dummy);
+   $after_child_class = '';
+   
}
 
-
-   $nav .= NAV_END;
+   $nav = $nav_start . $nav . NAV_END;
return $tr[0];
 
 }


[PHP-DOC] cvs: livedocs /themes/default html_format.php

2005-09-14 Thread Ilia Alshanetsky
iliaa   Wed Sep 14 18:00:07 2005 EDT

  Modified files:  
/livedocs/themes/defaulthtml_format.php 
  Log:
  Added a search element at the top of pages in default templates.
  
  # Thanks to Sean Coates for the patch
  
  
http://cvs.php.net/diff.php/livedocs/themes/default/html_format.php?r1=1.15&r2=1.16&ty=u
Index: livedocs/themes/default/html_format.php
diff -u livedocs/themes/default/html_format.php:1.15 
livedocs/themes/default/html_format.php:1.16
--- livedocs/themes/default/html_format.php:1.15Wed Sep 14 11:08:48 2005
+++ livedocs/themes/default/html_format.php Wed Sep 14 18:00:06 2005
@@ -18,7 +18,7 @@
 // | headers and footers for the HTML rendering   |
 // +--+
 //  
-// $Id: html_format.php,v 1.15 2005/09/14 15:08:48 iliaa Exp $
+// $Id: html_format.php,v 1.16 2005/09/14 22:00:06 iliaa Exp $
 
 // in livedoc.php
 
@@ -26,6 +26,7 @@
 {
global $lang, $title, $css_url;
$dir = RTL;
+   $base = WEBBASE;
$head =<<
 http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
@@ -36,6 +37,13 @@
 
 
 
+
+ 
+  
+  Strict: 
+  
+ 
+
 
 
 HEAD;


Re: [PHP-DOC] build failure [de]

2005-09-14 Thread Gabor Hojtsy
OK, why display the  extra, while you only need to see the missing
IDs themselfs? Otherwise if this works fine, I am all for having it
comitted.

Goba

> Sorry for the late response.
> Entities in attribut values are not allowed.
> See the attached patch against missing-entities.php.in for
> xreflabel-support.
> 
> Friedhelm
> 
> 
> 
> Index: missing-entities.php.in
> ===
> RCS file: /repository/phpdoc/scripts/missing-entities.php.in,v
> retrieving revision 1.19
> diff -u -r1.19 missing-entities.php.in
> --- missing-entities.php.in   21 Aug 2005 16:27:08 -  1.19
> +++ missing-entities.php.in   14 Sep 2005 18:44:45 -
> @@ -93,7 +93,9 @@
>  
>  // missing ID found
>  else if (strpos($line, "non-existent") !== FALSE) {
> -$missing_ids[] = preg_replace("!^.* ID !", " \n";
> + preg_match('!(?<=ID.)".+"!', $line, $id);
> +$missing_ids[] = "\n";
> +$missing_ids_display[]="\n";
>  }
>  }
>  
> @@ -105,6 +107,10 @@
>  sort($missing_ids);
>  sort($missing_entities);
>  
> +// missing ids for display
> +$missing_ids_display=array_unique($missing_ids_display);
> +sort($missing_ids_display);
> +
>  // Write out missing entities to file
>  foreach ($missing_entities as $ent) {
>  fwrite($ment, $ent);
> @@ -137,8 +143,8 @@
>  }
>  
>  echo "\nCreated file: @LANGDIR@/missing-ids.xml\n";
> -if (!empty($missing_ids)) {
> -foreach ($missing_ids as $k => $v) {
> +if (!empty($missing_ids_display)) {
> +foreach ($missing_ids_display as $k => $v) {
>  echo "* " . preg_replace('@[\s]+@', ' ', $v) . "\n";
>  }
>  } else {


Re: [PHP-DOC] build failure [de]

2005-09-14 Thread Friedhelm Betz

Gabor Hojtsy wrote:

Fine with me, but we should place &missing; at top of missing-ids.xml
So the following should be the solution for this "problem":
missing-ids.xml:

&missing;



and put &missing; in language-snippets.ent.

Benefit: linking to appendix missing-stuff with a short explanation is
working again ;-)



I actually meant that every xreflabel (so every link generated for
missing content) would include the translated version of the word
"missing", so that even before clicked a user (an experienced user at
least) would know that it is not really benefical to click that link.


Sorry for the late response.
Entities in attribut values are not allowed.
See the attached patch against missing-entities.php.in for 
xreflabel-support.


Friedhelm


Index: missing-entities.php.in
===
RCS file: /repository/phpdoc/scripts/missing-entities.php.in,v
retrieving revision 1.19
diff -u -r1.19 missing-entities.php.in
--- missing-entities.php.in 21 Aug 2005 16:27:08 -  1.19
+++ missing-entities.php.in 14 Sep 2005 18:44:45 -
@@ -93,7 +93,9 @@
 
 // missing ID found
 else if (strpos($line, "non-existent") !== FALSE) {
-$missing_ids[] = preg_replace("!^.* ID !", " \n";
+ preg_match('!(?<=ID.)".+"!', $line, $id);
+$missing_ids[] = "\n";
+$missing_ids_display[]="\n";
 }
 }
 
@@ -105,6 +107,10 @@
 sort($missing_ids);
 sort($missing_entities);
 
+// missing ids for display
+$missing_ids_display=array_unique($missing_ids_display);
+sort($missing_ids_display);
+
 // Write out missing entities to file
 foreach ($missing_entities as $ent) {
 fwrite($ment, $ent);
@@ -137,8 +143,8 @@
 }
 
 echo "\nCreated file: @LANGDIR@/missing-ids.xml\n";
-if (!empty($missing_ids)) {
-foreach ($missing_ids as $k => $v) {
+if (!empty($missing_ids_display)) {
+foreach ($missing_ids_display as $k => $v) {
 echo "* " . preg_replace('@[\s]+@', ' ', $v) . "\n";
 }
 } else {


[PHP-DOC] cvs: phpdoc /scripts xml_proto.php

2005-09-14 Thread Sean Coates
seanWed Sep 14 14:42:17 2005 EDT

  Modified files:  
/phpdoc/scripts xml_proto.php 
  Log:
  no.resource, not no.resources
  
http://cvs.php.net/diff.php/phpdoc/scripts/xml_proto.php?r1=1.38&r2=1.39&ty=u
Index: phpdoc/scripts/xml_proto.php
diff -u phpdoc/scripts/xml_proto.php:1.38 phpdoc/scripts/xml_proto.php:1.39
--- phpdoc/scripts/xml_proto.php:1.38   Thu Sep  8 15:53:16 2005
+++ phpdoc/scripts/xml_proto.phpWed Sep 14 14:42:17 2005
@@ -16,7 +16,7 @@
   | Authors:   Brad House <[EMAIL PROTECTED]> |
   +--+
  
-  $Id: xml_proto.php,v 1.38 2005/09/08 19:53:16 betz Exp $
+  $Id: xml_proto.php,v 1.39 2005/09/14 18:42:17 sean Exp $
 */
 
 /*
@@ -189,7 +189,7 @@
"   &reftitle.resources;\n" .
"   \n" .
"Type of resource types (link id, etc.) this extension returns.\n" .
-   "&no.resources;\n" .
+   "&no.resource;\n" .
"   \n" .
"  \n");
if ($num_const > 0) {


[PHP-DOC] cvs: livedocs / livedoc.php

2005-09-14 Thread Ilia Alshanetsky
iliaa   Wed Sep 14 12:36:22 2005 EDT

  Modified files:  
/livedocs   livedoc.php 
  Log:
  Enforce case-insensetivity to prevent broken links
  
  
http://cvs.php.net/diff.php/livedocs/livedoc.php?r1=1.113&r2=1.114&ty=u
Index: livedocs/livedoc.php
diff -u livedocs/livedoc.php:1.113 livedocs/livedoc.php:1.114
--- livedocs/livedoc.php:1.113  Thu Jul 14 15:05:38 2005
+++ livedocs/livedoc.phpWed Sep 14 12:36:22 2005
@@ -18,7 +18,7 @@
 // | Generate an HTML version of a phpdoc/docbook page on the fly |
 // +--+
 //
-// $Id: livedoc.php,v 1.113 2005/07/14 19:05:38 iliaa Exp $
+// $Id: livedoc.php,v 1.114 2005/09/14 16:36:22 iliaa Exp $
 
 define('LIVEDOC_SOURCE', dirname(__FILE__));
 include LIVEDOC_SOURCE . '/livedoc_funcs.php';
@@ -46,6 +46,7 @@
 } else {
$current_page = preg_replace(IDREG, '', (string)$_GET['q']);
 }
+$current_page = strtolower($current_page);
 
 /*
  * Aliases and XML -> style mapping


[PHP-DOC] #34500 [Bgs->Opn]: change stdClass constructor prototype

2005-09-14 Thread stochnagara at hotmail dot com
 ID:  34500
 User updated by: stochnagara at hotmail dot com
 Reported By: stochnagara at hotmail dot com
-Status:  Bogus
+Status:  Open
-Bug Type:Feature/Change Request
+Bug Type:Documentation problem
 PHP Version: 5CVS-2005-09-14 (snap)
 New Comment:

So I reopen the bug and change the category to Documentation problem.
There is no place in the documentation where this functionality
(casting array to object) is described.
Even http://www.php.net/manual/en/language.types.object.php misleads
readers. The description says that everything except null is converted
to stdClass object with a member named scalar which contains the value
of the converted variable.
This is the apropriate place to mention what happens when an array is
converted into object.


Previous Comments:


[2005-09-14 15:07:05] [EMAIL PROTECTED]

Then convert array to object this way:
'b', 'foo'=> 'bar'); 
var_dump((object)$a);
?>




[2005-09-14 14:57:52] stochnagara at hotmail dot com

I forgot to reopen the bug.



[2005-09-14 14:57:28] stochnagara at hotmail dot com

Ok, then I will reformulate my feature request : Function
get_object_vars applied to stdClass returns array containing all object
properties and their values. 

I'd like to see a function which is the opposite of get_object_vars,
e.g. array_to_object ($array) which converts an array to a stdClass
object with array keys as properties and array values as proerties
values.

Many users will appreciate it. See Drupal too:)



[2005-09-14 13:09:47] [EMAIL PROTECTED]

stdClass is a dummy class that doesn't have any methods, including
constructor, so there is nothing to change.
Declare and use your class.



[2005-09-14 13:06:10] stochnagara at hotmail dot com

I forgot: 'a' and 'b' become class members so

echo $obj->a prints 2 and echo $obj->b prints 3.



The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/34500

-- 
Edit this bug report at http://bugs.php.net/?id=34500&edit=1


[PHP-DOC] cvs: livedocs /themes/default html_format.php /themes/php.net html_format.php /themes/smarty html_format.php

2005-09-14 Thread Ilia Alshanetsky
iliaa   Wed Sep 14 11:08:51 2005 EDT

  Modified files:  
/livedocs/themes/defaulthtml_format.php 
/livedocs/themes/php.nethtml_format.php 
/livedocs/themes/smarty html_format.php 
  Log:
  Fixed $strict flag output
  
  
http://cvs.php.net/diff.php/livedocs/themes/default/html_format.php?r1=1.14&r2=1.15&ty=u
Index: livedocs/themes/default/html_format.php
diff -u livedocs/themes/default/html_format.php:1.14 
livedocs/themes/default/html_format.php:1.15
--- livedocs/themes/default/html_format.php:1.14Fri Sep  3 02:48:44 2004
+++ livedocs/themes/default/html_format.php Wed Sep 14 11:08:48 2005
@@ -18,7 +18,7 @@
 // | headers and footers for the HTML rendering   |
 // +--+
 //  
-// $Id: html_format.php,v 1.14 2004/09/03 06:48:44 derick Exp $
+// $Id: html_format.php,v 1.15 2005/09/14 15:08:48 iliaa Exp $
 
 // in livedoc.php
 
@@ -75,7 +75,7 @@
 
   

-   Strict: 
+   Strict: 

   
 
http://cvs.php.net/diff.php/livedocs/themes/php.net/html_format.php?r1=1.15&r2=1.16&ty=u
Index: livedocs/themes/php.net/html_format.php
diff -u livedocs/themes/php.net/html_format.php:1.15 
livedocs/themes/php.net/html_format.php:1.16
--- livedocs/themes/php.net/html_format.php:1.15Sat Sep 11 11:34:48 2004
+++ livedocs/themes/php.net/html_format.php Wed Sep 14 11:08:50 2005
@@ -18,7 +18,7 @@
 // | headers and footers for the HTML rendering   |
 // +--+
 //  
-// $Id: html_format.php,v 1.15 2004/09/11 15:34:48 goba Exp $
+// $Id: html_format.php,v 1.16 2005/09/14 15:08:50 iliaa Exp $
 
 // in livedoc.php
 define(
@@ -123,7 +123,7 @@
 
   

-   Strict: 
+   Strict: 

   
 
http://cvs.php.net/diff.php/livedocs/themes/smarty/html_format.php?r1=1.4&r2=1.5&ty=u
Index: livedocs/themes/smarty/html_format.php
diff -u livedocs/themes/smarty/html_format.php:1.4 
livedocs/themes/smarty/html_format.php:1.5
--- livedocs/themes/smarty/html_format.php:1.4  Fri Sep  3 02:48:44 2004
+++ livedocs/themes/smarty/html_format.php  Wed Sep 14 11:08:50 2005
@@ -18,7 +18,7 @@
 // | headers and footers for the HTML rendering   |
 // +--+
 //  
-// $Id: html_format.php,v 1.4 2004/09/03 06:48:44 derick Exp $
+// $Id: html_format.php,v 1.5 2005/09/14 15:08:50 iliaa Exp $
 
 // in livedoc.php
 $WEBSITE = 'http://smarty.php.net';
@@ -237,7 +237,7 @@
 
   

-   Strict: 
+   Strict: 

   
 


[PHP-DOC] cvs: phpdoc /en/reference/imap/functions imap-mime-header-decode.xml

2005-09-14 Thread Jakub Vrana
vrana   Wed Sep 14 10:14:38 2005 EDT

  Modified files:  
/phpdoc/en/reference/imap/functions imap-mime-header-decode.xml 
  Log:
  Missing fullstop
  
http://cvs.php.net/diff.php/phpdoc/en/reference/imap/functions/imap-mime-header-decode.xml?r1=1.7&r2=1.8&ty=u
Index: phpdoc/en/reference/imap/functions/imap-mime-header-decode.xml
diff -u phpdoc/en/reference/imap/functions/imap-mime-header-decode.xml:1.7 
phpdoc/en/reference/imap/functions/imap-mime-header-decode.xml:1.8
--- phpdoc/en/reference/imap/functions/imap-mime-header-decode.xml:1.7  Mon Mar 
 8 04:18:42 2004
+++ phpdoc/en/reference/imap/functions/imap-mime-header-decode.xml  Wed Sep 
14 10:14:36 2005
@@ -1,5 +1,5 @@
 
-
+
 
   

@@ -15,7 +15,7 @@
 
  imap_mime_header_decode function decodes 
  MIME message header extensions that are non ASCII text 
- (see RFC2047) 
+ (see RFC2047).
  The decoded elements are returned in an array of objects, 
  where each object has two properties, "charset" and "text".
  If the element hasn't been encoded, and in other words is in