Edit File by line
/home/barbar84/public_h.../wp-inclu.../SimplePi.../Cache
File: MySQL.php
<?php
[0] Fix | Delete
/**
[1] Fix | Delete
* SimplePie
[2] Fix | Delete
*
[3] Fix | Delete
* A PHP-Based RSS and Atom Feed Framework.
[4] Fix | Delete
* Takes the hard work out of managing a complete RSS/Atom solution.
[5] Fix | Delete
*
[6] Fix | Delete
* Copyright (c) 2004-2016, Ryan Parman, Sam Sneddon, Ryan McCue, and contributors
[7] Fix | Delete
* All rights reserved.
[8] Fix | Delete
*
[9] Fix | Delete
* Redistribution and use in source and binary forms, with or without modification, are
[10] Fix | Delete
* permitted provided that the following conditions are met:
[11] Fix | Delete
*
[12] Fix | Delete
* * Redistributions of source code must retain the above copyright notice, this list of
[13] Fix | Delete
* conditions and the following disclaimer.
[14] Fix | Delete
*
[15] Fix | Delete
* * Redistributions in binary form must reproduce the above copyright notice, this list
[16] Fix | Delete
* of conditions and the following disclaimer in the documentation and/or other materials
[17] Fix | Delete
* provided with the distribution.
[18] Fix | Delete
*
[19] Fix | Delete
* * Neither the name of the SimplePie Team nor the names of its contributors may be used
[20] Fix | Delete
* to endorse or promote products derived from this software without specific prior
[21] Fix | Delete
* written permission.
[22] Fix | Delete
*
[23] Fix | Delete
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS
[24] Fix | Delete
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
[25] Fix | Delete
* AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS
[26] Fix | Delete
* AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
[27] Fix | Delete
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
[28] Fix | Delete
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
[29] Fix | Delete
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
[30] Fix | Delete
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
[31] Fix | Delete
* POSSIBILITY OF SUCH DAMAGE.
[32] Fix | Delete
*
[33] Fix | Delete
* @package SimplePie
[34] Fix | Delete
* @copyright 2004-2016 Ryan Parman, Sam Sneddon, Ryan McCue
[35] Fix | Delete
* @author Ryan Parman
[36] Fix | Delete
* @author Sam Sneddon
[37] Fix | Delete
* @author Ryan McCue
[38] Fix | Delete
* @link http://simplepie.org/ SimplePie
[39] Fix | Delete
* @license http://www.opensource.org/licenses/bsd-license.php BSD License
[40] Fix | Delete
*/
[41] Fix | Delete
[42] Fix | Delete
/**
[43] Fix | Delete
* Caches data to a MySQL database
[44] Fix | Delete
*
[45] Fix | Delete
* Registered for URLs with the "mysql" protocol
[46] Fix | Delete
*
[47] Fix | Delete
* For example, `mysql://root:password@localhost:3306/mydb?prefix=sp_` will
[48] Fix | Delete
* connect to the `mydb` database on `localhost` on port 3306, with the user
[49] Fix | Delete
* `root` and the password `password`. All tables will be prefixed with `sp_`
[50] Fix | Delete
*
[51] Fix | Delete
* @package SimplePie
[52] Fix | Delete
* @subpackage Caching
[53] Fix | Delete
*/
[54] Fix | Delete
class SimplePie_Cache_MySQL extends SimplePie_Cache_DB
[55] Fix | Delete
{
[56] Fix | Delete
/**
[57] Fix | Delete
* PDO instance
[58] Fix | Delete
*
[59] Fix | Delete
* @var PDO
[60] Fix | Delete
*/
[61] Fix | Delete
protected $mysql;
[62] Fix | Delete
[63] Fix | Delete
/**
[64] Fix | Delete
* Options
[65] Fix | Delete
*
[66] Fix | Delete
* @var array
[67] Fix | Delete
*/
[68] Fix | Delete
protected $options;
[69] Fix | Delete
[70] Fix | Delete
/**
[71] Fix | Delete
* Cache ID
[72] Fix | Delete
*
[73] Fix | Delete
* @var string
[74] Fix | Delete
*/
[75] Fix | Delete
protected $id;
[76] Fix | Delete
[77] Fix | Delete
/**
[78] Fix | Delete
* Create a new cache object
[79] Fix | Delete
*
[80] Fix | Delete
* @param string $location Location string (from SimplePie::$cache_location)
[81] Fix | Delete
* @param string $name Unique ID for the cache
[82] Fix | Delete
* @param string $type Either TYPE_FEED for SimplePie data, or TYPE_IMAGE for image data
[83] Fix | Delete
*/
[84] Fix | Delete
public function __construct($location, $name, $type)
[85] Fix | Delete
{
[86] Fix | Delete
$this->options = array(
[87] Fix | Delete
'user' => null,
[88] Fix | Delete
'pass' => null,
[89] Fix | Delete
'host' => '127.0.0.1',
[90] Fix | Delete
'port' => '3306',
[91] Fix | Delete
'path' => '',
[92] Fix | Delete
'extras' => array(
[93] Fix | Delete
'prefix' => '',
[94] Fix | Delete
'cache_purge_time' => 2592000
[95] Fix | Delete
),
[96] Fix | Delete
);
[97] Fix | Delete
[98] Fix | Delete
$this->options = SimplePie_Misc::array_merge_recursive($this->options, SimplePie_Cache::parse_URL($location));
[99] Fix | Delete
[100] Fix | Delete
// Path is prefixed with a "/"
[101] Fix | Delete
$this->options['dbname'] = substr($this->options['path'], 1);
[102] Fix | Delete
[103] Fix | Delete
try
[104] Fix | Delete
{
[105] Fix | Delete
$this->mysql = new PDO("mysql:dbname={$this->options['dbname']};host={$this->options['host']};port={$this->options['port']}", $this->options['user'], $this->options['pass'], array(PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8'));
[106] Fix | Delete
}
[107] Fix | Delete
catch (PDOException $e)
[108] Fix | Delete
{
[109] Fix | Delete
$this->mysql = null;
[110] Fix | Delete
return;
[111] Fix | Delete
}
[112] Fix | Delete
[113] Fix | Delete
$this->id = $name . $type;
[114] Fix | Delete
[115] Fix | Delete
if (!$query = $this->mysql->query('SHOW TABLES'))
[116] Fix | Delete
{
[117] Fix | Delete
$this->mysql = null;
[118] Fix | Delete
return;
[119] Fix | Delete
}
[120] Fix | Delete
[121] Fix | Delete
$db = array();
[122] Fix | Delete
while ($row = $query->fetchColumn())
[123] Fix | Delete
{
[124] Fix | Delete
$db[] = $row;
[125] Fix | Delete
}
[126] Fix | Delete
[127] Fix | Delete
if (!in_array($this->options['extras']['prefix'] . 'cache_data', $db))
[128] Fix | Delete
{
[129] Fix | Delete
$query = $this->mysql->exec('CREATE TABLE `' . $this->options['extras']['prefix'] . 'cache_data` (`id` TEXT CHARACTER SET utf8 NOT NULL, `items` SMALLINT NOT NULL DEFAULT 0, `data` BLOB NOT NULL, `mtime` INT UNSIGNED NOT NULL, UNIQUE (`id`(125)))');
[130] Fix | Delete
if ($query === false)
[131] Fix | Delete
{
[132] Fix | Delete
trigger_error("Can't create " . $this->options['extras']['prefix'] . "cache_data table, check permissions", E_USER_WARNING);
[133] Fix | Delete
$this->mysql = null;
[134] Fix | Delete
return;
[135] Fix | Delete
}
[136] Fix | Delete
}
[137] Fix | Delete
[138] Fix | Delete
if (!in_array($this->options['extras']['prefix'] . 'items', $db))
[139] Fix | Delete
{
[140] Fix | Delete
$query = $this->mysql->exec('CREATE TABLE `' . $this->options['extras']['prefix'] . 'items` (`feed_id` TEXT CHARACTER SET utf8 NOT NULL, `id` TEXT CHARACTER SET utf8 NOT NULL, `data` MEDIUMBLOB NOT NULL, `posted` INT UNSIGNED NOT NULL, INDEX `feed_id` (`feed_id`(125)))');
[141] Fix | Delete
if ($query === false)
[142] Fix | Delete
{
[143] Fix | Delete
trigger_error("Can't create " . $this->options['extras']['prefix'] . "items table, check permissions", E_USER_WARNING);
[144] Fix | Delete
$this->mysql = null;
[145] Fix | Delete
return;
[146] Fix | Delete
}
[147] Fix | Delete
}
[148] Fix | Delete
}
[149] Fix | Delete
[150] Fix | Delete
/**
[151] Fix | Delete
* Save data to the cache
[152] Fix | Delete
*
[153] Fix | Delete
* @param array|SimplePie $data Data to store in the cache. If passed a SimplePie object, only cache the $data property
[154] Fix | Delete
* @return bool Successfulness
[155] Fix | Delete
*/
[156] Fix | Delete
public function save($data)
[157] Fix | Delete
{
[158] Fix | Delete
if ($this->mysql === null)
[159] Fix | Delete
{
[160] Fix | Delete
return false;
[161] Fix | Delete
}
[162] Fix | Delete
[163] Fix | Delete
$query = $this->mysql->prepare('DELETE i, cd FROM `' . $this->options['extras']['prefix'] . 'cache_data` cd, ' .
[164] Fix | Delete
'`' . $this->options['extras']['prefix'] . 'items` i ' .
[165] Fix | Delete
'WHERE cd.id = i.feed_id ' .
[166] Fix | Delete
'AND cd.mtime < (unix_timestamp() - :purge_time)');
[167] Fix | Delete
$query->bindValue(':purge_time', $this->options['extras']['cache_purge_time']);
[168] Fix | Delete
[169] Fix | Delete
if (!$query->execute())
[170] Fix | Delete
{
[171] Fix | Delete
return false;
[172] Fix | Delete
}
[173] Fix | Delete
[174] Fix | Delete
if ($data instanceof SimplePie)
[175] Fix | Delete
{
[176] Fix | Delete
$data = clone $data;
[177] Fix | Delete
[178] Fix | Delete
$prepared = self::prepare_simplepie_object_for_cache($data);
[179] Fix | Delete
[180] Fix | Delete
$query = $this->mysql->prepare('SELECT COUNT(*) FROM `' . $this->options['extras']['prefix'] . 'cache_data` WHERE `id` = :feed');
[181] Fix | Delete
$query->bindValue(':feed', $this->id);
[182] Fix | Delete
if ($query->execute())
[183] Fix | Delete
{
[184] Fix | Delete
if ($query->fetchColumn() > 0)
[185] Fix | Delete
{
[186] Fix | Delete
$items = count($prepared[1]);
[187] Fix | Delete
if ($items)
[188] Fix | Delete
{
[189] Fix | Delete
$sql = 'UPDATE `' . $this->options['extras']['prefix'] . 'cache_data` SET `items` = :items, `data` = :data, `mtime` = :time WHERE `id` = :feed';
[190] Fix | Delete
$query = $this->mysql->prepare($sql);
[191] Fix | Delete
$query->bindValue(':items', $items);
[192] Fix | Delete
}
[193] Fix | Delete
else
[194] Fix | Delete
{
[195] Fix | Delete
$sql = 'UPDATE `' . $this->options['extras']['prefix'] . 'cache_data` SET `data` = :data, `mtime` = :time WHERE `id` = :feed';
[196] Fix | Delete
$query = $this->mysql->prepare($sql);
[197] Fix | Delete
}
[198] Fix | Delete
[199] Fix | Delete
$query->bindValue(':data', $prepared[0]);
[200] Fix | Delete
$query->bindValue(':time', time());
[201] Fix | Delete
$query->bindValue(':feed', $this->id);
[202] Fix | Delete
if (!$query->execute())
[203] Fix | Delete
{
[204] Fix | Delete
return false;
[205] Fix | Delete
}
[206] Fix | Delete
}
[207] Fix | Delete
else
[208] Fix | Delete
{
[209] Fix | Delete
$query = $this->mysql->prepare('INSERT INTO `' . $this->options['extras']['prefix'] . 'cache_data` (`id`, `items`, `data`, `mtime`) VALUES(:feed, :count, :data, :time)');
[210] Fix | Delete
$query->bindValue(':feed', $this->id);
[211] Fix | Delete
$query->bindValue(':count', count($prepared[1]));
[212] Fix | Delete
$query->bindValue(':data', $prepared[0]);
[213] Fix | Delete
$query->bindValue(':time', time());
[214] Fix | Delete
if (!$query->execute())
[215] Fix | Delete
{
[216] Fix | Delete
return false;
[217] Fix | Delete
}
[218] Fix | Delete
}
[219] Fix | Delete
[220] Fix | Delete
$ids = array_keys($prepared[1]);
[221] Fix | Delete
if (!empty($ids))
[222] Fix | Delete
{
[223] Fix | Delete
foreach ($ids as $id)
[224] Fix | Delete
{
[225] Fix | Delete
$database_ids[] = $this->mysql->quote($id);
[226] Fix | Delete
}
[227] Fix | Delete
[228] Fix | Delete
$query = $this->mysql->prepare('SELECT `id` FROM `' . $this->options['extras']['prefix'] . 'items` WHERE `id` = ' . implode(' OR `id` = ', $database_ids) . ' AND `feed_id` = :feed');
[229] Fix | Delete
$query->bindValue(':feed', $this->id);
[230] Fix | Delete
[231] Fix | Delete
if ($query->execute())
[232] Fix | Delete
{
[233] Fix | Delete
$existing_ids = array();
[234] Fix | Delete
while ($row = $query->fetchColumn())
[235] Fix | Delete
{
[236] Fix | Delete
$existing_ids[] = $row;
[237] Fix | Delete
}
[238] Fix | Delete
[239] Fix | Delete
$new_ids = array_diff($ids, $existing_ids);
[240] Fix | Delete
[241] Fix | Delete
foreach ($new_ids as $new_id)
[242] Fix | Delete
{
[243] Fix | Delete
if (!($date = $prepared[1][$new_id]->get_date('U')))
[244] Fix | Delete
{
[245] Fix | Delete
$date = time();
[246] Fix | Delete
}
[247] Fix | Delete
[248] Fix | Delete
$query = $this->mysql->prepare('INSERT INTO `' . $this->options['extras']['prefix'] . 'items` (`feed_id`, `id`, `data`, `posted`) VALUES(:feed, :id, :data, :date)');
[249] Fix | Delete
$query->bindValue(':feed', $this->id);
[250] Fix | Delete
$query->bindValue(':id', $new_id);
[251] Fix | Delete
$query->bindValue(':data', serialize($prepared[1][$new_id]->data));
[252] Fix | Delete
$query->bindValue(':date', $date);
[253] Fix | Delete
if (!$query->execute())
[254] Fix | Delete
{
[255] Fix | Delete
return false;
[256] Fix | Delete
}
[257] Fix | Delete
}
[258] Fix | Delete
return true;
[259] Fix | Delete
}
[260] Fix | Delete
}
[261] Fix | Delete
else
[262] Fix | Delete
{
[263] Fix | Delete
return true;
[264] Fix | Delete
}
[265] Fix | Delete
}
[266] Fix | Delete
}
[267] Fix | Delete
else
[268] Fix | Delete
{
[269] Fix | Delete
$query = $this->mysql->prepare('SELECT `id` FROM `' . $this->options['extras']['prefix'] . 'cache_data` WHERE `id` = :feed');
[270] Fix | Delete
$query->bindValue(':feed', $this->id);
[271] Fix | Delete
if ($query->execute())
[272] Fix | Delete
{
[273] Fix | Delete
if ($query->rowCount() > 0)
[274] Fix | Delete
{
[275] Fix | Delete
$query = $this->mysql->prepare('UPDATE `' . $this->options['extras']['prefix'] . 'cache_data` SET `items` = 0, `data` = :data, `mtime` = :time WHERE `id` = :feed');
[276] Fix | Delete
$query->bindValue(':data', serialize($data));
[277] Fix | Delete
$query->bindValue(':time', time());
[278] Fix | Delete
$query->bindValue(':feed', $this->id);
[279] Fix | Delete
if ($this->execute())
[280] Fix | Delete
{
[281] Fix | Delete
return true;
[282] Fix | Delete
}
[283] Fix | Delete
}
[284] Fix | Delete
else
[285] Fix | Delete
{
[286] Fix | Delete
$query = $this->mysql->prepare('INSERT INTO `' . $this->options['extras']['prefix'] . 'cache_data` (`id`, `items`, `data`, `mtime`) VALUES(:id, 0, :data, :time)');
[287] Fix | Delete
$query->bindValue(':id', $this->id);
[288] Fix | Delete
$query->bindValue(':data', serialize($data));
[289] Fix | Delete
$query->bindValue(':time', time());
[290] Fix | Delete
if ($query->execute())
[291] Fix | Delete
{
[292] Fix | Delete
return true;
[293] Fix | Delete
}
[294] Fix | Delete
}
[295] Fix | Delete
}
[296] Fix | Delete
}
[297] Fix | Delete
return false;
[298] Fix | Delete
}
[299] Fix | Delete
[300] Fix | Delete
/**
[301] Fix | Delete
* Retrieve the data saved to the cache
[302] Fix | Delete
*
[303] Fix | Delete
* @return array Data for SimplePie::$data
[304] Fix | Delete
*/
[305] Fix | Delete
public function load()
[306] Fix | Delete
{
[307] Fix | Delete
if ($this->mysql === null)
[308] Fix | Delete
{
[309] Fix | Delete
return false;
[310] Fix | Delete
}
[311] Fix | Delete
[312] Fix | Delete
$query = $this->mysql->prepare('SELECT `items`, `data` FROM `' . $this->options['extras']['prefix'] . 'cache_data` WHERE `id` = :id');
[313] Fix | Delete
$query->bindValue(':id', $this->id);
[314] Fix | Delete
if ($query->execute() && ($row = $query->fetch()))
[315] Fix | Delete
{
[316] Fix | Delete
$data = unserialize($row[1]);
[317] Fix | Delete
[318] Fix | Delete
if (isset($this->options['items'][0]))
[319] Fix | Delete
{
[320] Fix | Delete
$items = (int) $this->options['items'][0];
[321] Fix | Delete
}
[322] Fix | Delete
else
[323] Fix | Delete
{
[324] Fix | Delete
$items = (int) $row[0];
[325] Fix | Delete
}
[326] Fix | Delete
[327] Fix | Delete
if ($items !== 0)
[328] Fix | Delete
{
[329] Fix | Delete
if (isset($data['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['feed'][0]))
[330] Fix | Delete
{
[331] Fix | Delete
$feed =& $data['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['feed'][0];
[332] Fix | Delete
}
[333] Fix | Delete
elseif (isset($data['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['feed'][0]))
[334] Fix | Delete
{
[335] Fix | Delete
$feed =& $data['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['feed'][0];
[336] Fix | Delete
}
[337] Fix | Delete
elseif (isset($data['child'][SIMPLEPIE_NAMESPACE_RDF]['RDF'][0]))
[338] Fix | Delete
{
[339] Fix | Delete
$feed =& $data['child'][SIMPLEPIE_NAMESPACE_RDF]['RDF'][0];
[340] Fix | Delete
}
[341] Fix | Delete
elseif (isset($data['child'][SIMPLEPIE_NAMESPACE_RSS_20]['rss'][0]))
[342] Fix | Delete
{
[343] Fix | Delete
$feed =& $data['child'][SIMPLEPIE_NAMESPACE_RSS_20]['rss'][0];
[344] Fix | Delete
}
[345] Fix | Delete
else
[346] Fix | Delete
{
[347] Fix | Delete
$feed = null;
[348] Fix | Delete
}
[349] Fix | Delete
[350] Fix | Delete
if ($feed !== null)
[351] Fix | Delete
{
[352] Fix | Delete
$sql = 'SELECT `data` FROM `' . $this->options['extras']['prefix'] . 'items` WHERE `feed_id` = :feed ORDER BY `posted` DESC';
[353] Fix | Delete
if ($items > 0)
[354] Fix | Delete
{
[355] Fix | Delete
$sql .= ' LIMIT ' . $items;
[356] Fix | Delete
}
[357] Fix | Delete
[358] Fix | Delete
$query = $this->mysql->prepare($sql);
[359] Fix | Delete
$query->bindValue(':feed', $this->id);
[360] Fix | Delete
if ($query->execute())
[361] Fix | Delete
{
[362] Fix | Delete
while ($row = $query->fetchColumn())
[363] Fix | Delete
{
[364] Fix | Delete
$feed['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['entry'][] = unserialize($row);
[365] Fix | Delete
}
[366] Fix | Delete
}
[367] Fix | Delete
else
[368] Fix | Delete
{
[369] Fix | Delete
return false;
[370] Fix | Delete
}
[371] Fix | Delete
}
[372] Fix | Delete
}
[373] Fix | Delete
return $data;
[374] Fix | Delete
}
[375] Fix | Delete
return false;
[376] Fix | Delete
}
[377] Fix | Delete
[378] Fix | Delete
/**
[379] Fix | Delete
* Retrieve the last modified time for the cache
[380] Fix | Delete
*
[381] Fix | Delete
* @return int Timestamp
[382] Fix | Delete
*/
[383] Fix | Delete
public function mtime()
[384] Fix | Delete
{
[385] Fix | Delete
if ($this->mysql === null)
[386] Fix | Delete
{
[387] Fix | Delete
return false;
[388] Fix | Delete
}
[389] Fix | Delete
[390] Fix | Delete
$query = $this->mysql->prepare('SELECT `mtime` FROM `' . $this->options['extras']['prefix'] . 'cache_data` WHERE `id` = :id');
[391] Fix | Delete
$query->bindValue(':id', $this->id);
[392] Fix | Delete
if ($query->execute() && ($time = $query->fetchColumn()))
[393] Fix | Delete
{
[394] Fix | Delete
return $time;
[395] Fix | Delete
}
[396] Fix | Delete
[397] Fix | Delete
return false;
[398] Fix | Delete
}
[399] Fix | Delete
[400] Fix | Delete
/**
[401] Fix | Delete
* Set the last modified time to the current time
[402] Fix | Delete
*
[403] Fix | Delete
* @return bool Success status
[404] Fix | Delete
*/
[405] Fix | Delete
public function touch()
[406] Fix | Delete
{
[407] Fix | Delete
if ($this->mysql === null)
[408] Fix | Delete
{
[409] Fix | Delete
return false;
[410] Fix | Delete
}
[411] Fix | Delete
[412] Fix | Delete
$query = $this->mysql->prepare('UPDATE `' . $this->options['extras']['prefix'] . 'cache_data` SET `mtime` = :time WHERE `id` = :id');
[413] Fix | Delete
$query->bindValue(':time', time());
[414] Fix | Delete
$query->bindValue(':id', $this->id);
[415] Fix | Delete
[416] Fix | Delete
return $query->execute() && $query->rowCount() > 0;
[417] Fix | Delete
}
[418] Fix | Delete
[419] Fix | Delete
/**
[420] Fix | Delete
* Remove the cache
[421] Fix | Delete
*
[422] Fix | Delete
* @return bool Success status
[423] Fix | Delete
*/
[424] Fix | Delete
public function unlink()
[425] Fix | Delete
{
[426] Fix | Delete
if ($this->mysql === null)
[427] Fix | Delete
{
[428] Fix | Delete
return false;
[429] Fix | Delete
}
[430] Fix | Delete
[431] Fix | Delete
$query = $this->mysql->prepare('DELETE FROM `' . $this->options['extras']['prefix'] . 'cache_data` WHERE `id` = :id');
[432] Fix | Delete
$query->bindValue(':id', $this->id);
[433] Fix | Delete
$query2 = $this->mysql->prepare('DELETE FROM `' . $this->options['extras']['prefix'] . 'items` WHERE `feed_id` = :id');
[434] Fix | Delete
$query2->bindValue(':id', $this->id);
[435] Fix | Delete
[436] Fix | Delete
return $query->execute() && $query2->execute();
[437] Fix | Delete
}
[438] Fix | Delete
}
[439] Fix | Delete
[440] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function