- md5
- f6aa6c6a238af7b35b7bf0af8cf104c4
- sha1
- 171d300e124a114d2e6323e719c96139f65eebf8
- sha256
- e26c64a9f2686c5f7418e9b3e7be72949def8b9190a49b48293ba403f4773a59
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
<?php
/**
* Joomla! Content Management System
*
* @copyright (C) 2014 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
namespace Joomla\CMS\Table;
use Joomla\CMS\Language\Text;
use Joomla\Database\DatabaseDriver;
use Joomla\Event\DispatcherInterface;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
// phpcs:enable PSR1.Files.SideEffects
/**
* Update site table
* Stores the update sites for extensions
*
* @since 3.4
*/
class UpdateSite extends Table
{
/**
* Constructor
*
* @param DatabaseDriver $db Database connector object
* @param ?DispatcherInterface $dispatcher Event dispatcher for this table
*
* @since 3.4
*/
public function __construct(DatabaseDriver $db, DispatcherInterface $dispatcher = null)
{
parent::__construct('#__update_sites', 'update_site_id', $db, $dispatcher);
}
/**
* Overloaded check function
*
* @return boolean True if the object is ok
*
* @see Table::check()
* @since 3.4
*/
public function check()
{
try {
parent::check();
} catch (\Exception $e) {
$this->setError($e->getMessage());
return false;
}
// Check for valid name
if (trim($this->name) == '' || trim($this->location) == '') {
$this->setError(Text::_('JLIB_DATABASE_ERROR_MUSTCONTAIN_A_TITLE_EXTENSION'));
return false;
}
return true;
}
}
The same content is in 37 releases, Joomla 5.0.0-beta1 to 5.2.0-alpha3. See them all, or every version of this file.