Version 4.6.0
This commit is contained in:
1 parent
f79dcf067a
commit
517a5e1f70
2036 files changed
+110041
-26162
No files matched your search
@@ -155,7 +155,16 @@ class _Feature extends \IPS\Patterns\ActiveRecord implements \JsonSerializable
|
||||
|
||||
return $tree;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Developer Management Table row
|
||||
*
|
||||
* @param string|int $long Long version
|
||||
* @param bool $root Is this a root row
|
||||
* @param \IPS\Application $application The application this feature belongs to
|
||||
* @param \IPS\Http\Url $url Base URL
|
||||
* @return string
|
||||
*/
|
||||
public static function _devTableRow( $long, $root, $application, $url )
|
||||
{
|
||||
$file = \IPS\ROOT_PATH . "/applications/{$application->directory}/setup/upg_" . ( $long == -1 ? 'working' : $long ) . "/whatsnew.json";
|
||||
@@ -208,7 +217,7 @@ class _Feature extends \IPS\Patterns\ActiveRecord implements \JsonSerializable
|
||||
* @param NULL|\IPS\Application\Feature $current Currently editing, or NULL for new.
|
||||
* @return void
|
||||
*/
|
||||
public static function form( &$form, \IPS\Application $application, ?\IPS\Application\Feature $current, ?int $version ): void
|
||||
public static function form( &$form, \IPS\Application $application, ?\IPS\Application\Feature $current, ?int $version )
|
||||
{
|
||||
$form->hiddenValues['feature_app'] = $application->directory;
|
||||
$form->hiddenValues['feature_version_added'] = ( $current ) ? $current->version_added : $version;
|
||||
@@ -272,7 +281,7 @@ class _Feature extends \IPS\Patterns\ActiveRecord implements \JsonSerializable
|
||||
* @param array $values Form Values
|
||||
* @return void
|
||||
*/
|
||||
public function formatFormValues( array $values ): void
|
||||
public function formatFormValues( array $values )
|
||||
{
|
||||
$this->title = $values['feature_title'];
|
||||
$this->text = $values['feature_text'];
|
||||
@@ -321,9 +330,14 @@ class _Feature extends \IPS\Patterns\ActiveRecord implements \JsonSerializable
|
||||
* @param \IPS\Member\Feature $features Variable length amount of features to mark as read.
|
||||
* @return void
|
||||
*/
|
||||
public static function markRead( ?\IPS\Member $member, \IPS\Application\Feature ...$features ): void
|
||||
public static function markRead( ?\IPS\Member $member, \IPS\Application\Feature ...$features )
|
||||
{
|
||||
$member = $member ?: \IPS\Member::loggedIn();
|
||||
|
||||
if( !$member->member_id )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
$insert = array();
|
||||
foreach( $features AS $feature )
|
||||
@@ -333,7 +347,7 @@ class _Feature extends \IPS\Patterns\ActiveRecord implements \JsonSerializable
|
||||
|
||||
if ( \count( $insert ) )
|
||||
{
|
||||
\IPS\Db::i()->insert( 'core_members_feature_seen', $insert );
|
||||
\IPS\Db::i()->insert( 'core_members_feature_seen', $insert, TRUE );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -362,7 +376,7 @@ class _Feature extends \IPS\Patterns\ActiveRecord implements \JsonSerializable
|
||||
* @param int $versionId Long version
|
||||
* @return void
|
||||
*/
|
||||
public static function writeJsonFile( string $appKey, int $versionId ): void
|
||||
public static function writeJsonFile( string $appKey, int $versionId )
|
||||
{
|
||||
$path = \IPS\ROOT_PATH . "/applications/{$appKey}/setup/upg_" . ( $versionId == -1 ? 'working' : $versionId ) . "/whatsnew.json";
|
||||
@unlink( $path );
|
||||
|
||||
Reference in new issue
Block a user