public static function enable($name)
    {
        $obj = self::getInstance($name);

        // If not installed, install it
        if (self::__requiresInstallation($name) && $obj->install() === false) {
            // If the installation failed, run the uninstall method which
            // should rollback the install method. #1326
            $obj->uninstall();
            return false;

            // If the extension requires updating before enabling, then update it
        } elseif (($about = self::about($name)) && ($previousVersion = self::__requiresUpdate($name, $about['version'])) !== false) {
            $obj->update($previousVersion);
        }

        if (!isset($about)) {
            $about = self::about($name);
        }

        $id = self::fetchExtensionID($name);

        $fields = array(
            'name' => $name,
            'status' => 'enabled',
            'version' => $about['version']
        );

        // If there's no $id, the extension needs to be installed
        if (is_null($id)) {
            Symphony::Database()->insert($fields, 'tbl_extensions');
            self::__buildExtensionList(true);

            // Extension is installed, so update!
        } else {
            Symphony::Database()->update($fields, 'tbl_extensions', sprintf(" `id` = %d ", $id));
        }

        self::registerDelegates($name);

        // Now enable the extension
        $obj->enable();

        return true;
    }