anewt-developers team mailing list archive
-
anewt-developers team
-
Mailing list archive
-
Message #00194
[Branch ~uws/anewt/anewt.uws] Rev 1745: [scripts/textilize] Fix syntax error and tidy up a bit
------------------------------------------------------------
revno: 1745
committer: Wouter Bolsterlee <uws@xxxxxxxxx>
branch nick: anewt.uws
timestamp: Fri 2010-01-08 23:30:46 +0100
message:
[scripts/textilize] Fix syntax error and tidy up a bit
This script is not extremely useful, but at least it works
again. ;)
modified:
scripts/textilize.php
--
lp:anewt
https://code.launchpad.net/~uws/anewt/anewt.uws
Your team Anewt developers is subscribed to branch lp:anewt.
To unsubscribe from this branch go to https://code.launchpad.net/~uws/anewt/anewt.uws/+edit-subscription.
=== modified file 'scripts/textilize.php'
--- scripts/textilize.php 2009-04-12 23:15:50 +0000
+++ scripts/textilize.php 2010-01-08 22:30:46 +0000
@@ -33,9 +33,12 @@
/* Input */
-$input = '';
+$input_chunks = array();
while (!feof($fd))
- $input .= fread($fd, 16384);
+{
+ $input_chunks[] = fread($fd, 16384);
+}
+$input = join('', $input_chunks);
fclose($fd);
@@ -47,13 +50,13 @@
if ($use_page)
{
anewt_include('page');
- $page = new Page();
- $page->set('enable_dublin_core', false);
- $page->set('content_type', 'application/xhtml+xml');
- $page->set('charset', 'UTF-8');
- $page->set('title', $title);
- $page->add_stylesheet_href_media('style.css', 'screen'));
- $page->append($output);
+ $page = new AnewtPage();
+ $page->enable_dublin_core = false;
+ $page->content_type = 'application/xhtml+xml';
+ $page->charset = 'UTF-8';
+ $page->title = $title;
+ $page->add_stylesheet_href_media('style.css', 'screen');
+ $page->append(ax_raw($output));
echo to_string($page), NL;
}
else
@@ -61,6 +64,4 @@
echo $output, NL;
}
-exit(0);
-
?>