Version 4.6.0

This commit is contained in:
Neo committed 2025-12-19 05:55:31 -08:00
1 parent f79dcf067a
commit 517a5e1f70
2036 files changed
+110041 -26162

No files matched your search

+1 -1
View File
@@ -118,7 +118,7 @@ class cms_hook_FriendlyUrl extends _HOOK_CLASS_
* @return \IPS\Http\Url\Friendly
* @throws \IPS\Http\Url\Exception
*/
protected function setFriendlyUrlData( $seoTemplate, $seoTitles, $matchedParams=array(), $friendlyUrlComponent )
protected function setFriendlyUrlData( $seoTemplate, $seoTitles, $matchedParams=array(), string $friendlyUrlComponent = '')
{
if ( $seoTemplate === 'content_page_path' )
{
+2 -2
View File
@@ -28,7 +28,7 @@ class cms_hook_Lang extends _HOOK_CLASS_
\IPS\Application::applications();
/* Add in the database specific language bits and bobs */
foreach( \IPS\cms\Databases::getDatabaseDataFromStore() as $database )
foreach( \IPS\cms\Databases::getStore() as $database )
{
$this->words['__indefart_content_record_comments_title_' . $database['database_id'] ] = $this->addToStack( '__indefart_content_record_comments_title' );
$this->words['__indefart_content_record_reviews_title_' . $database['database_id'] ] = $this->addToStack( '__indefart_content_record_reviews_title' );
@@ -66,7 +66,7 @@ class cms_hook_Lang extends _HOOK_CLASS_
* @param bool $upper ucfirst string
* @return string
*/
public function recordWord( $number = 2, $upper = FALSE, $databaseId )
public function recordWord( $number, $upper, $databaseId )
{
$case = $upper ? 'u' : 'l';
return $number == 1 ? $this->addToStack("content_db_lang_s{$case}_{$databaseId}") : $this->addToStack("content_db_lang_p{$case}_{$databaseId}");
+43
View File
@@ -0,0 +1,43 @@
//<?php
/* To prevent PHP errors (extending class does not exist) revealing path */
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
{
exit;
}
class cms_hook_apiForum extends _HOOK_CLASS_
{
/**
* Delete
*
* @param int $id ID Number
* @param int|NULL $deleteChildrenOrMove -1 to delete all child nodes, or the new parent node ID to move the children to
* @throws 2F363/7 The node ID does not exist
* @throws 2F363/6 The target node cannot be deleted because it is in use by a CMS Database
* @return \IPS\Api\Response
*/
public function _delete( $id, $deleteChildrenOrMove = NULL )
{
$nodeClass = $this->class;
try
{
$node = $nodeClass::load( $id );
}
catch ( \OutOfRangeException $e )
{
throw new \IPS\Api\Exception( 'INVALID_ID', '2F363/7', 404 );
}
/* isUsedByCms in cms/hooks/Forum.php */
if ( $db = $node->isUsedByCms() )
{
throw new \IPS\Api\Exception( 'FORUM_USED_BY_DATABASE', '2F363/6', 403 );
}
else
{
return parent::_delete( $id, $deleteChildrenOrMove );
}
}
}