typo cause index to fail; fixed minor issues with static pages

This commit is contained in:
real_nowhereman 2009-02-04 22:46:20 +00:00
parent d5e666a1a1
commit f153a25b39
3 changed files with 5 additions and 3 deletions

View File

@ -1778,6 +1778,8 @@ class BPlusTree {
*/ */
function setitem($key, $val) { function setitem($key, $val) {
if (!is_numeric($val))
trigger_error("Second parameter must be numeric", E_USER_ERROR);
$curr_length = $this->length; $curr_length = $this->length;
$root =& $this->root; $root =& $this->root;
if (is_null($root)) trigger_error("not open", E_USER_ERROR); if (is_null($root)) trigger_error("not open", E_USER_ERROR);

View File

@ -109,7 +109,7 @@
if (!$update_title) if (!$update_title)
$seek = $main->has_key($key, $val); $seek = $main->has_key($key, $val);
if (is_numeric($seek)) if (!is_numeric($seek))
$seek = $main->setitem($key, $val); $seek = $main->setitem($key, $val);
if (isset($entry['categories']) && is_array($entry['categories'])) { if (isset($entry['categories']) && is_array($entry['categories'])) {
foreach ($entry['categories'] as $cat) { foreach ($entry['categories'] as $cat) {

View File

@ -35,8 +35,8 @@
function static_save($entry, $id, $oldid=null) { function static_save($entry, $id, $oldid=null) {
$fname = STATIC_DIR . $id . EXT; $fname = STATIC_DIR . $id . EXT;
$entry['CONTENT'] = apply_filters('content_save_pre', $entry['CONTENT']); $entry['content'] = apply_filters('content_save_pre', $entry['content']);
$entry['SUBJECT'] = apply_filters('title_save_pre', $entry['SUBJECT']); $entry['subject'] = apply_filters('title_save_pre', $entry['subject']);
$str = utils_kimplode($entry); $str = utils_kimplode($entry);