-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for Free Object to JCckContent
- Loading branch information
1 parent
3cb97bb
commit d5fdd4f
Showing
1 changed file
with
53 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
<?php | ||
/** | ||
* @version SEBLOD 3.x Core | ||
* @package SEBLOD (App Builder & CCK) // SEBLOD nano (Form Builder) | ||
* @url https://www.seblod.com | ||
* @editor Octopoos - www.octopoos.com | ||
* @copyright Copyright (C) 2009 - 2018 SEBLOD. All Rights Reserved. | ||
* @license GNU General Public License version 2 or later; see _LICENSE.php | ||
**/ | ||
|
||
defined( '_JEXEC' ) or die; | ||
|
||
// JCckContent | ||
class JCckContentFree extends JCckContent | ||
{ | ||
// setInstanceMore | ||
protected function setInstanceBase() | ||
{ | ||
$table = str_replace( '#__', '', $this->_table ); | ||
|
||
if ( !$this->hasTable( $table ) ) { | ||
return false; | ||
} | ||
|
||
$this->_instance_base = JCckTable::getInstance( '#__'.$table ); | ||
$this->_setDataMap( 'base' ); | ||
|
||
return true; | ||
} | ||
|
||
// setTable | ||
public function setTable( $table_name ) | ||
{ | ||
if ( !$this->isSuccessful() ) { | ||
return $this; | ||
} | ||
|
||
$this->_table = $table_name; | ||
|
||
return $this; | ||
} | ||
|
||
// saveCore | ||
protected function saveCore() | ||
{ | ||
if ( !$this->_instance_core->storage_table ) { | ||
$this->_instance_core->storage_table = $this->_table; | ||
} | ||
|
||
return $this->_instance_core->store(); | ||
} | ||
} | ||
?> |