Файл: upload/module/admincp/include/service/seo/process.class.php
Строк: 43
<?php
/**
* [PHPFOX_HEADER]
*/
defined('PHPFOX') or exit('NO DICE!');
/**
*
*
* @copyright [PHPFOX_COPYRIGHT]
* @author Raymond Benc
* @package Phpfox_Service
* @version $Id: process.class.php 4165 2012-05-14 10:43:25Z Raymond_Benc $
*/
class Admincp_Service_Seo_Process extends Phpfox_Service
{
/**
* Class constructor
*/
public function __construct()
{
}
public function deleteMeta($iId)
{
$this->database()->delete(Phpfox::getT('seo_meta'), 'meta_id = ' . (int) $iId);
$this->cache()->remove('seo_meta');
}
public function addMeta($aVals)
{
if (empty($aVals['url']))
{
return Phpfox_Error::set(Phpfox::getPhrase('admincp.provide_a_url'));
}
$iId = $this->database()->insert(Phpfox::getT('seo_meta'), array(
'type_id' => (int) $aVals['type_id'],
'url' => Phpfox::getService('admincp.seo')->getUrl($aVals['url']),
'content' => $aVals['content'],
'time_stamp' => PHPFOX_TIME
)
);
$this->cache()->remove('seo_meta');
return $iId;
}
public function addNoFollow($aVals)
{
if (empty($aVals['url']))
{
return Phpfox_Error::set(Phpfox::getPhrase('admincp.provide_a_url'));
}
$iId = $this->database()->insert(Phpfox::getT('seo_nofollow'), array(
'url' => Phpfox::getService('admincp.seo')->getUrl($aVals['url']),
'time_stamp' => PHPFOX_TIME
)
);
$this->cache()->remove('seo_nofollow');
return $iId;
}
public function deleteNoFollow($iId)
{
$this->database()->delete(Phpfox::getT('seo_nofollow'), 'nofollow_id = ' . (int) $iId);
$this->cache()->remove('seo_nofollow');
}
}
?>