cosmetic
This commit is contained in:
parent
d8dd602fd2
commit
50bdbd4f53
2 changed files with 5 additions and 8 deletions
|
@ -24,8 +24,8 @@ try {
|
|||
}
|
||||
|
||||
// Table is the same for plugins pollsFactory, postTask, postWidgetText
|
||||
$s = new dbStruct(dcCore::app()->con, dcCore::app()->prefix);
|
||||
$s->{initPostWidgetText::PWT_TABLE_NAME}
|
||||
$st = new dbStruct(dcCore::app()->con, dcCore::app()->prefix);
|
||||
$st->{initPostWidgetText::PWT_TABLE_NAME}
|
||||
->option_id('bigint', 0, false)
|
||||
->post_id('bigint', 0, false)
|
||||
->option_creadt('timestamp', 0, false, 'now()')
|
||||
|
@ -42,7 +42,7 @@ try {
|
|||
->index('idx_post_option_type', 'btree', 'option_type');
|
||||
|
||||
$si = new dbStruct(dcCore::app()->con, dcCore::app()->prefix);
|
||||
$changes = $si->synchronize($s);
|
||||
$changes = $si->synchronize($st);
|
||||
|
||||
$current = dcCore::app()->getVersion(basename(__DIR__));
|
||||
|
||||
|
|
|
@ -53,11 +53,8 @@ class postWidgetTextWidget
|
|||
|
||||
public static function display($w)
|
||||
{
|
||||
if ($w->offline) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (!dcCore::app()->blog->settings->get(basename(__DIR__))->get('active')
|
||||
if ($w->offline
|
||||
|| !dcCore::app()->blog->settings->get(basename(__DIR__))->get('active')
|
||||
|| !dcCore::app()->ctx->exists('posts')
|
||||
|| !dcCore::app()->ctx->__get('posts')->post_id
|
||||
) {
|
||||
|
|
Loading…
Reference in a new issue