Version 4.3.0
This commit is contained in:
1 parent
96997ddd8e
commit
fe1acf984a
1349 files changed
+116159
-67711
No files matched your search
@@ -144,26 +144,35 @@ class _records extends \IPS\Dispatcher\Controller
|
||||
/* Buttons */
|
||||
$table->rowButtons = function( $row )
|
||||
{
|
||||
return array(
|
||||
'edit' => array(
|
||||
'title' => 'edit',
|
||||
'icon' => 'pencil',
|
||||
'link' => \IPS\Http\Url::internal( 'app=cms&module=databases&controller=records&database_id=' . \IPS\Request::i()->database_id . '&id=' . $row['primary_id_field'] . '&do=form' ),
|
||||
'data' => array()
|
||||
),
|
||||
'move' => array(
|
||||
$return = array();
|
||||
|
||||
if ( \IPS\Member::loggedIn()->hasAcpRestriction( 'cms', 'databases', 'records_edit' ) )
|
||||
{
|
||||
$return['edit'] = array(
|
||||
'title' => 'edit',
|
||||
'icon' => 'pencil',
|
||||
'link' => \IPS\Http\Url::internal('app=cms&module=databases&controller=records&database_id=' . \IPS\Request::i()->database_id . '&id=' . $row['primary_id_field'] . '&do=form'),
|
||||
'data' => array()
|
||||
);
|
||||
}
|
||||
|
||||
$return['move'] = array(
|
||||
'title' => 'move',
|
||||
'icon' => 'arrow-right',
|
||||
'link' => \IPS\Http\Url::internal( 'app=cms&module=databases&controller=records&database_id=' . \IPS\Request::i()->database_id . '&do=select&move=' . $row['primary_id_field'] ),
|
||||
'data' => array( 'ipsDialog' => '', 'ipsDialog-title' => \IPS\Member::loggedIn()->language()->addToStack('database_select_category' ) )
|
||||
),
|
||||
'delete' => array(
|
||||
);
|
||||
|
||||
if ( \IPS\Member::loggedIn()->hasAcpRestriction( 'cms', 'databases', 'records_delete' ) )
|
||||
{
|
||||
$return['delete'] = array(
|
||||
'title' => 'delete',
|
||||
'icon' => 'times-circle',
|
||||
'link' => \IPS\Http\Url::internal( 'app=cms&module=databases&controller=records&database_id=' . \IPS\Request::i()->database_id . '&id=' . $row['primary_id_field'] . '&do=delete' ),
|
||||
'data' => array( 'delete' => '' )
|
||||
),
|
||||
);
|
||||
);
|
||||
}
|
||||
return $return;
|
||||
};
|
||||
|
||||
$table->parsers = array(
|
||||
@@ -244,7 +253,7 @@ class _records extends \IPS\Dispatcher\Controller
|
||||
}
|
||||
catch( \OutofRangeException $ex )
|
||||
{
|
||||
\IPS\Output::i()->error( 'no_permission', '2T253/1', 403, '' );
|
||||
\IPS\Output::i()->error( 'no_module_permission', '2T253/1', 403, '' );
|
||||
}
|
||||
|
||||
/* Clear guest page caches */
|
||||
@@ -323,6 +332,8 @@ class _records extends \IPS\Dispatcher\Controller
|
||||
*/
|
||||
public function form()
|
||||
{
|
||||
\IPS\Dispatcher::i()->checkAcpPermission( 'records_edit' );
|
||||
|
||||
$database = \IPS\cms\Databases::load( \IPS\Request::i()->database_id );
|
||||
$title = \IPS\Member::loggedIn()->language()->addToStack('content_record_db_title', TRUE, array( 'sprintf' => array( $database->_title ) ) );
|
||||
|
||||
@@ -450,7 +461,7 @@ class _records extends \IPS\Dispatcher\Controller
|
||||
/* Claim attachments */
|
||||
foreach( $fieldClass::data() as $key => $field )
|
||||
{
|
||||
if ( ucfirst( $field->type ) === 'Editor' )
|
||||
if ( mb_ucfirst( $field->type ) === 'Editor' )
|
||||
{
|
||||
\IPS\File::claimAttachments( 'RecordField_'. $field->id , $current->id, NULL, 'RecordField_'. $field->id, FALSE );
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user