diff --git a/include/class.topic.php b/include/class.topic.php index ba9e1a82788c2d83c345f28f4b5f52b52de8ffe5..181b7a107f7c673dd9b54d772c91cfcd4de3bd1e 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 5e3904e62d1ba00ccf14b1537d851bb8a81f6d6c..4b0ef139d73f36f3162c0b8c9fadc67fdfe92f4b 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() {} +} + ?>