Version 4.5.0
This commit is contained in:
1 parent
1a0c7fd3c2
commit
f79dcf067a
3791 files changed
+248032
-76372
No files matched your search
@@ -1,13 +1,29 @@
|
||||
//<?php
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
exit;
|
||||
}
|
||||
|
||||
class cms_hook_Post extends _HOOK_CLASS_
|
||||
{
|
||||
/**
|
||||
* Can edit?
|
||||
*
|
||||
* @param \IPS\Member|NULL $member The member to check for (NULL for currently logged in member)
|
||||
* @return bool
|
||||
*/
|
||||
public function canEdit( $member=NULL )
|
||||
{
|
||||
if ( $this->isFirst() AND \IPS\cms\Records::getLinkedRecord( $this->item() ) )
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return parent::canEdit( $member );
|
||||
}
|
||||
|
||||
/**
|
||||
* Create comment
|
||||
*
|
||||
@@ -91,7 +107,7 @@ class cms_hook_Post extends _HOOK_CLASS_
|
||||
{
|
||||
try
|
||||
{
|
||||
if ( ! in_array( $category['category_database_id'], $synced ) )
|
||||
if ( ! \in_array( $category['category_database_id'], $synced ) )
|
||||
{
|
||||
$class = '\IPS\cms\Records' . $category['category_database_id'];
|
||||
$object = $class::load( $item->tid, 'record_topicid' );
|
||||
@@ -110,7 +126,7 @@ class cms_hook_Post extends _HOOK_CLASS_
|
||||
{
|
||||
try
|
||||
{
|
||||
if ( ! in_array( $database['database_id'], $synced ) )
|
||||
if ( ! \in_array( $database['database_id'], $synced ) )
|
||||
{
|
||||
$class = '\IPS\cms\Records' . $database['database_id'];
|
||||
$object = $class::load( $item->tid, 'record_topicid' );
|
||||
|
||||
Reference in new issue
Block a user