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