cvs: docweb /include lib_phpt_generator.inc.php

From: Date: Wed, 04 Oct 2006 17:07:25 +0000
Subject: cvs: docweb /include lib_phpt_generator.inc.php
Groups: php.doc.web 
Request: Send a blank email to doc-web+get-897@lists.php.net to get a copy of this message
colder Wed Oct 4 17:07:25 2006 UTC Modified files: /docweb/include lib_phpt_generator.inc.php Log: Fix bug (Unable to un-approve an item) and remove the extra slash http://cvs.php.net/viewvc.cgi/docweb/include/lib_phpt_generator.inc.php?r1=1.1&r2=1.2&diff_format=u Index: docweb/include/lib_phpt_generator.inc.php diff -u docweb/include/lib_phpt_generator.inc.php:1.1 docweb/include/lib_phpt_generator.inc.php:1.2 --- docweb/include/lib_phpt_generator.inc.php:1.1 Tue Oct 3 23:22:28 2006 +++ docweb/include/lib_phpt_generator.inc.php Wed Oct 4 17:07:25 2006 @@ -15,14 +15,14 @@ +----------------------------------------------------------------------+ | Authors: Etienne Kneuss <colder@php.net> | +----------------------------------------------------------------------+ -$Id: lib_phpt_generator.inc.php,v 1.1 2006/10/03 23:22:28 colder Exp $ +$Id: lib_phpt_generator.inc.php,v 1.2 2006/10/04 17:07:25 colder Exp $ */ /** * Parameters */ define('PHPT_EOL', "\n"); define('PHPT_SQLITE_FILE', SQLITE_DIR . 'tests.sqlite'); -define('PHPT_DOC_PATH', CVS_DIR.'/phpdoc-all/en/'); +define('PHPT_DOC_PATH', CVS_DIR.'phpdoc-all/en/'); define('PHPT_LIMIT_RESULTS', 200); @@ -244,7 +244,6 @@ $title = preg_replace('#<function>([\w_-]+)</function>#', '\1()', $matches[1][$key]); - //$example = preg_replace('/print_r(\s+)\(/', 'var_dump\1(', $example); // let's create the entry @@ -399,9 +398,9 @@ $test = !empty($input['test']) ? sqlite_escape_string(phpt_clean_ws($input['test'])) : ''; $skipif = !empty($input['skipif']) ? sqlite_escape_string(phpt_clean_ws($input['skipif'])) : ''; $expected = !empty($input['expected']) ? sqlite_escape_string(phpt_clean_ws($input['expected'])) : ''; - $flags = isset($input['approve']) ? PHPT_FLAG_APPROVED : 0; + $flags = isset($input['approve']) ? '(flags | '.PHPT_FLAG_APPROVED.')' : '(flags & ~'.PHPT_FLAG_APPROVED.')'; if (!empty($expected)) { - $flags |= PHPT_FLAG_FILLED; + $flags .= ' | '.PHPT_FLAG_FILLED; } $sql_query = "UPDATE tests SET edit_date = datetime('now'), @@ -409,7 +408,7 @@ test = '$test', skipif = '$skipif', expected = '$expected', - flags = flags | $flags + flags = ($flags) WHERE id = ".intval($input['editId']); //echo $sql_query; return @sqlite_exec($sqlite, $sql_query);

« previous php.doc.web (#897) next »