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

+28 -6
View File
@@ -1,13 +1,12 @@
<?php
/**
* @brief Donation Goal 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 17 Jun 2014
* @version SVN_VERSION_NUMBER
*/
namespace IPS\nexus\Donation;
@@ -126,6 +125,11 @@ class _Goal extends \IPS\Node\Model
if( isset( $values['d_name'] ) )
{
\IPS\Lang::saveCustom( 'nexus', "nexus_donategoal_{$this->id}", $values['d_name'] );
/* Save the SEO name */
$this->name_seo = \IPS\Http\Url\Friendly::seoTitle( $values[ 'd_name' ][ \IPS\Lang::defaultLanguage() ] );
$this->save();
unset( $values['d_name'] );
}
@@ -178,6 +182,11 @@ class _Goal extends \IPS\Node\Model
\IPS\Settings::i()->donation_goals = $count;
unset( \IPS\Data\Store::i()->settings );
}
/**
* @brief Generated URL storage
*/
protected $_url;
/**
* Get URL
@@ -186,6 +195,19 @@ class _Goal extends \IPS\Node\Model
*/
public function url( $action=NULL )
{
return \IPS\Http\Url::internal( 'app=nexus&module=clients&controller=donations&id=' . $this->_id, 'front', 'clientsdonate', array(), \IPS\Settings::i()->nexus_https );
/* self-heal missing seo titles */
if( $this->name_seo === null )
{
$language = \IPS\Lang::load( \IPS\Lang::defaultLanguage() );
$this->name_seo = \IPS\Http\Url\Friendly::seoTitle( $language->get( 'nexus_donategoal_' . $this->_id ) );
$this->save();
}
if( $this->_url === null )
{
$this->_url = \IPS\Http\Url::internal( 'app=nexus&module=clients&controller=donations&id=' . $this->_id, 'front', 'clientsdonate', array( $this->name_seo ), \IPS\Settings::i()->nexus_https );
}
return $this->_url;
}
}