You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(23) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(107) |
Feb
(48) |
Mar
|
Apr
(4) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2003 |
Jan
|
Feb
|
Mar
|
Apr
(8) |
May
|
Jun
(29) |
Jul
(14) |
Aug
(9) |
Sep
(34) |
Oct
(14) |
Nov
(6) |
Dec
(18) |
2004 |
Jan
|
Feb
(4) |
Mar
(12) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2005 |
Jan
|
Feb
|
Mar
(43) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(10) |
2007 |
Jan
(1) |
Feb
(3) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Even H. <ho...@us...> - 2005-03-30 14:41:09
|
Update of /cvsroot/tavi/tavi/parse In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22872 Modified Files: macros.php transforms.php Log Message: Some beautification to avoid warnings Index: macros.php =================================================================== RCS file: /cvsroot/tavi/tavi/parse/macros.php,v retrieving revision 1.22 retrieving revision 1.23 diff -u -d -r1.22 -r1.23 --- macros.php 1 Mar 2004 16:27:49 -0000 1.22 +++ macros.php 30 Mar 2005 14:40:39 -0000 1.23 @@ -158,7 +158,7 @@ // Check for CurlyOptions, and split them preg_match("/^(?:\s*{([^]]*)})?\s*(.*)$/", $args, $arg); - $options = split(',', $arg[1]); + $options = array_slice(split(',', $arg[1]), 1); $search = $arg[2]; // Defaults @@ -166,7 +166,11 @@ // Parse options foreach ($options as $opt) { - list($name, $value) = split('=', $opt); + if (preg_match('/=/', $opt) { + list($name, $value) = split('=', $opt); + } else { + $name = $opt; $value=''; + } $name=strtolower($name); if (preg_match("/^or/i", $name)) { // ORigin - Displays origin of wanted pages $displayOrigin = !($value == 'false'); @@ -245,15 +249,21 @@ // Check for CurlyOptions, and split them preg_match("/^(?:\s*{([^]]*)})?\s*(.*)$/", $args, $arg); - $options = split(',', $arg[1]); + $options = array_slice(split(',', $arg[1]), 1); $search = $arg[2]; // Some defaults $useDelim = ''; // Empty delimiter at the start, changed by options + $showIndex = false; + $text = ''; // Parse options foreach ($options as $opt) { - list($name, $value) = split('=', $opt); + if (preg_match('/=/', $opt)) { + list($name, $value) = split('=', $opt); + } else { + $name = $opt; $value = ''; + } $name=strtolower($name); if (preg_match("/^st/", $name)) { // STyle - Adds a style-attribute $style = $value; @@ -430,7 +440,7 @@ // Check for CurlyOptions, and split them preg_match("/^(?:\s*{([^]]*)})?\s*(.*)$/", $args, $arg); - $options = split(',', $arg[1]); + $options = array_slice(split(',', $arg[1]), 1); $page = $arg[2]; if(!validate_page($page)) @@ -457,7 +467,11 @@ // Check for CurlyOptions affecting transclusion // Parse options foreach ($options as $opt) { - list($name, $value) = split('=', $opt); + if (preg_match('/=/', $opt) { + list($name, $value) = split('=', $opt); + } else { + $name = $opt; $value=''; + } $name=strtolower($name); if ($name[0]=='o') { // Offset - Adds to header levels in transcluded docs $HeadingOffset = $previousHeadingOffset + (($value=='') ? 1 : $value); Index: transforms.php =================================================================== RCS file: /cvsroot/tavi/tavi/parse/transforms.php,v retrieving revision 1.55 retrieving revision 1.56 diff -u -d -r1.55 -r1.56 --- transforms.php 29 Mar 2005 15:29:54 -0000 1.55 +++ transforms.php 30 Mar 2005 14:40:39 -0000 1.56 @@ -152,7 +152,7 @@ } // translate sub-page markup into a qualified wikiword - if ($link[0] == '/') + if (($link != '') and ($link[0] == '/')) { if (preg_match("|(.*)\\/[^\\/]*|", $ParseObject, $path)) { $link = $path[1] . $link; } |
From: Even H. <ho...@us...> - 2005-03-30 14:39:13
|
Update of /cvsroot/tavi/tavi/template In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21919 Modified Files: common.php Log Message: Some beautification to avoid warnings Index: common.php =================================================================== RCS file: /cvsroot/tavi/tavi/template/common.php,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- common.php 16 Dec 2003 20:29:27 -0000 1.13 +++ common.php 30 Mar 2005 14:38:49 -0000 1.14 @@ -78,7 +78,7 @@ <div id="toolbar-top"> <?php if($args['toolbar']) - { print html_toolbar_top($path[1]); } + { print html_toolbar_top( !empty($path[1])?$path[1]:'' ); } ?> </div> |
From: Even H. <ho...@us...> - 2005-03-30 14:38:31
|
Update of /cvsroot/tavi/tavi/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21593 Modified Files: captcha.php main.php Log Message: Some beautification to avoid warnings Index: captcha.php =================================================================== RCS file: /cvsroot/tavi/tavi/lib/captcha.php,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- captcha.php 29 Mar 2005 18:27:44 -0000 1.2 +++ captcha.php 30 Mar 2005 14:38:22 -0000 1.3 @@ -111,9 +111,11 @@ $this->maxLenght = $hp[3]; $this->oldLayout = $hp[4]; $this->commentLines = $hp[5] + 1; - $this->printDirection = $hp[6]; - $this->fullLayout = $hp[7]; - $this->codeTagCount = $hp[8]; + if (count($hp) > 6) { + $this->printDirection = $hp[6]; + $this->fullLayout = $hp[7]; + $this->codeTagCount = $hp[8]; + } unset($hp); @@ -247,11 +249,10 @@ } // Join all images into one array, and add empty space to align everything - $result= array(); + for ($i=0; $i<$maxLines; $i++) {$result[$i] = ''; }; for ($i=0; $i< count($chars); $i++) { $currLines = count ($eachLine[$i]) - 1; // Last line is empty $j=0; $maxChars = strlen($eachLine[$i][0]); - while ($j < $currLines) { $result[$j] .= $eachLine[$i][$j]; $j++; Index: main.php =================================================================== RCS file: /cvsroot/tavi/tavi/lib/main.php,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- main.php 29 Mar 2005 18:27:44 -0000 1.10 +++ main.php 30 Mar 2005 14:38:22 -0000 1.11 @@ -4,7 +4,8 @@ // Harvest script parameters and other variables. We do this even if // register_globals=on; this way, we force the variables to be defined. // (Which is better form in case the admin has warnings cranked all the -// way up). +// way up, like using the next line... ) +// error_reporting(E_ALL); $HTTP_REFERER = isset($HTTP_SERVER_VARS['HTTP_REFERER']) ? $HTTP_SERVER_VARS['HTTP_REFERER'] : ''; |
From: Even H. <ho...@us...> - 2005-03-30 14:37:46
|
Update of /cvsroot/tavi/tavi/lang In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20512 Modified Files: default.php Log Message: Some small changes... Index: default.php =================================================================== RCS file: /cvsroot/tavi/tavi/lang/default.php,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- default.php 29 Mar 2005 18:27:44 -0000 1.4 +++ default.php 30 Mar 2005 14:37:20 -0000 1.5 @@ -86,7 +86,7 @@ define('PARSE_ButtonSave', 'Save'); define('PARSE_ButtonPreview', 'Preview'); define('PARSE_Preferences', 'Preferences'); -define('PARSE_History', 'history'); // note lowercase first character +define('PARSE_History', 'history'); // Note the lowercase first character /* Template directory */ // Note the change to use only TMPL_ as prefix instead of full TEMPLATE_ @@ -108,7 +108,7 @@ define('TMPL_CurrentVersion', 'Current Version'); define('TMPL_ButtonSave', 'Save'); define('TMPL_ButtonPreview', 'Preview'); -define('TMPL_PreCaptcha', 'When saving, enter the following:<br>'); +define('TMPL_PreCaptcha', 'When saving, enter the following:<br />'); define('TMPL_YourUsername', 'Your user name is'); define('TMPL_VisitPrefs', 'Visit <a href="'. $PrefsScript. '">Preferences</a> to set '. |
From: Even H. <ho...@us...> - 2005-03-30 09:20:58
|
Update of /cvsroot/tavi/tavi/fonts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7358/fonts Log Message: Directory /cvsroot/tavi/tavi/fonts added to the repository |
From: Even H. <ho...@us...> - 2005-03-29 18:27:56
|
Update of /cvsroot/tavi/tavi/parse In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16368/parse Modified Files: html.php Log Message: Completed captcha-system, and several bug fixes. Ready for release of version 0.26. Will test some more tomorrow, and then release, hopefully. Index: html.php =================================================================== RCS file: /cvsroot/tavi/tavi/parse/html.php,v retrieving revision 1.36 retrieving revision 1.37 diff -u -d -r1.36 -r1.37 --- html.php 8 Mar 2005 00:22:39 -0000 1.36 +++ html.php 29 Mar 2005 18:27:44 -0000 1.37 @@ -468,16 +468,13 @@ } -function html_captcha($array, $formTxt) +function html_captcha($phrase, $formTxt) { // Input is ascii art images, which needs to be combined // horisontally. Easiest way is by using a table, and so it is... $output = "<table class=\"codephr\">\n <tr>\n"; $output .= " <td class=\"codehdr\">$formTxt</td>\n"; - for ($i = 0; $i < count($array); $i++) - { - $output .= " <td class=\"codephr\"><pre>" . $array[$i] . "</pre></td>"; - } + $output .= " <td class=\"codephr\"><pre>$phrase</pre></td>"; $output .= " </tr>\n</table>\n"; return $output; |
From: Even H. <ho...@us...> - 2005-03-29 18:27:54
|
Update of /cvsroot/tavi/tavi/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16368/lib Modified Files: captcha.php defaults.php main.php Log Message: Completed captcha-system, and several bug fixes. Ready for release of version 0.26. Will test some more tomorrow, and then release, hopefully. Index: captcha.php =================================================================== RCS file: /cvsroot/tavi/tavi/lib/captcha.php,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- captcha.php 8 Mar 2005 00:27:21 -0000 1.1 +++ captcha.php 29 Mar 2005 18:27:44 -0000 1.2 @@ -102,7 +102,6 @@ { $this->fontFile = file($fontfile); if (!$this->fontFile) die("Couldnt open fontfile $fontfile\n"); - $hp = explode(" ", $this->fontFile[0]); // get header $this->signature = substr($hp[0], 0, strlen($hp[0]) -1); @@ -233,13 +232,48 @@ return $phrase; } +// Concatenates each of the character images in $chars to be one large +// string. +function join_ascii_images($chars){ + $maxLines = 0; $i=0; + + // Find max number of lines in character images + foreach ($chars as $char) { + $eachLine[$i] = explode("\n", $char); + $noLines = count($eachLine[$i]); + if ($noLines > $maxLines) + { $maxLines = $noLines; } + $i++; + } + + // Join all images into one array, and add empty space to align everything + $result= array(); + for ($i=0; $i< count($chars); $i++) { + $currLines = count ($eachLine[$i]) - 1; // Last line is empty + $j=0; $maxChars = strlen($eachLine[$i][0]); + + while ($j < $currLines) { + $result[$j] .= $eachLine[$i][$j]; + $j++; + } + while ($j < $maxLines) { + $result[$j] .= str_repeat(" ", $maxChars); + $j++; + } + } + + // Add some random noise here and there ;-) + return implode("\n", $result); +} + // Returns a ascii art image of a random phrase, and the phrase // Inputs $phrlen as length of phrase function generate_captcha($phrlen) { + global $FigletFontdir; // Load list of ascii art fonts in 'fonts' subdir into array - $filelist = get_figlet_fontlist("\\temp\\fonts", "flf"); + $filelist = get_figlet_fontlist($FigletFontdir, "flf"); $phrase = generate_phrase($phrlen); if( is_array($filelist) && (strlen($phrase) == $phrlen) ) @@ -271,7 +305,8 @@ } } - return array($randstr_array, $phrase); + $preRandstr = join_ascii_images($randstr_array); + return array($preRandstr, $phrase); } else { @@ -280,4 +315,5 @@ echo "<p><strong>Could not generate captcha-phrase</strong></p>"; } } + ?> \ No newline at end of file Index: defaults.php =================================================================== RCS file: /cvsroot/tavi/tavi/lib/defaults.php,v retrieving revision 1.21 retrieving revision 1.22 diff -u -d -r1.21 -r1.22 --- defaults.php 8 Mar 2005 00:22:39 -0000 1.21 +++ defaults.php 29 Mar 2005 18:27:44 -0000 1.22 @@ -131,6 +131,13 @@ // to be able to save the changes made $UseCaptcha = 1; +// $FigletFontdir, only used if $UseCaptcha is set, references to a directory +// containing figletfonts-files. See website for fonts and more info on figlets +// and more fonts: http://www.figlet.org/ +// If relative, then it's relative to current working directory, and this +// usually is the same as the directory where your config.php-file is located +$FigletFontdir = "fonts/"; + // $TempDir determines the location of temp files used for computing diffs. // The default makes a choice based on the environment $TempDir = isset($_ENV['TMP']) ? $_ENV['TMP'] : Index: main.php =================================================================== RCS file: /cvsroot/tavi/tavi/lib/main.php,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- main.php 16 Dec 2003 18:07:46 -0000 1.9 +++ main.php 29 Mar 2005 18:27:44 -0000 1.10 @@ -48,6 +48,8 @@ ? $HTTP_POST_VARS['cols'] : ''; $comment = isset($HTTP_POST_VARS['comment']) ? $HTTP_POST_VARS['comment'] : ''; +$posted_code = isset($HTTP_POST_VARS['posted_code']) + ? $HTTP_POST_VARS['posted_code'] : ''; $days = isset($HTTP_POST_VARS['days']) ? $HTTP_POST_VARS['days'] : $days; $discard = isset($HTTP_POST_VARS['discard']) |
From: Even H. <ho...@us...> - 2005-03-29 18:27:53
|
Update of /cvsroot/tavi/tavi/template In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16368/template Modified Files: edit.php preview.php Log Message: Completed captcha-system, and several bug fixes. Ready for release of version 0.26. Will test some more tomorrow, and then release, hopefully. Index: edit.php =================================================================== RCS file: /cvsroot/tavi/tavi/template/edit.php,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- edit.php 8 Mar 2005 00:22:39 -0000 1.12 +++ edit.php 29 Mar 2005 18:27:45 -0000 1.13 @@ -29,7 +29,7 @@ <div class="form"> <?php if ($UseCaptcha) { - $formTxt = 'When saving, enter the following:<br>'. + $formTxt = TMPL_PreCaptcha . '<input name="posted_code" value="" type="text" size="20" />'; echo html_captcha($args['captcha'], $formTxt); } Index: preview.php =================================================================== RCS file: /cvsroot/tavi/tavi/template/preview.php,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- preview.php 16 Dec 2003 20:29:27 -0000 1.11 +++ preview.php 29 Mar 2005 18:27:45 -0000 1.12 @@ -17,6 +17,7 @@ function template_preview($args) { global $EditRows, $EditCols, $categories, $UserName, $comment, $PrefsScript; + global $UseCaptcha, $posted_code; template_common_prologue(array('norobots' => 1, 'title' => TMPL_Previewing .' '. $args['page'], @@ -28,7 +29,17 @@ <div id="body"> <form method="post" action="<?php print saveURL($args['page']); ?>"> <div class="form"> - <input type="submit" name="Save" value="<?php echo TMPL_ButtonSave; ?>" /> + <?php + if ($UseCaptcha) { + $correctResponse =($_SESSION['captcha_phrase'] != strtoupper($posted_code)) + ? '' : $posted_code; + $formTxt = TMPL_PreCaptcha . + '<input name="posted_code" value="'. + $correctResponse . + '" type="text" size="20" />'; + echo html_captcha($args['captcha'], $formTxt); + } + ?><input type="submit" name="Save" value="<?php echo TMPL_ButtonSave; ?>" /> <input type="submit" name="Preview" value="<?php echo TMPL_ButtonPreview; ?>" /> <?php if($UserName != '') |
From: Even H. <ho...@us...> - 2005-03-29 18:27:53
|
Update of /cvsroot/tavi/tavi In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16368 Modified Files: ChangeLog.txt Log Message: Completed captcha-system, and several bug fixes. Ready for release of version 0.26. Will test some more tomorrow, and then release, hopefully. Index: ChangeLog.txt =================================================================== RCS file: /cvsroot/tavi/tavi/ChangeLog.txt,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- ChangeLog.txt 8 Mar 2005 00:22:38 -0000 1.18 +++ ChangeLog.txt 29 Mar 2005 18:27:43 -0000 1.19 @@ -2,7 +2,17 @@ WikkiTikkiTavi - ChangeLog -------------------------- -2004-03-01 Even Hoeln <eve...@pv...> +2005-03-29 Even Holen <eve...@pv...> + * Fixed bug regarding Anchor-macro and paragraphs + * Fixed bug regarding double quotes in reference of URL's + * Fixed bug regarding reoccuring markup characters in TextEnhance + * Where to load fonts... ;-) + +2005-03-07 Even Holen <eve...@pv...> + * Added spam-prevention through lib/captcha.php + * Fixed bug regarding timestamp in mySql 4.x + +2004-03-01 Even Holen <eve...@pv...> * Fixed bug regarding timestamps showing as link * Removed $AuthorDiff from source * Fixed bugs in TitleSearch-macro, and added functionality |
From: Even H. <ho...@us...> - 2005-03-29 18:27:53
|
Update of /cvsroot/tavi/tavi/action In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16368/action Modified Files: edit.php preview.php save.php Log Message: Completed captcha-system, and several bug fixes. Ready for release of version 0.26. Will test some more tomorrow, and then release, hopefully. Index: edit.php =================================================================== RCS file: /cvsroot/tavi/tavi/action/edit.php,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- edit.php 8 Mar 2005 00:22:39 -0000 1.8 +++ edit.php 29 Mar 2005 18:27:43 -0000 1.9 @@ -43,6 +43,7 @@ session_name("taviCaptcha"); session_start(); $_SESSION['captcha_phrase'] = $aphrase_orig; + $_SESSION['captcha_image'] = $aphrase_ascii; } else { $aphrase_ascii = ''; } Index: preview.php =================================================================== RCS file: /cvsroot/tavi/tavi/action/preview.php,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- preview.php 7 Jan 2002 16:28:32 -0000 1.7 +++ preview.php 29 Mar 2005 18:27:44 -0000 1.8 @@ -6,19 +6,36 @@ // Preview what a page will look like when it is saved. function action_preview() { - global $ParseEngine, $archive; + global $ParseEngine, $archive, $UseCaptcha; global $page, $document, $nextver, $pagestore; $document = str_replace("\r", "", $document); $pg = $pagestore->page($page); $pg->read(); + if ($UseCaptcha) { + // Restore/start session + session_name("taviCaptcha"); + session_start(); + + if ($_SESSION['captcha_phrase']) { + $captcha = $_SESSION['captcha_image']; + } else { + echo "<strong>Something went wrong. No captcha information</strong>\n"; + // Should we generate a new captcha here??? + exit(1); + } + } else { + $captcha=''; + } + template_preview(array('page' => $page, 'text' => $document, 'html' => parseText($document, $ParseEngine, $page), 'timestamp' => $pg->time, 'nextver' => $nextver, - 'archive' => $archive)); + 'archive' => $archive, + 'captcha' => $captcha)); } ?> Index: save.php =================================================================== RCS file: /cvsroot/tavi/tavi/action/save.php,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- save.php 16 Dec 2003 20:23:08 -0000 1.10 +++ save.php 29 Mar 2005 18:27:44 -0000 1.11 @@ -10,7 +10,7 @@ { global $pagestore, $comment, $categories, $archive; global $Save, $page, $document, $nextver, $REMOTE_ADDR; - global $MaxPostLen, $UserName, $SaveMacroEngine; + global $MaxPostLen, $UserName, $SaveMacroEngine, $UseCaptcha, $posted_code; if(empty($Save)) // Didn't click the save button. { @@ -18,8 +18,26 @@ action_preview(); return; } - - $pagestore->lock(); // Ensure atomicity. + + // If using captcha, do all error test before allowing to continue + // saving the page. If not correct code entered, return to preview + // window! + if ($UseCaptcha) { + // Restore/start session + session_name("taviCaptcha"); + session_start(); + if ((!$_SESSION['captcha_phrase']) or + ($_SESSION['captcha_phrase'] != strtoupper($posted_code))) + { + include('action/preview.php'); + // Should we give some warning to the user that he entered the + // wrong code, or maybe that there hasn't been set a captcha code? + action_preview(); + return; + } + } + + $pagestore->lock(); // Ensure atomicity / Start transaction $pg = $pagestore->page($page); $pg->read(); |
From: Even H. <ho...@us...> - 2005-03-29 18:27:53
|
Update of /cvsroot/tavi/tavi/lang In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16368/lang Modified Files: default.php Log Message: Completed captcha-system, and several bug fixes. Ready for release of version 0.26. Will test some more tomorrow, and then release, hopefully. Index: default.php =================================================================== RCS file: /cvsroot/tavi/tavi/lang/default.php,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- default.php 10 Feb 2004 23:30:25 -0000 1.3 +++ default.php 29 Mar 2005 18:27:44 -0000 1.4 @@ -108,6 +108,7 @@ define('TMPL_CurrentVersion', 'Current Version'); define('TMPL_ButtonSave', 'Save'); define('TMPL_ButtonPreview', 'Preview'); +define('TMPL_PreCaptcha', 'When saving, enter the following:<br>'); define('TMPL_YourUsername', 'Your user name is'); define('TMPL_VisitPrefs', 'Visit <a href="'. $PrefsScript. '">Preferences</a> to set '. |
From: Even H. <ho...@us...> - 2005-03-29 15:30:05
|
Update of /cvsroot/tavi/tavi/parse In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16536 Modified Files: transforms.php Log Message: Fixed TaviBug:944597 Index: transforms.php =================================================================== RCS file: /cvsroot/tavi/tavi/parse/transforms.php,v retrieving revision 1.54 retrieving revision 1.55 diff -u -d -r1.54 -r1.55 --- transforms.php 29 Mar 2005 14:51:27 -0000 1.54 +++ transforms.php 29 Mar 2005 15:29:54 -0000 1.55 @@ -328,23 +328,23 @@ { // Special case, since *'s at start of line is markup for lists $return = $match[1] . - preg_replace("/(\*\*)([^*]+)\\1/e", + preg_replace("/(\*\*)(.+)\\1/Ue", "pair_tokens('bold', q1('\\2'))", $match[2], -1); } else { - $return = preg_replace("/(\*\*)([^*]+)\\1/e", + $return = preg_replace("/(\*\*)(.+)\\1/Ue", "pair_tokens('bold', q1('\\2'))", $text, -1); } - $return = preg_replace( "/(\/\/)([^\/]+)\\1/e", + $return = preg_replace( "/(\/\/)(.+)\\1/Ue", "pair_tokens('italic', q1('\\2'))", $return, -1); - $return = preg_replace( "/(--)([^-]+)\\1/e", + $return = preg_replace( "/(--)(.+)\\1/Ue", "pair_tokens('del', q1('\\2'))", $return, -1); - $return = preg_replace( "/(\+\+)([^\+]+)\\1/e", + $return = preg_replace( "/(\+\+)(.+)\\1/Ue", "pair_tokens('ins', q1('\\2'))", $return, -1); - $return = preg_replace( "/(\^\^)([^^]+)\\1/e", + $return = preg_replace( "/(\^\^)(.+)\\1/Ue", "pair_tokens('superscript', q1('\\2'))", $return, -1); - $return = preg_replace( "/(,,)([^,]+)\\1/e", + $return = preg_replace( "/(,,)(.+)\\1/Ue", "pair_tokens('subscript', q1('\\2'))", $return, -1); return $return; } else { |
From: Even H. <ho...@us...> - 2005-03-29 14:51:41
|
Update of /cvsroot/tavi/tavi/parse In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23690 Modified Files: transforms.php Log Message: Fixed TaviBug:1078260 Index: transforms.php =================================================================== RCS file: /cvsroot/tavi/tavi/parse/transforms.php,v retrieving revision 1.53 retrieving revision 1.54 diff -u -d -r1.53 -r1.54 --- transforms.php 29 Mar 2005 14:16:02 -0000 1.53 +++ transforms.php 29 Mar 2005 14:51:27 -0000 1.54 @@ -208,7 +208,7 @@ { global $UrlPtn, $InterwikiPtn; return preg_replace("/\\[($UrlPtn|$InterwikiPtn) ([^]]+)]/e", - "url_token(q1('\\1'),image_search('\\4'))", + "url_token(q1('\\1'),image_search(q1('\\4')))", $text, -1); } |
From: Even H. <ho...@us...> - 2005-03-29 14:16:16
|
Update of /cvsroot/tavi/tavi/parse In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4946 Modified Files: transforms.php Log Message: Fixed TaviBug:928949 Index: transforms.php =================================================================== RCS file: /cvsroot/tavi/tavi/parse/transforms.php,v retrieving revision 1.52 retrieving revision 1.53 diff -u -d -r1.52 -r1.53 --- transforms.php 1 Mar 2004 16:13:55 -0000 1.52 +++ transforms.php 29 Mar 2005 14:16:02 -0000 1.53 @@ -267,7 +267,12 @@ $args = strtok(''); if($ViewMacroEngine[$cmd] != '') - { return new_entity(array('raw', $ViewMacroEngine[$cmd]($args))); } + { + if ($cmd == 'Anchor') + { return new_entity(array('raw', $ViewMacroEngine[$cmd]($args)), 0); } + else + { return new_entity(array('raw', $ViewMacroEngine[$cmd]($args)), 1); } + } else { return '[[' . $macro . ']]' . ($trail == "\n" ? $trail : ''); } } |
From: Even H. <ho...@us...> - 2005-03-08 00:27:32
|
Update of /cvsroot/tavi/tavi/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7480 Added Files: captcha.php Log Message: Captcha, see www.captcha.net, is the art of creating an image a human must recognize, and enter to verify it's a human not a robot which is using the web pages. This file introduces this concept to 'Tavi, and gives the base functions to make this happen --- NEW FILE: captcha.php --- <?php // $Id: captcha.php,v 1.1 2005/03/08 00:27:21 holroy Exp $ /* * CAPTCHA, see http://www.captcha.net/, a project to make it harder * for spam-robots to automatic fill out forms. Now adapted for 'Tavi * * Original work done by: Jayesh Sheth, Cerulean Sky Creations, LLC, 2004 * ceruleansky.com * * Heavily modified, when entered into 'Tavi by: Even Holen * * The font library is based on a version from * http://www.thebobo.com/code/phpfiglet * And uses figlet fonts, see http://www.figlet.org/ for additional fonts * * The main purpose of this extension is to generate a random image based * on random characters. The user needs to enter these characters to be able * to save the changes he just made. */ /* // Dependencies: require("phpfiglet_class.php"); require("dir_to_array.php"); require("makerandpass.php"); */ // Renaming: // m.ake_ascii_phrase => generate_captcha // d.ir_to_array => get_figlet_fontlist // m.akerandpassarray => generate_phrase // /* _ _____ _ _ _ * ___ | |_ ___ | __||_| ___ | | ___ | |_ * | . || || . || __|| || . || || -_|| _| * | _||_|_|| _||__| |_||_ ||_||___||_| * |_| |_| |___| * * Author : Lucas Baltes (lu...@th...) * $Author: holroy $ * * Website : http://www.thebobo.com/ * * Date : $Date: 2005/03/08 00:27:21 $ * Rev : $Revision: 1.1 $ * * Copyright: 2003 - Lucas Baltes * License : GPL - http://www.gnu.org/licenses/gpl.html * * Purpose : Figlet font class * * Comments : phpFiglet is a php class to somewhat recreate the * functionality provided by the original figlet program * (http://www.figlet.org/). It does not (yet) support the * more advanced features like kerning or smushing. It can * use the same (flf2a) fonts as the original figlet program * (see their website for more fonts). * * Usage : $phpFiglet = new phpFiglet(); * * if ($phpFiglet->loadFont("fonts/standard.flf")) { * $phpFiglet->display("Hello World"); * } else { * trigger_error("Could not load font file"); * } * */ class phpFiglet { /* * Internal variables */ var $signature; var $hardblank; var $height; var $baseline; var $maxLenght; var $oldLayout; var $commentLines; var $printDirection; var $fullLayout; var $codeTagCount; var $fontFile; /* * Contructor */ function phpFiglet() { } /* * Load an flf font file. Return true on success, false on error. */ function loadfont($fontfile) { $this->fontFile = file($fontfile); if (!$this->fontFile) die("Couldnt open fontfile $fontfile\n"); $hp = explode(" ", $this->fontFile[0]); // get header $this->signature = substr($hp[0], 0, strlen($hp[0]) -1); $this->hardblank = substr($hp[0], strlen($hp[0]) -1, 1); $this->height = $hp[1]; $this->baseline = $hp[2]; $this->maxLenght = $hp[3]; $this->oldLayout = $hp[4]; $this->commentLines = $hp[5] + 1; $this->printDirection = $hp[6]; $this->fullLayout = $hp[7]; $this->codeTagCount = $hp[8]; unset($hp); if ($this->signature != "flf2a") { trigger_error("Unknown font version " . $this->signature . "\n"); return false; } else { return true; } } /* * Get a character as a string, or an array with one line * for each font height. */ function getCharacter($character, $asarray = false) { $asciValue = ord($character); $start = $this->commentLines + ($asciValue - 32) * $this->height; $data = ($asarray) ? array() : ""; for ($a = 0; $a < $this->height; $a++) { $tmp = $this->fontFile[$start + $a]; $tmp = str_replace("@", "", $tmp); //$tmp = trim($tmp); $tmp = str_replace($this->hardblank, " ", $tmp); if ($asarray) { $data[] = $tmp; } else { $data .= $tmp; } } return $data; } /* * Returns a figletized line of characters. */ function fetch($line) { $ret = ""; for ($i = 0; $i < (strlen($line)); $i++) { $data[] = $this->getCharacter($line[$i], true); } @reset($data); for ($i = 0; $i < $this->height; $i++) { while (list($k, $v) = each($data)) { $ret .= str_replace("\n", "", $v[$i]); } reset($data); $ret .= "\n"; } return $ret; } /* * Display (print) a figletized line of characters. */ function display($line) { print $this->fetch($line); } function ret_display($line) // J.S., 2004 { return $this->fetch($line); } } // End of class phpFiglet // Reads files from a directory, and filters according to extension function get_figlet_fontlist($dir, $fileExt) { $handle = opendir($dir); $dirfiles = array(); // Read all files from given directory while ($file = readdir($handle)) { // Filter out those with only one '.' and correct extension if (preg_match("/[^.]*\.$fileExt/", $file)) { $dirfiles[] = "$dir/$file"; // Store list of files in an array } } closedir($handle); if ( count($dirfiles) > 0 ) // Do not return array if it is empty { return $dirfiles; } } function generate_phrase($plength = 8) { $phrase = ''; for($i = 0; $i < $plength; $i++) { // Note numbers are not used, due to a mysterious bug in phpFiglet $letter = rand(65, 90);//65 - 90 is the ascii codes of capital letters $phrase .= chr($letter); } return $phrase; } // Returns a ascii art image of a random phrase, and the phrase // Inputs $phrlen as length of phrase function generate_captcha($phrlen) { // Load list of ascii art fonts in 'fonts' subdir into array $filelist = get_figlet_fontlist("\\temp\\fonts", "flf"); $phrase = generate_phrase($phrlen); if( is_array($filelist) && (strlen($phrase) == $phrlen) ) { $randstr_array = array(); // Holds ascii art components of phrase $phpFiglet = new phpFiglet(); // instantiate phpFiglet class /* Create the components for an ascii art phrase of the specified length. Use a random ascii art font and a random letter or number for each component of this phrase. */ // Build array of ascii art characters, based on characters in $phrase // Random font for each letter for ($i = 0; $i < $phrlen ; $i++) { // Choose random ascii art font $font_index = array_rand($filelist); $randomfont = $filelist[$font_index]; if ($phpFiglet->loadFont($randomfont)) { $randstr_array[] = $phpFiglet->ret_display(substr($phrase, $i, 1)); } else { //**** function only availabe from php 4.0.1... What is our demand on php version trigger_error("Could not load font file: $font_index"); } } return array($randstr_array, $phrase); } else { //**** function only availabe from php 4.0.1... What is our demand on php version trigger_error("Could not generate captcha-phrase"); echo "<p><strong>Could not generate captcha-phrase</strong></p>"; } } ?> |
From: Even H. <ho...@us...> - 2005-03-08 00:23:08
|
Update of /cvsroot/tavi/tavi/template In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5762/template Modified Files: edit.php wiki.css Log Message: Start of captcha-mechanisme to prevent spam. Finished until editing-part. Misses the save-part, still. And a start at the mysql 4.x timestamp-issue... Index: edit.php =================================================================== RCS file: /cvsroot/tavi/tavi/template/edit.php,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- edit.php 16 Dec 2003 20:29:27 -0000 1.11 +++ edit.php 8 Mar 2005 00:22:39 -0000 1.12 @@ -15,7 +15,7 @@ function template_edit($args) { - global $EditRows, $EditCols, $UserName, $PrefsScript; + global $EditRows, $EditCols, $UserName, $PrefsScript, $UseCaptcha; template_common_prologue(array('norobots' => 1, 'title' => TMPL_Editing .' '. $args['page'], @@ -27,7 +27,13 @@ <div id="body"> <form method="post" action="<?php print saveURL($args['page']); ?>"> <div class="form"> -<input type="submit" name="Save" value="<?php echo TMPL_ButtonSave; ?>" /> +<?php + if ($UseCaptcha) { + $formTxt = 'When saving, enter the following:<br>'. + '<input name="posted_code" value="" type="text" size="20" />'; + echo html_captcha($args['captcha'], $formTxt); + } + ?><input type="submit" name="Save" value="<?php echo TMPL_ButtonSave; ?>" /> <input type="submit" name="Preview" value="<?php echo TMPL_ButtonPreview; ?>" /> <?php if($UserName != '') Index: wiki.css =================================================================== RCS file: /cvsroot/tavi/tavi/template/wiki.css,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- wiki.css 28 Oct 2003 16:47:34 -0000 1.13 +++ wiki.css 8 Mar 2005 00:22:39 -0000 1.14 @@ -76,6 +76,10 @@ .phpsource span.string { color: #CC0000; } .phpsource span.comment { color: #FF9900; } +table.codephr {float: right} +td.codephr {font-size: 7px} +td.codehdr {vertical-align: top} + @media print { body { background-color: #ffffff; color: #000000; } div#header #toolbar-top { display: none; } |
From: Even H. <ho...@us...> - 2005-03-08 00:23:07
|
Update of /cvsroot/tavi/tavi In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5762 Modified Files: ChangeLog.txt Log Message: Start of captcha-mechanisme to prevent spam. Finished until editing-part. Misses the save-part, still. And a start at the mysql 4.x timestamp-issue... Index: ChangeLog.txt =================================================================== RCS file: /cvsroot/tavi/tavi/ChangeLog.txt,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- ChangeLog.txt 16 Dec 2003 21:20:12 -0000 1.17 +++ ChangeLog.txt 8 Mar 2005 00:22:38 -0000 1.18 @@ -2,7 +2,21 @@ WikkiTikkiTavi - ChangeLog -------------------------- -2003-12-16 Even Holen <evenh+tavi$pvv.ntnu.no> +2004-03-01 Even Hoeln <eve...@pv...> + * Fixed bug regarding timestamps showing as link + * Removed $AuthorDiff from source + * Fixed bugs in TitleSearch-macro, and added functionality + * Changed reference to TemplateDir in action/admin.php + * Surround time-value with quotes, due to MySQL 4 + * Fixed bug with (((free links)) and left parenthesis + * Allowed international character in Interwiki entries + * Extended Transclude to allow offsetting of header level + +2004-02-10 Even Holen <eve...@pv...> + * Fixed bugs regarding line continuations + * Fixed bugs related to translation of user interface + +2003-12-16 Even Holen <eve...@pv...> * ** Version 0.25 released ** * Added system to allow for translation of user interface |
From: Even H. <ho...@us...> - 2005-03-08 00:23:07
|
Update of /cvsroot/tavi/tavi/parse In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5762/parse Modified Files: html.php Log Message: Start of captcha-mechanisme to prevent spam. Finished until editing-part. Misses the save-part, still. And a start at the mysql 4.x timestamp-issue... Index: html.php =================================================================== RCS file: /cvsroot/tavi/tavi/parse/html.php,v retrieving revision 1.35 retrieving revision 1.36 diff -u -d -r1.35 -r1.36 --- html.php 10 Feb 2004 23:30:05 -0000 1.35 +++ html.php 8 Mar 2005 00:22:39 -0000 1.36 @@ -244,10 +244,19 @@ function html_timestamp($timestamp) { global $TimeZoneOff; - $time = mktime(substr($timestamp, 8, 2), substr($timestamp, 10, 2), - substr($timestamp, 12, 2), substr($timestamp, 4, 2), - substr($timestamp, 6, 2), substr($timestamp, 0, 4)); - return date('Y.m.d H:i:s', $time + $TimeZoneOff * 60); + $mysqlVer = mysql_get_server_info(); + if (!preg_match("/^4\./", $mysqlVer)) + { + $time = mktime(substr($timestamp, 8, 2), substr($timestamp, 10, 2), + substr($timestamp, 12, 2), substr($timestamp, 4, 2), + substr($timestamp, 6, 2), substr($timestamp, 0, 4)); + return date('Y.m.d H:i:s', $time + $TimeZoneOff * 60); + } + else + { + // This need more tuning according to sql_mode: MAXDB-setting, DATETIME vs TIMESTAMP + return "4: " . $timestamp; // NOT corrected according to $TimeZoneOFf?! + } } function html_url($url, $text) { @@ -458,4 +467,19 @@ { return ""; } } + +function html_captcha($array, $formTxt) +{ + // Input is ascii art images, which needs to be combined + // horisontally. Easiest way is by using a table, and so it is... + $output = "<table class=\"codephr\">\n <tr>\n"; + $output .= " <td class=\"codehdr\">$formTxt</td>\n"; + for ($i = 0; $i < count($array); $i++) + { + $output .= " <td class=\"codephr\"><pre>" . $array[$i] . "</pre></td>"; + } + $output .= " </tr>\n</table>\n"; + + return $output; +} ?> \ No newline at end of file |
From: Even H. <ho...@us...> - 2005-03-08 00:23:06
|
Update of /cvsroot/tavi/tavi/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5762/lib Modified Files: defaults.php Log Message: Start of captcha-mechanisme to prevent spam. Finished until editing-part. Misses the save-part, still. And a start at the mysql 4.x timestamp-issue... Index: defaults.php =================================================================== RCS file: /cvsroot/tavi/tavi/lib/defaults.php,v retrieving revision 1.20 retrieving revision 1.21 diff -u -d -r1.20 -r1.21 --- defaults.php 1 Mar 2004 16:13:09 -0000 1.20 +++ defaults.php 8 Mar 2005 00:22:39 -0000 1.21 @@ -126,6 +126,11 @@ // amount of time. $RateEdit = 20; +// $UseCaptcha, if set, generates a random phrase, and presents it as a +// ascii art. When saving the user needs to correctly identify this phrase +// to be able to save the changes made +$UseCaptcha = 1; + // $TempDir determines the location of temp files used for computing diffs. // The default makes a choice based on the environment $TempDir = isset($_ENV['TMP']) ? $_ENV['TMP'] : |
From: Even H. <ho...@us...> - 2005-03-08 00:23:06
|
Update of /cvsroot/tavi/tavi/action In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5762/action Modified Files: edit.php Log Message: Start of captcha-mechanisme to prevent spam. Finished until editing-part. Misses the save-part, still. And a start at the mysql 4.x timestamp-issue... Index: edit.php =================================================================== RCS file: /cvsroot/tavi/tavi/action/edit.php,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- edit.php 16 Dec 2003 20:23:08 -0000 1.7 +++ edit.php 8 Mar 2005 00:22:39 -0000 1.8 @@ -2,12 +2,13 @@ // $Id$ require('parse/html.php'); +require('lib/captcha.php'); require(TemplateDir . '/edit.php'); // Edit a page (possibly an archive version). function action_edit() { - global $page, $pagestore, $ParseEngine, $version; + global $page, $pagestore, $ParseEngine, $version, $UseCaptcha; $pg = $pagestore->page($page); $pg->read(); @@ -22,11 +23,36 @@ $pg->read(); $archive = 1; } - + + if ($UseCaptcha) + { + // Build the Captcha, of given length + $aphrase_arr = generate_captcha(5); + if (! is_array($aphrase_arr) ) + { + echo "<p> Error: could not retrieve array. </p>"; + exit(); //*** This is not especially graceful... ;-/ + } + else + { + $aphrase_ascii = $aphrase_arr[0]; + $aphrase_orig = $aphrase_arr[1]; + } + + // Store ASCII Art phrase in session variable + session_name("taviCaptcha"); + session_start(); + $_SESSION['captcha_phrase'] = $aphrase_orig; + } else { + $aphrase_ascii = ''; + } + template_edit(array('page' => $page, 'text' => $pg->text, 'timestamp' => $pg->time, 'nextver' => $pg->version + 1, - 'archive' => $archive)); + 'archive' => $archive, + 'captcha' => $aphrase_ascii)); + } ?> |
From: Even H. <ho...@us...> - 2004-03-01 16:39:02
|
Update of /cvsroot/tavi/tavi/parse In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6887 Modified Files: macros.php Log Message: Change default index character in TitleSearch-macro Index: macros.php =================================================================== RCS file: /cvsroot/tavi/tavi/parse/macros.php,v retrieving revision 1.21 retrieving revision 1.22 diff -u -d -r1.21 -r1.22 --- macros.php 1 Mar 2004 16:13:55 -0000 1.21 +++ macros.php 1 Mar 2004 16:27:49 -0000 1.22 @@ -272,7 +272,10 @@ if (is_numeric($value)) { $indexCharNo = $value -1; } else { - $indexCharNo = 0; + // Default to first character displayed of result + $indexCharNo = strpos($search, '(') -1; + if ($indexCharNo < 0 ) + { $indexCharNo =0; } } } } |
From: Even H. <ho...@us...> - 2004-03-01 16:25:48
|
Update of /cvsroot/tavi/tavi/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3530 Modified Files: init.php Log Message: Extended Transclude-macro to allow shifting the header level Index: init.php =================================================================== RCS file: /cvsroot/tavi/tavi/lib/init.php,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- init.php 1 Mar 2004 13:15:42 -0000 1.15 +++ init.php 1 Mar 2004 16:14:36 -0000 1.16 @@ -21,6 +21,10 @@ $pagestore = new PageStore(); $db = $pagestore->dbh; +// $HeadingOffset determines which offset all headings begin with. +// This is used when transcluding files combined with changing heading levels +$HeadingOffset = 0; + $Entity = array(); // Global parser entity list. $RefList = array(); // Array of referenced links, see view_macro_reflist |
From: Even H. <ho...@us...> - 2004-03-01 16:25:03
|
Update of /cvsroot/tavi/tavi/parse In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3378 Modified Files: macros.php transforms.php Log Message: Extended Transclude-macro to allow shifting the header level Index: macros.php =================================================================== RCS file: /cvsroot/tavi/tavi/parse/macros.php,v retrieving revision 1.20 retrieving revision 1.21 diff -u -d -r1.20 -r1.21 --- macros.php 1 Mar 2004 13:51:52 -0000 1.20 +++ macros.php 1 Mar 2004 16:13:55 -0000 1.21 @@ -419,24 +419,31 @@ // This macro transcludes another page into a wiki page. function view_macro_transclude($args) { - global $pagestore, $ParseEngine, $ParseObject; + global $pagestore, $ParseEngine, $ParseObject, $HeadingOffset; static $visited_array = array(); static $visited_count = 0; - - if(!validate_page($args)) + + $previousHeadingOffset = $HeadingOffset; // Backup previous version + + // Check for CurlyOptions, and split them + preg_match("/^(?:\s*{([^]]*)})?\s*(.*)$/", $args, $arg); + $options = split(',', $arg[1]); + $page = $arg[2]; + + if(!validate_page($page)) { return '[[Transclude ' . $args . ']]'; } $visited_array[$visited_count++] = $ParseObject; for($i = 0; $i < $visited_count; $i++) { - if($visited_array[$i] == $args) + if($visited_array[$i] == $page) { $visited_count--; return '[[Transclude ' . $args . ']]'; } } - $pg = $pagestore->page($args); + $pg = $pagestore->page($page); $pg->read(); if(!$pg->exists) { @@ -444,8 +451,19 @@ return '[[Transclude ' . $args . ']]'; } - $result = parseText($pg->text, $ParseEngine, $args); + // Check for CurlyOptions affecting transclusion + // Parse options + foreach ($options as $opt) { + list($name, $value) = split('=', $opt); + $name=strtolower($name); + if ($name[0]=='o') { // Offset - Adds to header levels in transcluded docs + $HeadingOffset = $previousHeadingOffset + (($value=='') ? 1 : $value); + } + } + + $result = parseText($pg->text, $ParseEngine, $page); $visited_count--; + $HeadingOffset = $previousHeadingOffset; // Restore offset return $result; } function view_macro_reflist($args) Index: transforms.php =================================================================== RCS file: /cvsroot/tavi/tavi/parse/transforms.php,v retrieving revision 1.51 retrieving revision 1.52 diff -u -d -r1.51 -r1.52 --- transforms.php 1 Mar 2004 14:44:04 -0000 1.51 +++ transforms.php 1 Mar 2004 16:13:55 -0000 1.52 @@ -558,7 +558,7 @@ function parse_heading($text) { - global $MaxHeading; + global $MaxHeading, $HeadingOffset; if(!preg_match('/^\s*(=+) (.*) (=+)\s*$/', $text, $result)) { return $text; } @@ -566,7 +566,8 @@ if(strlen($result[1]) != strlen($result[3])) { return $text; } - if(($level = strlen($result[1])) > $MaxHeading) + $level = strlen($result[1]) + $HeadingOffset; + if($level > $MaxHeading) { $level = $MaxHeading; } return new_entity(array('head_start', $level)) . |
From: Even H. <ho...@us...> - 2004-03-01 16:24:29
|
Update of /cvsroot/tavi/tavi/parse In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3239 Modified Files: save.php Log Message: Fixed TaviBug:907605: Allowing international characters as interwiki entries Index: save.php =================================================================== RCS file: /cvsroot/tavi/tavi/parse/save.php,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- save.php 2 Dec 2003 22:34:14 -0000 1.9 +++ save.php 1 Mar 2004 16:13:22 -0000 1.10 @@ -67,7 +67,7 @@ $called = 1; } - if(preg_match('/^\*InterWiki:\s+\!?([A-Za-z]+)\s+((?:https?|file):[^\s]+)/', + if(preg_match('/^\*InterWiki:\s+\!?([A-Za-z\xc0-\xfe0-9]+)\s+((?:https?|file):[^\s]+)/', $text, $result)) { $pagestore->new_interwiki($page, $result[1], $result[2]); |
From: Even H. <ho...@us...> - 2004-03-01 16:24:17
|
Update of /cvsroot/tavi/tavi/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3188 Modified Files: defaults.php Log Message: Fixed TaviBug:907605: Allowing international characters as interwiki entries Index: defaults.php =================================================================== RCS file: /cvsroot/tavi/tavi/lib/defaults.php,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- defaults.php 1 Mar 2004 13:15:41 -0000 1.19 +++ defaults.php 1 Mar 2004 16:13:09 -0000 1.20 @@ -26,7 +26,7 @@ "(?:[^ |\\/\"\']*\\/)*[^ |\\t\\n\\/\"\']*[A-Za-z0-9\\/?=&~_]"; // $InterWikiPtn establishes the format for InterWiki links in this wiki. -$InterwikiPtn = "([A-Za-z0-9]+):" . +$InterwikiPtn = "([A-Za-z0-9\xc0-\xfe]+):" . "((?:[^ |\\/\"\']*\\/)*[^ |\\t\\n\\/\"\']*[\\/=&~A-Za-z0-9])"; // Note: To avoid side effect of using parentheses in both $LinkPtn, $UrlPtn and // $InterwikiPtn the special syntax (?: is used. This hides the parentheses |