Version 4.3.0

This commit is contained in:
Neo committed 2025-12-19 05:47:12 -08:00
1 parent 96997ddd8e
commit fe1acf984a
1349 files changed
+116159 -67711

No files matched your search

+25 -23
View File
@@ -167,6 +167,11 @@ abstract class _Table
*/
public $rowClasses = array();
/**
* @brief Rows to highlight
*/
public $highlightRows = array();
/**
* @brief Buttons to show on the "root row"
* @code
@@ -281,7 +286,7 @@ abstract class _Table
$this->rowsTemplate = array( \IPS\Theme::i()->getTemplate( 'tables', 'core' ), 'rows' );
/* Create a unique id used by the template - can be overriden manually if desired */
$this->uniqueId = md5( uniqid() );
$this->uniqueId = md5( mt_rand() );
}
/**
@@ -478,7 +483,7 @@ abstract class _Table
/* Get rows */
$rows = $this->getRows( $advancedSearchValues );
/* Check we're on a valid page (must come after getRows() as this is where $this->pages is set) */
if ( $this->page )
{
@@ -700,6 +705,7 @@ abstract class _Table
/* Store these to prevent URL from being rebuilt on subsequent calls */
if ( $this->advancedSearchValues === NULL )
{
$this->advancedSearchValues = array();
foreach ( $values as $k => $v )
{
if( array_key_exists( $k, $form->hiddenValues ) )
@@ -709,26 +715,6 @@ abstract class _Table
if ( $v !== NULL )
{
if( \IPS\Request::i()->isAjax() )
{
if ( is_array( $v ) )
{
$newVal = array();
foreach( $v as $key => $val )
{
$newVal[ $key ] = urldecode( $val );
}
$v = $newVal;
}
else
{
if ( ! is_object( $v ) )
{
$v = urldecode( $v );
}
}
}
$advancedSearchValuesQuery[ $k ] = $v;
$this->advancedSearchValues[ mb_substr( $k, mb_strlen( $this->langPrefix ) ) ] = $v;
}
@@ -744,5 +730,21 @@ abstract class _Table
return $this->advancedSearchValues;
}
}
/**
* Return the sort direction to use for links
*
* @note Abstracted so other table helper instances can adjust as needed
* @param string $column Sort by string
* @return string [asc|desc]
*/
public function getSortDirection( $column )
{
if( $column == 'title' )
{
return 'asc';
}
return 'desc';
}
}