Version 4.7.6
This commit is contained in:
1 parent
8ba7d43898
commit
7b7404e741
1085 files changed
+30590
-7837
No files matched your search
@@ -822,6 +822,8 @@ class _databases extends \IPS\Node\Controller
|
||||
|
||||
@unlink( \IPS\Request::i()->file );
|
||||
|
||||
\IPS\Session::i()->log( 'acplogs__cms_imported_database', array( 'content_db_' . $database->id => TRUE ) );
|
||||
|
||||
/* Done */
|
||||
\IPS\Output::i()->redirect( \IPS\Http\Url::internal( 'app=cms&module=databases&controller=databases&do=permissions&id=' . $databaseId ) );
|
||||
}
|
||||
@@ -1095,6 +1097,8 @@ class _databases extends \IPS\Node\Controller
|
||||
$xml->endDocument();
|
||||
|
||||
$name = addslashes( str_replace( array( ' ', '.', ',' ), '_', \IPS\Member::loggedIn()->language()->get( 'content_db_' . $database->_id ) ) . '.xml' );
|
||||
|
||||
\IPS\Session::i()->log( 'acplogs__cms_downloaded_database', array( 'content_db_' . $database->id => TRUE ) );
|
||||
|
||||
\IPS\Output::i()->sendOutput( $xml->outputMemory(), 200, 'application/xml', array( 'Content-Disposition' => \IPS\Output::getContentDisposition( 'attachment', $name ) ) );
|
||||
}
|
||||
@@ -1216,6 +1220,7 @@ class _databases extends \IPS\Node\Controller
|
||||
if ( isset( \IPS\Request::i()->process ) )
|
||||
{
|
||||
\IPS\Task::queue( 'cms', 'ResyncTopicContent', array( 'databaseId' => \IPS\Request::i()->id ), 3, array( 'databaseId' ) );
|
||||
\IPS\Session::i()->log( 'acplogs__cms_database_topic_resync', array( \IPS\cms\Databases::load( \IPS\Request::i()->id )->_title => TRUE ) );
|
||||
\IPS\Output::i()->redirect( \IPS\Http\Url::internal( 'app=cms&module=databases&controller=databases&do=form&id=' . \IPS\Request::i()->id ), 'database_rebuild_added' );
|
||||
}
|
||||
else
|
||||
@@ -1235,6 +1240,7 @@ class _databases extends \IPS\Node\Controller
|
||||
{
|
||||
\IPS\Session::i()->csrfCheck();
|
||||
\IPS\Task::queue( 'core', 'RebuildItemCounts', array( 'class' => 'IPS\cms\Records' . \IPS\Request::i()->id ), 3, array( 'class' ) );
|
||||
\IPS\Session::i()->log( 'acplogs__cms_database_comments_recount', array( \IPS\cms\Databases::load( \IPS\Request::i()->id )->_title => TRUE ) );
|
||||
\IPS\Output::i()->redirect( \IPS\Http\Url::internal( 'app=cms&module=databases&controller=databases&do=form&id=' . \IPS\Request::i()->id ), 'database_rebuild_added' );
|
||||
}
|
||||
else
|
||||
@@ -1874,30 +1880,40 @@ class _databases extends \IPS\Node\Controller
|
||||
{
|
||||
$form->addMessage( 'cms_no_db_page_no_forum_link', 'ipsMessage ipsMessage_info' );
|
||||
}
|
||||
|
||||
|
||||
$disabled = FALSE;
|
||||
if ( $current )
|
||||
{
|
||||
$rebuildUrl = \IPS\Http\Url::internal( 'app=cms&module=databases&controller=databases&id=' . $current->id . '&do=rebuildTopicContent' );
|
||||
$rebuildUrlCounts = \IPS\Http\Url::internal( 'app=cms&module=databases&controller=databases&id=' . $current->id . '&do=rebuildCommentCounts' );
|
||||
|
||||
\IPS\Member::loggedIn()->language()->words['database_forum_record_desc'] = \IPS\Member::loggedIn()->language()->addToStack( 'database_forum_record__desc' ) . ' ' .
|
||||
\IPS\Member::loggedIn()->language()->addToStack( 'database_forum_record__rebuild', FALSE, array( 'sprintf' => array( $rebuildUrl ) ) ) . ' ' .
|
||||
\IPS\Member::loggedIn()->language()->addToStack( 'database_forum_comments__rebuild', FALSE, array( 'sprintf' => array( $rebuildUrlCounts ) ) );
|
||||
\IPS\Member::loggedIn()->language()->addToStack( 'database_forum_record__rebuild', FALSE, array( 'sprintf' => array( $rebuildUrl ) ) ) . ' ' .
|
||||
\IPS\Member::loggedIn()->language()->addToStack( 'database_forum_comments__rebuild', FALSE, array( 'sprintf' => array( $rebuildUrlCounts ) ) );
|
||||
|
||||
try
|
||||
{
|
||||
\IPS\Db::i()->select( '*', 'core_queue', [ "`app`=? AND `key`=? AND `data` LIKE CONCAT( '%', ?, '%' )", 'cms', 'MoveComments', 'databaseID":' . $current->id ] )->first();
|
||||
\IPS\Member::loggedIn()->language()->words['database_forum_record_desc'] .= \IPS\Member::loggedIn()->language()->addToStack( 'database_forum_comments_in_progress' );
|
||||
$disabled = true;
|
||||
}
|
||||
catch( \UnderflowException $e ) { }
|
||||
}
|
||||
else
|
||||
{
|
||||
\IPS\Member::loggedIn()->language()->words['database_forum_record_desc'] = \IPS\Member::loggedIn()->language()->addToStack( 'database_forum_record__desc' );
|
||||
}
|
||||
|
||||
|
||||
$form->add( new \IPS\Helpers\Form\YesNo( 'database_forum_record', $current ? $current->forum_record : FALSE, FALSE, array( 'togglesOn' => array(
|
||||
'database_forum_comments',
|
||||
'database_forum_forum',
|
||||
'database_forum_prefix',
|
||||
'database_forum_suffix',
|
||||
'database_forum_delete'
|
||||
) ), NULL, NULL, NULL, 'database_forum_record' ) );
|
||||
|
||||
$form->add( new \IPS\Helpers\Form\YesNo( 'database_forum_comments', $current ? $current->forum_comments : FALSE, FALSE, array(), NULL, NULL, NULL, 'database_forum_comments' ) );
|
||||
),
|
||||
'disabled' => $disabled ), NULL, NULL, NULL, 'database_forum_record' ) );
|
||||
|
||||
$form->add( new \IPS\Helpers\Form\YesNo( 'database_forum_comments', $current ? $current->forum_comments : FALSE, FALSE, array( 'disabled' => $disabled ), NULL, NULL, NULL, 'database_forum_comments' ) );
|
||||
|
||||
$form->add( new \IPS\Helpers\Form\Node( 'database_forum_forum', $current ? $current->forum_forum : NULL, FALSE, array(
|
||||
'class' => '\IPS\forums\Forum',
|
||||
|
||||
Reference in new issue
Block a user