/home/suroeste/public_html/wp-content/plugins/akeebabackupwp/app/Solo/Model
NameSizeModeActions
Exception/-0755rm
Mixin/-0755rm
OAuth2/-0755rm
Backup.php140210644editdlrm
Browser.php36150644editdlrm
Configuration.php80800644editdlrm
Dbfilters.php103740644editdlrm
Fsfilters.php156260644editdlrm
Ftpbrowser.php17940644editdlrm
Log.php51520644editdlrm
Main.php401280644editdlrm
Manage.php97270644editdlrm
Oauth2.php12330644editdlrm
Phpinfo.php2890644editdlrm
Profiles.php28190644editdlrm
Sftpbrowser.php30970644editdlrm
Stats.php124290644editdlrm
Sysconfig.php2500644editdlrm
Update.php312000644editdlrm
Wizard.php200490644editdlrm
Edit: /home/suroeste/public_html/wp-content/plugins/akeebabackupwp/app/Solo/Model/Profiles.php (2819B)
tableName = '#__ak_profiles'; $this->idFieldName = 'id'; parent::__construct($container); $this->addBehaviour('filters'); } /** * Prevent the deletion of the default backup profile * * @param integer $id The profile ID which is about to be deleted * * @throws \RuntimeException When some wise guy tries to delete the default backup profile */ public function onBeforeDelete($id) { if ($id == 1) { throw new RuntimeException(Text::_('COM_AKEEBA_PROFILE_ERR_CANNOTDELETEDEFAULT'), 403); } // If you're deleting the current backup profile we have to switch to the default profile (#1) $activeProfile = Platform::getInstance()->get_active_profile(); if ($id == $activeProfile) { throw new RuntimeException(Text::sprintf('COM_AKEEBA_PROFILE_ERR_CANNOTDELETEACTIVE', $id), 500); } } /** * Check the data for validity. * * @return DataModel Self, for chaining * * @throws \RuntimeException When the data bound to this record is invalid */ public function check() { if (!$this->description) { throw new RuntimeException(Text::_('COM_AKEEBA_PROFILE_ERR_NODESCRIPTION')); } if (!$this->quickicon) { $this->quickicon = 0; } return parent::check(); } /** * Save a profile from imported configuration data. The $data array must contain the keys description (profile * description), configuration (engine configuration INI data) and filters (inclusion and inclusion filters JSON * configuration data). * * @param array $data See above * * @returns void * * @throws RuntimeException When an iport error occurs */ public function import($data) { // Check for data validity $isValid = is_array($data) && !empty($data) && array_key_exists('description', $data) && array_key_exists('configuration', $data) && array_key_exists('filters', $data); if (!$isValid) { throw new RuntimeException(Text::_('COM_AKEEBA_PROFILES_ERR_IMPORT_INVALID')); } // Unset the id, if it exists if (array_key_exists('id', $data)) { unset($data['id']); } $data['akeeba.flag.confwiz'] = 1; // Try saving the profile $result = $this->save($data); if (!$result) { throw new RuntimeException(Text::_('COM_AKEEBA_PROFILES_ERR_IMPORT_FAILED')); } } }