diff options
-rw-r--r-- | inc/DifferenceEngine.php | 3 | ||||
-rw-r--r-- | inc/actions.php | 4 | ||||
-rw-r--r-- | inc/admin_acl.php | 3 | ||||
-rw-r--r-- | inc/auth.php | 3 | ||||
-rw-r--r-- | inc/auth_ldap.php | 3 | ||||
-rw-r--r-- | inc/auth_mysql.php | 3 | ||||
-rw-r--r-- | inc/auth_pgsql.php | 3 | ||||
-rw-r--r-- | inc/auth_plain.php | 3 | ||||
-rw-r--r-- | inc/blowfish.php | 3 | ||||
-rw-r--r-- | inc/common.php | 4 | ||||
-rw-r--r-- | inc/feedcreator.class.php | 3 | ||||
-rw-r--r-- | inc/format.php | 3 | ||||
-rw-r--r-- | inc/geshi.php | 1 | ||||
-rw-r--r-- | inc/html.php | 3 | ||||
-rw-r--r-- | inc/init.php | 3 | ||||
-rw-r--r-- | inc/io.php | 3 | ||||
-rw-r--r-- | inc/mail.php | 3 | ||||
-rw-r--r-- | inc/parser.php | 3 | ||||
-rw-r--r-- | inc/parser/action.php | 3 | ||||
-rw-r--r-- | inc/parser/handler.php | 3 | ||||
-rw-r--r-- | inc/parser/lexer.php | 3 | ||||
-rw-r--r-- | inc/parser/parser.php | 3 | ||||
-rw-r--r-- | inc/parser/renderer.php | 3 | ||||
-rw-r--r-- | inc/parser/spamcheck.php | 3 | ||||
-rw-r--r-- | inc/parser/wiki.php | 622 | ||||
-rw-r--r-- | inc/parser/xhtml.php | 2 | ||||
-rw-r--r-- | inc/search.php | 3 | ||||
-rw-r--r-- | inc/template.php | 3 | ||||
-rw-r--r-- | inc/utf8.php | 4 | ||||
-rw-r--r-- | inc/utils.php | 3 |
30 files changed, 372 insertions, 337 deletions
diff --git a/inc/DifferenceEngine.php b/inc/DifferenceEngine.php index 6a0b6d176..038fd4fac 100644 --- a/inc/DifferenceEngine.php +++ b/inc/DifferenceEngine.php @@ -1058,4 +1058,5 @@ class TableDiffFormatter extends DiffFormatter } } -?> + +//Setup VIM: ex: et ts=2 enc=utf-8 : diff --git a/inc/actions.php b/inc/actions.php index 463186e82..7ed171dfb 100644 --- a/inc/actions.php +++ b/inc/actions.php @@ -234,4 +234,6 @@ function act_export($act){ return 'show'; } -?> + + +//Setup VIM: ex: et ts=2 enc=utf-8 : diff --git a/inc/admin_acl.php b/inc/admin_acl.php index d07cf4550..98e262a8e 100644 --- a/inc/admin_acl.php +++ b/inc/admin_acl.php @@ -396,4 +396,5 @@ function admin_acl_html_checkboxes($setperm,$ispage){ return $ret; } -?> + +//Setup VIM: ex: et ts=2 enc=utf-8 : diff --git a/inc/auth.php b/inc/auth.php index d5af6436a..462a2c39f 100644 --- a/inc/auth.php +++ b/inc/auth.php @@ -421,4 +421,5 @@ function isvalidemail($email){ } -?> + +//Setup VIM: ex: et ts=2 enc=utf-8 : diff --git a/inc/auth_ldap.php b/inc/auth_ldap.php index dfd54103b..7fb9f9934 100644 --- a/inc/auth_ldap.php +++ b/inc/auth_ldap.php @@ -177,4 +177,5 @@ function auth_createUser($user,$name,$mail){ return null; } -?> + +//Setup VIM: ex: et ts=2 enc=utf-8 : diff --git a/inc/auth_mysql.php b/inc/auth_mysql.php index 440e55411..483ee5511 100644 --- a/inc/auth_mysql.php +++ b/inc/auth_mysql.php @@ -113,4 +113,5 @@ function auth_createUser($user,$name,$mail){ return null; } -?> + +//Setup VIM: ex: et ts=2 enc=utf-8 : diff --git a/inc/auth_pgsql.php b/inc/auth_pgsql.php index b9044afb4..0bbea07e7 100644 --- a/inc/auth_pgsql.php +++ b/inc/auth_pgsql.php @@ -108,5 +108,6 @@ function auth_createUser($user,$name,$mail){ return null; } -?> + +//Setup VIM: ex: et ts=2 enc=utf-8 : diff --git a/inc/auth_plain.php b/inc/auth_plain.php index 6ba3436c9..33b5e2374 100644 --- a/inc/auth_plain.php +++ b/inc/auth_plain.php @@ -113,4 +113,5 @@ function auth_plain_loadUserData(){ return $data; } -?> + +//Setup VIM: ex: et ts=2 enc=utf-8 : diff --git a/inc/blowfish.php b/inc/blowfish.php index 0ee0950c2..05dbcef4e 100644 --- a/inc/blowfish.php +++ b/inc/blowfish.php @@ -563,4 +563,5 @@ function PMA_blowfish_decrypt($encdata, $secret) { return trim($decrypt); } -?> + +//Setup VIM: ex: et ts=2 enc=utf-8 : diff --git a/inc/common.php b/inc/common.php index ff3fd847c..9b91caca8 100644 --- a/inc/common.php +++ b/inc/common.php @@ -984,4 +984,6 @@ function check(){ msg('The current page is not writable you',0); } } -?> + + +//Setup VIM: ex: et ts=2 enc=utf-8 : diff --git a/inc/feedcreator.class.php b/inc/feedcreator.class.php index 00731ef74..59f80cf36 100644 --- a/inc/feedcreator.class.php +++ b/inc/feedcreator.class.php @@ -1545,4 +1545,5 @@ class DokuWikiFeedCreator extends UniversalFeedCreator{ } -?> + +//Setup VIM: ex: et ts=2 enc=utf-8 : diff --git a/inc/format.php b/inc/format.php index 1f17dce74..0be51c12d 100644 --- a/inc/format.php +++ b/inc/format.php @@ -586,4 +586,5 @@ function img_resize($ext,$from,$from_w,$from_h,$to,$to_w,$to_h){ return false; } -?> + +//Setup VIM: ex: et ts=2 enc=utf-8 : diff --git a/inc/geshi.php b/inc/geshi.php index 40be329c5..ba080f8b1 100644 --- a/inc/geshi.php +++ b/inc/geshi.php @@ -2416,4 +2416,3 @@ if ( !function_exists('geshi_highlight') ) } } -?> diff --git a/inc/html.php b/inc/html.php index 798e2ce79..0c563f13d 100644 --- a/inc/html.php +++ b/inc/html.php @@ -961,4 +961,5 @@ function html_admin(){ ptln('</ul>'); } -?> + +//Setup VIM: ex: et ts=2 enc=utf-8 : diff --git a/inc/init.php b/inc/init.php index 72bd4818d..cf86f4718 100644 --- a/inc/init.php +++ b/inc/init.php @@ -123,4 +123,5 @@ function getBaseURL($abs=false){ } -?> + +//Setup VIM: ex: et ts=2 enc=utf-8 : diff --git a/inc/io.php b/inc/io.php index 2d5e8e585..81247a590 100644 --- a/inc/io.php +++ b/inc/io.php @@ -218,4 +218,5 @@ function io_runcmd($cmd){ return $ret; } -?> + +//Setup VIM: ex: et ts=2 enc=utf-8 : diff --git a/inc/mail.php b/inc/mail.php index c7b4eb40b..2f7efedff 100644 --- a/inc/mail.php +++ b/inc/mail.php @@ -195,4 +195,5 @@ function mail_quotedprintable_encode($input='',$line_max=74,$space_conv=false){ } -?> + +//Setup VIM: ex: et ts=2 enc=utf-8 : diff --git a/inc/parser.php b/inc/parser.php index e14c5bcd5..c9d7b2220 100644 --- a/inc/parser.php +++ b/inc/parser.php @@ -855,4 +855,5 @@ function getFirstHeading($text){ return $title; } -?> + +//Setup VIM: ex: et ts=2 enc=utf-8 : diff --git a/inc/parser/action.php b/inc/parser/action.php index ed85f5cf9..4e971ed4a 100644 --- a/inc/parser/action.php +++ b/inc/parser/action.php @@ -145,4 +145,5 @@ function resolve_pageid(&$page,&$exists){ if(!empty($hash)) $page.'#'.$hash; } -?> + +//Setup VIM: ex: et ts=2 enc=utf-8 : diff --git a/inc/parser/handler.php b/inc/parser/handler.php index 72880736d..75020059e 100644 --- a/inc/parser/handler.php +++ b/inc/parser/handler.php @@ -1496,4 +1496,5 @@ class Doku_Handler_Toc { } -?> + +//Setup VIM: ex: et ts=2 enc=utf-8 : diff --git a/inc/parser/lexer.php b/inc/parser/lexer.php index 13c7a181d..b625ccacc 100644 --- a/inc/parser/lexer.php +++ b/inc/parser/lexer.php @@ -552,4 +552,5 @@ function Doku_Lexer_Escape($str) { return preg_replace($chars, $escaped, $str); } -?> + +//Setup VIM: ex: et ts=2 enc=utf-8 : diff --git a/inc/parser/parser.php b/inc/parser/parser.php index 25da10f9b..d1d039ad7 100644 --- a/inc/parser/parser.php +++ b/inc/parser/parser.php @@ -825,4 +825,5 @@ function Doku_Parser_Disabled() { return $modes; } -?> + +//Setup VIM: ex: et ts=2 enc=utf-8 : diff --git a/inc/parser/renderer.php b/inc/parser/renderer.php index 60462a2b4..2fd5bfe6f 100644 --- a/inc/parser/renderer.php +++ b/inc/parser/renderer.php @@ -166,4 +166,5 @@ class Doku_Renderer { } -?> + +//Setup VIM: ex: et ts=2 enc=utf-8 : diff --git a/inc/parser/spamcheck.php b/inc/parser/spamcheck.php index 1c2958e6f..65a1ba060 100644 --- a/inc/parser/spamcheck.php +++ b/inc/parser/spamcheck.php @@ -69,4 +69,5 @@ class Doku_Renderer_SpamCheck extends Doku_Renderer { } } -?> + +//Setup VIM: ex: et ts=2 enc=utf-8 : diff --git a/inc/parser/wiki.php b/inc/parser/wiki.php index 132c5332c..2b24d2539 100644 --- a/inc/parser/wiki.php +++ b/inc/parser/wiki.php @@ -1,317 +1,319 @@ -<?php
+<?php /** * Basis for converting to Dokuwiki syntax * This is not yet complete but useable for converting * phpWiki syntax. * Main issues lie with lists, quote and tables -*/
-class Doku_Renderer_Wiki extends Doku_Renderer {
-
- var $doc = '';
-
- // This should be eliminated
- var $listMarker = '*';
-
- function document_start() {
- ob_start();
- }
-
- function document_end() {
-
- $this->doc .= ob_get_contents();
- ob_end_clean();
-
- }
-
- function header($text, $level) {
- $levels = array(
- 1=>'======',
- 2=>'=====',
- 3=>'====',
- 4=>'===',
- 5=>'==',
- );
-
- if ( isset($levels[$level]) ) {
- $token = $levels[$level];
- } else {
- $token = $levels[1];
- }
- echo "\n{$token} ";
- echo trim($text);
- echo " {$token}\n";
- }
-
- function cdata($text) {
- echo $text;
- }
-
- function linebreak() {
- echo '\\\\ ';
- }
-
- function hr() {
- echo "\n----\n";
- }
-
- function strong_open() {
- echo '**';
- }
-
- function strong_close() {
- echo '**';
- }
-
- function emphasis_open() {
- echo '//';
- }
-
- function emphasis_close() {
- echo '//';
- }
-
- function underline_open() {
- echo '__';
- }
-
- function underline_close() {
- echo '__';
- }
-
- function monospace_open() {
- echo "''";
- }
-
- function monospace_close() {
- echo "''";
- }
-
- function subscript_open() {
- echo '<sub>';
- }
-
- function subscript_close() {
- echo '</sub>';
- }
-
- function superscript_open() {
- echo '<sup>';
- }
-
- function superscript_close() {
- echo '</sup>';
- }
-
- function deleted_open() {
- echo '<del>';
- }
-
- function deleted_close() {
- echo '</del>';
- }
-
- function footnote_open() {
- echo '((';
- }
-
- function footnote_close() {
- echo '))';
- }
-
- function listu_open() {
+*/ +class Doku_Renderer_Wiki extends Doku_Renderer { + + var $doc = ''; + + // This should be eliminated + var $listMarker = '*'; + + function document_start() { + ob_start(); + } + + function document_end() { + + $this->doc .= ob_get_contents(); + ob_end_clean(); + + } + + function header($text, $level) { + $levels = array( + 1=>'======', + 2=>'=====', + 3=>'====', + 4=>'===', + 5=>'==', + ); + + if ( isset($levels[$level]) ) { + $token = $levels[$level]; + } else { + $token = $levels[1]; + } + echo "\n{$token} "; + echo trim($text); + echo " {$token}\n"; + } + + function cdata($text) { + echo $text; + } + + function linebreak() { + echo '\\\\ '; + } + + function hr() { + echo "\n----\n"; + } + + function strong_open() { + echo '**'; + } + + function strong_close() { + echo '**'; + } + + function emphasis_open() { + echo '//'; + } + + function emphasis_close() { + echo '//'; + } + + function underline_open() { + echo '__'; + } + + function underline_close() { + echo '__'; + } + + function monospace_open() { + echo "''"; + } + + function monospace_close() { + echo "''"; + } + + function subscript_open() { + echo '<sub>'; + } + + function subscript_close() { + echo '</sub>'; + } + + function superscript_open() { + echo '<sup>'; + } + + function superscript_close() { + echo '</sup>'; + } + + function deleted_open() { + echo '<del>'; + } + + function deleted_close() { + echo '</del>'; + } + + function footnote_open() { + echo '(('; + } + + function footnote_close() { + echo '))'; + } + + function listu_open() { $this->listMarker = '*'; - echo "\n";
- }
-
- function listo_open() {
+ echo "\n"; + } + + function listo_open() { $this->listMarker = '-'; - echo "\n";
- } - - /**
- * @TODO Problem here with nested lists
- */
- function listitem_open($level) {
- echo str_repeat(' ', $level).$this->listMarker;
- }
-
- function listitem_close() {
- echo "\n";
- }
-
- function unformatted($text) {
- echo '%%'.$text.'%%';
- }
-
- function php($text) {
- echo "\n<php>\n$text\n</php>\n";
- }
-
- function html($text) {
- echo "\n<html>\n$text\n</html>\n";
- }
-
- /**
- * Indent?
- */
- function preformatted($text) {
- echo "\n<code>\n$text\n</code>\n";
- }
-
- function file($text) {
- echo "\n<file>\n$text\n</file>\n";
- }
-
- /**
- * Problem here with nested quotes
- */
- function quote_open() {
- echo '>';
- }
-
- function quote_close() {
- echo "\n";
- }
-
- function code($text, $lang = NULL) {
- if ( !$lang ) {
- echo "\n<code>\n$text\n</code>\n";
- } else {
- echo "\n<code $lang>\n$text\n</code>\n";
- }
-
- }
-
- function acronym($acronym) {
- echo $acronym;
- }
-
- function smiley($smiley) {
- echo $smiley;
- }
-
- function wordblock($word) {
- echo $word;
- }
-
- function entity($entity) {
- echo $entity;
- }
-
- // 640x480 ($x=640, $y=480)
- function multiplyentity($x, $y) {
- echo "{$x}x{$y}";
- }
-
- function singlequoteopening() {
- echo "'";
- }
-
- function singlequoteclosing() {
- echo "'";
- }
-
- function doublequoteopening() {
- echo '"';
- }
-
- function doublequoteclosing() {
- echo '"';
- }
-
- // $link like 'SomePage'
- function camelcaselink($link) {
- echo $link;
- }
-
- // $link like 'wikie:syntax', $title could be an array (media)
- function internallink($link, $title = NULL) {
- if ( $title ) {
- echo '[['.$link.'|'.$title.']]';
- } else {
- echo '[['.$link.']]';
- }
- }
-
- // $link is full URL with scheme, $title could be an array (media)
- function externallink($link, $title = NULL) {
- if ( $title ) {
- echo '[['.$link.'|'.$title.']]';
- } else {
- echo '[['.$link.']]';
- }
- }
-
- // $link is the original link - probably not much use
- // $wikiName is an indentifier for the wiki
- // $wikiUri is the URL fragment to append to some known URL
- function interwikilink($link, $title = NULL, $wikiName, $wikiUri) {
- if ( $title ) {
- echo '[['.$link.'|'.$title.']]';
- } else {
- echo '[['.$link.']]';
- }
- }
-
- // Link to file on users OS, $title could be an array (media)
- function filelink($link, $title = NULL) {
- if ( $title ) {
- echo '[['.$link.'|'.$title.']]';
- } else {
- echo '[['.$link.']]';
- }
- }
-
- // Link to a Windows share, , $title could be an array (media)
- function windowssharelink($link, $title = NULL) {
- if ( $title ) {
- echo '[['.$link.'|'.$title.']]';
- } else {
- echo '[['.$link.']]';
- }
- }
-
- function email($address, $title = NULL) {
- if ( $title ) {
- echo '[['.$address.'|'.$title.']]';
- } else {
- echo '[['.$address.']]';
- }
- }
-
- // @TODO
- function internalmedialink (
- $src,$title=NULL,$align=NULL,$width=NULL,$height=NULL,$cache=NULL
- ) {
-
- }
-
- // @TODO
- function externalmedialink(
- $src,$title=NULL,$align=NULL,$width=NULL,$height=NULL,$cache=NULL
- ) {
- if ( $title ) {
- echo '{{'.$src.'|'.$title.'}}';
- } else {
- echo '{{'.$src.'}}';
- }
- }
-
- function table_open($maxcols = NULL, $numrows = NULL){}
-
- function table_close(){}
-
- function tablerow_open(){}
-
- function tablerow_close(){}
-
- function tableheader_open($colspan = 1, $align = NULL){}
-
- function tableheader_close(){}
-
- function tablecell_open($colspan = 1, $align = NULL){}
-
- function tablecell_close(){}
-
-}
-
+ echo "\n"; + } + + /** + * @TODO Problem here with nested lists + */ + function listitem_open($level) { + echo str_repeat(' ', $level).$this->listMarker; + } + + function listitem_close() { + echo "\n"; + } + + function unformatted($text) { + echo '%%'.$text.'%%'; + } + + function php($text) { + echo "\n<php>\n$text\n</php>\n"; + } + + function html($text) { + echo "\n<html>\n$text\n</html>\n"; + } + + /** + * Indent? + */ + function preformatted($text) { + echo "\n<code>\n$text\n</code>\n"; + } + + function file($text) { + echo "\n<file>\n$text\n</file>\n"; + } + + /** + * Problem here with nested quotes + */ + function quote_open() { + echo '>'; + } + + function quote_close() { + echo "\n"; + } + + function code($text, $lang = NULL) { + if ( !$lang ) { + echo "\n<code>\n$text\n</code>\n"; + } else { + echo "\n<code $lang>\n$text\n</code>\n"; + } + + } + + function acronym($acronym) { + echo $acronym; + } + + function smiley($smiley) { + echo $smiley; + } + + function wordblock($word) { + echo $word; + } + + function entity($entity) { + echo $entity; + } + + // 640x480 ($x=640, $y=480) + function multiplyentity($x, $y) { + echo "{$x}x{$y}"; + } + + function singlequoteopening() { + echo "'"; + } + + function singlequoteclosing() { + echo "'"; + } + + function doublequoteopening() { + echo '"'; + } + + function doublequoteclosing() { + echo '"'; + } + + // $link like 'SomePage' + function camelcaselink($link) { + echo $link; + } + + // $link like 'wikie:syntax', $title could be an array (media) + function internallink($link, $title = NULL) { + if ( $title ) { + echo '[['.$link.'|'.$title.']]'; + } else { + echo '[['.$link.']]'; + } + } + + // $link is full URL with scheme, $title could be an array (media) + function externallink($link, $title = NULL) { + if ( $title ) { + echo '[['.$link.'|'.$title.']]'; + } else { + echo '[['.$link.']]'; + } + } + + // $link is the original link - probably not much use + // $wikiName is an indentifier for the wiki + // $wikiUri is the URL fragment to append to some known URL + function interwikilink($link, $title = NULL, $wikiName, $wikiUri) { + if ( $title ) { + echo '[['.$link.'|'.$title.']]'; + } else { + echo '[['.$link.']]'; + } + } + + // Link to file on users OS, $title could be an array (media) + function filelink($link, $title = NULL) { + if ( $title ) { + echo '[['.$link.'|'.$title.']]'; + } else { + echo '[['.$link.']]'; + } + } + + // Link to a Windows share, , $title could be an array (media) + function windowssharelink($link, $title = NULL) { + if ( $title ) { + echo '[['.$link.'|'.$title.']]'; + } else { + echo '[['.$link.']]'; + } + } + + function email($address, $title = NULL) { + if ( $title ) { + echo '[['.$address.'|'.$title.']]'; + } else { + echo '[['.$address.']]'; + } + } + + // @TODO + function internalmedialink ( + $src,$title=NULL,$align=NULL,$width=NULL,$height=NULL,$cache=NULL + ) { + + } + + // @TODO + function externalmedialink( + $src,$title=NULL,$align=NULL,$width=NULL,$height=NULL,$cache=NULL + ) { + if ( $title ) { + echo '{{'.$src.'|'.$title.'}}'; + } else { + echo '{{'.$src.'}}'; + } + } + + function table_open($maxcols = NULL, $numrows = NULL){} + + function table_close(){} + + function tablerow_open(){} + + function tablerow_close(){} + + function tableheader_open($colspan = 1, $align = NULL){} + + function tableheader_close(){} + + function tablecell_open($colspan = 1, $align = NULL){} + + function tablecell_close(){} + +} + + +//Setup VIM: ex: et ts=2 enc=utf-8 : diff --git a/inc/parser/xhtml.php b/inc/parser/xhtml.php index b66a92ec4..b5c2b5d8d 100644 --- a/inc/parser/xhtml.php +++ b/inc/parser/xhtml.php @@ -875,3 +875,5 @@ msg("deprecated wikiPageExists called",-1); return $pages[$name]; } + +//Setup VIM: ex: et ts=2 enc=utf-8 : diff --git a/inc/search.php b/inc/search.php index 1c688c968..9c01b455b 100644 --- a/inc/search.php +++ b/inc/search.php @@ -335,4 +335,5 @@ function pathID($path){ return $id; } -?> + +//Setup VIM: ex: et ts=2 enc=utf-8 : diff --git a/inc/template.php b/inc/template.php index ab135e95f..1f43c6b15 100644 --- a/inc/template.php +++ b/inc/template.php @@ -454,4 +454,5 @@ function tpl_mediauploadform(){ ptln('</form>',2); } -?> + +//Setup VIM: ex: et ts=2 enc=utf-8 : diff --git a/inc/utf8.php b/inc/utf8.php index 8793cb856..50a9556ee 100644 --- a/inc/utf8.php +++ b/inc/utf8.php @@ -576,4 +576,6 @@ $UTF8_SPECIAL_CHARS = array( 0xf8f1, 0xf8f2, 0xf8f3, 0xf8f4, 0xf8f5, 0xf8f6, 0xf8f7, 0xf8f8, 0xf8f9, 0xf8fa, 0xf8fb, 0xf8fc, 0xf8fd, 0xf8fe, 0xfe7c, 0xfe7d, ); -?> + + +//Setup VIM: ex: et ts=2 enc=utf-8 : diff --git a/inc/utils.php b/inc/utils.php index de98f35ec..45b9b0d23 100644 --- a/inc/utils.php +++ b/inc/utils.php @@ -84,3 +84,6 @@ function confToHash($file) { return $conf; } + + +//Setup VIM: ex: et ts=2 enc=utf-8 : |