Version 5.0.6

This commit is contained in:
Neo committed 2025-12-19 18:55:49 -08:00
1 parent a3a4a9ccbd
commit b89858b2ff
1214 files changed
+92828 -14859

No files matched your search

+30 -9
View File
@@ -409,10 +409,7 @@ class Content extends Table
}
/* Check extensions for custom where clause */
foreach( UiExtension::i()->run( $class, 'contentTableWhere', array( $this ) ) as $customWhere )
{
$where[] = $customWhere;
}
UiExtension::i()->run( $class, 'contentTableWhere', array( $this, &$where ) );
/* Get results */
$this->count = $class::getItemsWithPermission( $where, $sortBy, NULL, $this->permCheck, $this->includeHiddenContent, 0, NULL, $this->joinContainer, $this->joinComments, $this->joinReviews, TRUE, $this->joins, ( $this->container and $this->limitByContainer ) ? $this->container : FALSE, TRUE, TRUE, TRUE, $this->showMovedLinks );
@@ -619,6 +616,9 @@ class Content extends Table
{
$class::tableGetRows( $rows );
}
/* Extensions */
UiExtension::i()->run( $class, 'contentTableGetRows', [ $this, &$rows ] );
if ( $this->callback != NULL and is_callable( $this->callback ) )
{
@@ -990,11 +990,32 @@ class Content extends Table
$currentTags['prefix'] = $currentPrefix;
}
foreach( $params[ $class::$formLangPrefix . 'tags' ] as $tag )
foreach( $params[ $class::$formLangPrefix . 'tags' ] as $k => $tag )
{
$currentTagIndex = array_search( $tag, $currentTags );
if( Request::i()->modaction == 'tag' )
{
if( !in_array( $tag, $currentTags ) )
/* Prefix should be handled slightly differently */
if( $k == 'prefix' )
{
if( !isset( $currentTags['prefix'] ) or $currentTags['prefix'] != $tag )
{
/* Move the current prefix to the regular tag list */
if( isset( $currentTags['prefix'] ) )
{
$currentTags[] = $currentTags['prefix'];
}
/* Set the tag as the prefix and remove it from the tag list */
$currentTags['prefix'] = $tag;
if( $currentTagIndex !== false )
{
unset( $currentTags[ $currentTagIndex ] );
}
$modified = true;
}
}
elseif( $currentTagIndex === false )
{
$currentTags[] = $tag;
$modified = true;
@@ -1002,10 +1023,10 @@ class Content extends Table
}
else
{
$index = array_search( $tag, $currentTags );
if( $index !== false )
$currentTagIndex = array_search( $tag, $currentTags );
if( $currentTagIndex !== false )
{
unset( $currentTags[ $index ] );
unset( $currentTags[ $currentTagIndex ] );
$modified = true;
}
}