update to latest dotclear namespace

This commit is contained in:
Jean-Christian Paul Denis 2023-05-01 01:02:51 +02:00
parent 376a4f4049
commit a036d037ac
Signed by: JcDenis
GPG Key ID: 1B5B8C5B90B6C951

View File

@ -14,9 +14,9 @@ declare(strict_types=1);
namespace Dotclear\Plugin\alias; namespace Dotclear\Plugin\alias;
use dbStruct;
use dcCore; use dcCore;
use dcNsProcess; use dcNsProcess;
use Dotclear\Database\Structure;
use Exception; use Exception;
class Install extends dcNsProcess class Install extends dcNsProcess
@ -35,13 +35,13 @@ class Install extends dcNsProcess
} }
try { try {
$s = new dbStruct(dcCore::app()->con, dcCore::app()->prefix); $s = new Structure(dcCore::app()->con, dcCore::app()->prefix);
$s->{My::ALIAS_TABLE_NAME} $s->__get(My::ALIAS_TABLE_NAME)
->blog_id('varchar', 32, false) ->field('blog_id', 'varchar', 32, false)
->alias_url('varchar', 255, false) ->field('alias_url', 'varchar', 255, false)
->alias_destination('varchar', 255, false) ->field('alias_destination', 'varchar', 255, false)
->alias_position('smallint', 0, false, 1) ->field('alias_position', 'smallint', 0, false, 1)
->alias_redirect('smallint', 0, false, 0) ->field('alias_redirect', 'smallint', 0, false, 0)
->primary('pk_alias', 'blog_id', 'alias_url') ->primary('pk_alias', 'blog_id', 'alias_url')
@ -51,7 +51,7 @@ class Install extends dcNsProcess
->reference('fk_alias_blog', 'blog_id', 'blog', 'blog_id', 'cascade', 'cascade') ->reference('fk_alias_blog', 'blog_id', 'blog', 'blog_id', 'cascade', 'cascade')
; ;
(new dbStruct(dcCore::app()->con, dcCore::app()->prefix))->synchronize($s); (new Structure(dcCore::app()->con, dcCore::app()->prefix))->synchronize($s);
return true; return true;
} catch (Exception $e) { } catch (Exception $e) {