Version 4.2.0

This commit is contained in:
Neo committed 2025-12-19 05:44:59 -08:00
1 parent 0dc2aee5ed
commit 96997ddd8e
2074 files changed
+125454 -55780

No files matched your search

@@ -1,13 +1,12 @@
<?php
/**
* @brief Custom Package Field Node
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Community Suite
* @author <a href='https://www.invisioncommunity.com'>Invision Power Services, Inc.</a>
* @copyright (c) Invision Power Services, Inc.
* @license https://www.invisioncommunity.com/legal/standards/
* @package Invision Community
* @subpackage Nexus
* @since 1 May 2013
* @version SVN_VERSION_NUMBER
*/
namespace IPS\nexus\Package;
@@ -131,6 +130,7 @@ class _CustomField extends \IPS\CustomField
return !( $node instanceof \IPS\nexus\Package\Group );
} ) ), 'pf_desc' );
$form->add( new \IPS\Helpers\Form\YesNo( 'cf_sticky', $this->sticky, FALSE ), 'pf_type' );
$form->add( new \IPS\Helpers\Form\YesNo( 'cf_allow_attachments', $this->id ? $this->allow_attachments : 1, FALSE, array( ), NULL, NULL, NULL, 'pf_allow_attachments' ) );
$form->addHeader( 'display_settings' );
$form->add( new \IPS\Helpers\Form\YesNo( 'cf_purchase', $this->purchase, FALSE ) );
@@ -146,6 +146,7 @@ class _CustomField extends \IPS\CustomField
unset( $form->elements['']['pf_search_type'] );
unset( $form->elements['']['pf_search_type_on_off'] );
unset( $form->elements['']['pf_format'] );
unset( $form->elements['']['pf_allow_attachments'] );
}
/**
@@ -195,23 +196,27 @@ class _CustomField extends \IPS\CustomField
/**
* Display Value
*
* @param mixed $value The value
* @param mixed $value The value
* @param bool $showSensitiveInformation If TRUE, potentially sensitive data (like passwords) will be displayed - otherwise will be blanked out
* @return string
*/
public function displayValue( $value=NULL )
public function displayValue( $value=NULL, $showSensitiveInformation=FALSE )
{
if ( $this->type === 'UserPass' )
{
if ( is_array( $value ) )
if ( !is_array( $value ) )
{
return \IPS\Theme::i()->getTemplate( 'forms', 'nexus', 'global' )->usernamePasswordDisplay( $value );
$value = json_decode( \IPS\Text\Encrypt::fromTag( $value )->decrypt(), TRUE );
}
else
if ( !$showSensitiveInformation )
{
return \IPS\Theme::i()->getTemplate( 'forms', 'nexus', 'global' )->usernamePasswordDisplay( json_decode( \IPS\Text\Encrypt::fromTag( $value )->decrypt(), TRUE ) );
$value['pw'] = '********';
}
return \IPS\Theme::i()->getTemplate( 'forms', 'nexus', 'global' )->usernamePasswordDisplay( $value );
}
return parent::displayValue( $value );
return parent::displayValue( $value, $showSensitiveInformation );
}
}