Version 4.3.0
This commit is contained in:
1 parent
96997ddd8e
commit
fe1acf984a
1349 files changed
+116159
-67711
No files matched your search
@@ -175,7 +175,7 @@ class _DeletionLog extends \IPS\Patterns\ActiveRecord
|
||||
$this->content_id = $content->$idField;
|
||||
$this->content_title = $item->mapped('title');
|
||||
$this->content_seo_title = \IPS\Http\Url\Friendly::seoTitle( $item->mapped('title') );
|
||||
$this->content_permissions = $item->searchIndexPermissions();
|
||||
$this->content_permissions = $item->deleteLogPermissions();
|
||||
|
||||
/* Member Data */
|
||||
$this->deleted_by = $member;
|
||||
@@ -260,9 +260,28 @@ class _DeletionLog extends \IPS\Patterns\ActiveRecord
|
||||
{
|
||||
if ( $action === NULL )
|
||||
{
|
||||
$class = $this->content_class;
|
||||
$item = $class::load( $this->content_id );
|
||||
return $item->url()->setQueryString( 'showDeleted', 1 );
|
||||
try
|
||||
{
|
||||
$class = $this->content_class;
|
||||
if ( class_exists( $this->content_class ) )
|
||||
{
|
||||
$item = $class::load( $this->content_id );
|
||||
return $item->url()->setQueryString( 'showDeleted', 1 );
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Content class doesn't exist anymore */
|
||||
$this->delete();
|
||||
return \IPS\Http\Url::internal( "app=core&module=modcp&controller=modcp&tab=deleted", 'front', 'modcp_deleted' )->setQueryString( array( 'id' => $this->id, 'action' => $action ) );
|
||||
}
|
||||
}
|
||||
catch( \OutOfRangeException $e )
|
||||
{
|
||||
/* Orphaned item */
|
||||
$this->delete();
|
||||
|
||||
return \IPS\Http\Url::internal( "app=core&module=modcp&controller=modcp&tab=deleted", 'front', 'modcp_deleted' )->setQueryString( array( 'id' => $this->id, 'action' => $action ) );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -53,7 +53,11 @@ class _Table extends \IPS\Helpers\Table\Table
|
||||
/* Where Clause */
|
||||
$where = array();
|
||||
$where[] = array( "(dellog_content_permissions=? OR " . \IPS\Db::i()->findInSet( 'dellog_content_permissions', \IPS\Member::loggedIn()->groups ) . " OR " . \IPS\Db::i()->findInSet( 'dellog_content_permissions', array( 'm' . \IPS\Member::loggedIn()->member_id ) ) . ")", '*' );
|
||||
|
||||
|
||||
/* Return only content from enabled apps */
|
||||
$where[] = \IPS\Db::i()->in( 'dellog_content_class', array_values( \IPS\Content::routedClasses( TRUE, TRUE ) ) );
|
||||
|
||||
|
||||
if ( $advancedSearchValues )
|
||||
{
|
||||
if ( isset( $advancedSearchValues['dellog_content_class'] ) AND $advancedSearchValues['dellog_content_class'] != 'all' )
|
||||
|
||||
Reference in new issue
Block a user