Version 4.1.19
This commit is contained in:
1 parent
28bd025b35
commit
2bd5025018
2674 files changed
+233518
-77766
No files matched your search
@@ -2,9 +2,9 @@
|
||||
/**
|
||||
* @brief Package Group Node
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
|
||||
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Social Suite
|
||||
* @package IPS Community Suite
|
||||
* @subpackage Nexus
|
||||
* @since 29 Apr 2014
|
||||
* @version SVN_VERSION_NUMBER
|
||||
@@ -101,7 +101,7 @@ class _Group extends \IPS\Node\Model
|
||||
*/
|
||||
public static function loadFromUrl( \IPS\Http\Url $url )
|
||||
{
|
||||
$qs = array_merge( $url->queryString, $url->getFriendlyUrlData() );
|
||||
$qs = array_merge( $url->queryString, $url->hiddenQueryString );
|
||||
|
||||
if ( isset( $qs['cat'] ) )
|
||||
{
|
||||
@@ -202,7 +202,7 @@ class _Group extends \IPS\Node\Model
|
||||
{
|
||||
if( $this->_url === NULL )
|
||||
{
|
||||
$this->_url = \IPS\Http\Url::internal( "app=nexus&module=store&controller=store&cat={$this->id}", 'front', 'store_group', \IPS\Http\Url::seoTitle( \IPS\Member::loggedIn()->language()->get( 'nexus_pgroup_' . $this->id ) ) );
|
||||
$this->_url = \IPS\Http\Url::internal( "app=nexus&module=store&controller=store&cat={$this->id}", 'front', 'store_group', \IPS\Http\Url\Friendly::seoTitle( \IPS\Member::loggedIn()->language()->get( 'nexus_pgroup_' . $this->id ) ) );
|
||||
}
|
||||
|
||||
return $this->_url;
|
||||
@@ -240,4 +240,39 @@ class _Group extends \IPS\Node\Model
|
||||
{
|
||||
return ( $this->childrenCount( $member === FALSE ? FALSE : 'view', $member, NULL, $_where ) > 0 );
|
||||
}
|
||||
|
||||
/**
|
||||
* [ActiveRecord] Duplicate
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __clone()
|
||||
{
|
||||
if ( $this->skipCloneDuplication === TRUE )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
$oldImage = $this->image;
|
||||
|
||||
parent::__clone();
|
||||
|
||||
if ( $oldImage )
|
||||
{
|
||||
try
|
||||
{
|
||||
$icon = \IPS\File::get( 'nexus_PackageGroups', $oldImage );
|
||||
$newIcon = \IPS\File::create( 'nexus_PackageGroups', $icon->originalFilename, $icon->contents() );
|
||||
$this->image = (string) $newIcon;
|
||||
}
|
||||
catch ( \Exception $e )
|
||||
{
|
||||
$this->pg_image = NULL;
|
||||
}
|
||||
|
||||
$this->save();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user