-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
moving tablePrefix to ManagementAppModel
- Loading branch information
1 parent
64c23a3
commit 62505b4
Showing
16 changed files
with
169 additions
and
121 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
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 |
---|---|---|
@@ -1,23 +1,24 @@ | ||
<?php | ||
/** | ||
* Comment Template. | ||
* | ||
* @todo Implement .this needs to be sorted out. | ||
* | ||
* Copyright (c) 2009 Carl Sutton ( dogmatic69 ) | ||
* | ||
* Licensed under The MIT License | ||
* Redistributions of files must retain the above copyright notice. | ||
* @filesource | ||
* @copyright Copyright (c) 2009 Carl Sutton ( dogmatic69 ) | ||
* @link http://infinitas-cms.org | ||
* @package sort | ||
* @subpackage sort.comments | ||
* @license http://www.opensource.org/licenses/mit-license.php The MIT License | ||
* @since 0.5a | ||
*/ | ||
|
||
class ManagementAppModel extends AppModel { | ||
} | ||
|
||
<?php | ||
/** | ||
* Comment Template. | ||
* | ||
* @todo Implement .this needs to be sorted out. | ||
* | ||
* Copyright (c) 2009 Carl Sutton ( dogmatic69 ) | ||
* | ||
* Licensed under The MIT License | ||
* Redistributions of files must retain the above copyright notice. | ||
* @filesource | ||
* @copyright Copyright (c) 2009 Carl Sutton ( dogmatic69 ) | ||
* @link http://infinitas-cms.org | ||
* @package sort | ||
* @subpackage sort.comments | ||
* @license http://www.opensource.org/licenses/mit-license.php The MIT License | ||
* @since 0.5a | ||
*/ | ||
|
||
class ManagementAppModel extends AppModel { | ||
var $tablePrefix = 'core_'; | ||
} | ||
|
||
?> |
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 |
---|---|---|
@@ -1,67 +1,65 @@ | ||
<?php | ||
/** | ||
* Comment Template. | ||
* | ||
* @todo Implement .this needs to be sorted out. | ||
* | ||
* Copyright (c) 2009 Carl Sutton ( dogmatic69 ) | ||
* | ||
* Licensed under The MIT License | ||
* Redistributions of files must retain the above copyright notice. | ||
* @filesource | ||
* @copyright Copyright (c) 2009 Carl Sutton ( dogmatic69 ) | ||
* @link http://infinitas-cms.org | ||
* @package sort | ||
* @subpackage sort.comments | ||
* @license http://www.opensource.org/licenses/mit-license.php The MIT License | ||
* @since 0.5a | ||
*/ | ||
|
||
class Backup extends CoreAppModel { | ||
var $name = 'Backup'; | ||
|
||
var $tablePrefix = 'core_'; | ||
|
||
var $last_id = 0; | ||
/** | ||
* Constructor | ||
* | ||
* @access protected | ||
*/ | ||
function getLastBackup($model = null, $plugin = null) { | ||
$lastBackup = $this->find( | ||
'first', | ||
array( | ||
'fields' => array( | ||
'Backup.last_id' | ||
), | ||
'conditions' => array( | ||
'Backup.plugin' => $plugin, | ||
'Backup.model' => $model | ||
), | ||
'order' => array( | ||
'Backup.id' => 'DESC' | ||
) | ||
) | ||
); | ||
|
||
if (!empty($lastBackup)) { | ||
$this->last_id = $lastBackup['Backup']['last_id']; | ||
} | ||
|
||
return $this->last_id; | ||
} | ||
|
||
function getRecordsForBackup($Model) { | ||
return $Model->find( | ||
'all', | ||
array( | ||
'conditions' => array($Model->name . '.id > ' => $this->last_id | ||
), | ||
'contain' => false | ||
) | ||
); | ||
} | ||
} | ||
|
||
<?php | ||
/** | ||
* Comment Template. | ||
* | ||
* @todo Implement .this needs to be sorted out. | ||
* | ||
* Copyright (c) 2009 Carl Sutton ( dogmatic69 ) | ||
* | ||
* Licensed under The MIT License | ||
* Redistributions of files must retain the above copyright notice. | ||
* @filesource | ||
* @copyright Copyright (c) 2009 Carl Sutton ( dogmatic69 ) | ||
* @link http://infinitas-cms.org | ||
* @package sort | ||
* @subpackage sort.comments | ||
* @license http://www.opensource.org/licenses/mit-license.php The MIT License | ||
* @since 0.5a | ||
*/ | ||
|
||
class Backup extends CoreAppModel { | ||
var $name = 'Backup'; | ||
|
||
var $last_id = 0; | ||
/** | ||
* Constructor | ||
* | ||
* @access protected | ||
*/ | ||
function getLastBackup($model = null, $plugin = null) { | ||
$lastBackup = $this->find( | ||
'first', | ||
array( | ||
'fields' => array( | ||
'Backup.last_id' | ||
), | ||
'conditions' => array( | ||
'Backup.plugin' => $plugin, | ||
'Backup.model' => $model | ||
), | ||
'order' => array( | ||
'Backup.id' => 'DESC' | ||
) | ||
) | ||
); | ||
|
||
if (!empty($lastBackup)) { | ||
$this->last_id = $lastBackup['Backup']['last_id']; | ||
} | ||
|
||
return $this->last_id; | ||
} | ||
|
||
function getRecordsForBackup($Model) { | ||
return $Model->find( | ||
'all', | ||
array( | ||
'conditions' => array($Model->name . '.id > ' => $this->last_id | ||
), | ||
'contain' => false | ||
) | ||
); | ||
} | ||
} | ||
|
||
?> |
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
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
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
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 |
---|---|---|
@@ -1,6 +1,5 @@ | ||
<?php | ||
class Log extends ManagementAppModel { | ||
var $tablePrefix = 'core_'; | ||
var $name = 'Log'; | ||
|
||
var $order = array( | ||
|
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
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
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
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 |
---|---|---|
@@ -1,7 +1,5 @@ | ||
<?php | ||
class ModulePosition extends ManagementAppModel{ | ||
var $name = 'ModulePosition'; | ||
|
||
var $tablePrefix = 'core_'; | ||
} | ||
?> |
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
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
Oops, something went wrong.