From 9f8d850ce04230f69afc7b3960726219da9fd74f Mon Sep 17 00:00:00 2001 From: Peter Rotich <peter@osticket.com> Date: Tue, 2 Dec 2014 05:39:20 +0000 Subject: [PATCH] oops: Fix help topic create --- include/class.topic.php | 11 +---------- setup/test/tests/stubs.php | 29 +++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 10 deletions(-) diff --git a/include/class.topic.php b/include/class.topic.php index ba9e1a827..181b7a107 100644 --- a/include/class.topic.php +++ b/include/class.topic.php @@ -52,15 +52,6 @@ class Topic extends VerySimpleModel { const FLAG_CUSTOM_NUMBERS = 0x0001; - function __onload() { - global $cfg; - - // Handle upgrade case where sort has not yet been defined - if (!$this->ht['sort'] && $cfg->getTopicSortMode() == 'a') { - static::updateSortOrder(); - } - } - function asVar() { return $this->getName(); } @@ -260,7 +251,7 @@ class Topic extends VerySimpleModel { static function __create($vars, &$errors) { $topic = self::create(); - $topic->save($vars, $errors); + $topic->update($vars, $errors); return $topic; } diff --git a/setup/test/tests/stubs.php b/setup/test/tests/stubs.php index 5e3904e62..4b0ef139d 100644 --- a/setup/test/tests/stubs.php +++ b/setup/test/tests/stubs.php @@ -30,6 +30,7 @@ class mysqli_stmt { class mysqli_result { function free() {} function free_result() {} + function fetch_fields() {} } class ReflectionClass { @@ -122,4 +123,32 @@ class IntlBreakIterator { class SqlFunction { static function NOW() {} } + +class SqlExpression { + static function plus() {} +} + +class SqlInterval { + static function MINUTE() {} + static function DAY() {} +} + +class SqlAggregate { + static function COUNT() {} +} + +class Q { + static function ANY() {} +} + +class IntlDateFormatter { + function setPattern() {} + function getPattern() {} + function parse() {} +} + +class ResourceBundle { + function getLocales() {} +} + ?> -- GitLab