"fields" => array(
"url" => array("type" => "varchar(255)", "not null" => "1", "primary" => "1"),
"content" => array("type" => "text", "not null" => "1"),
+ "created" => array("type" => "datetime", "not null" => "1", "default" => "0000-00-00 00:00:00"),
),
"indexes" => array(
"PRIMARY" => array("url"),
+ "created" => array("created"),
)
);
$database["parsed_url"] = array(
"guessing" => array("type" => "tinyint(1)", "not null" => "1", "default" => "0", "primary" => "1"),
"oembed" => array("type" => "tinyint(1)", "not null" => "1", "default" => "0", "primary" => "1"),
"content" => array("type" => "text", "not null" => "1"),
+ "created" => array("type" => "datetime", "not null" => "1", "default" => "0000-00-00 00:00:00"),
),
"indexes" => array(
"PRIMARY" => array("url", "guessing", "oembed"),
+ "created" => array("created"),
)
);
$database["pconfig"] = array(
else { //save in cache
$j = json_decode($txt);
if ($j->type != "error")
- q("INSERT INTO `oembed` (`url`, `content`) VALUES ('%s', '%s')",
- dbesc(normalise_link($embedurl)), dbesc($txt));
+ q("INSERT INTO `oembed` (`url`, `content`, `created`) VALUES ('%s', '%s', '%s')",
+ dbesc(normalise_link($embedurl)), dbesc($txt), dbesc(datetime_convert()));
Cache::set($a->videowidth . $embedurl,$txt, CACHE_DAY);
}
$data = parseurl_getsiteinfo($url, $no_guessing, $do_oembed);
- q("INSERT INTO `parsed_url` (`url`, `guessing`, `oembed`, `content`) VALUES ('%s', %d, %d, '%s')",
- dbesc(normalise_link($url)), intval(!$no_guessing), intval($do_oembed), dbesc(serialize($data)));
+ q("INSERT INTO `parsed_url` (`url`, `guessing`, `oembed`, `content`, `created`) VALUES ('%s', %d, %d, '%s', '%s')",
+ dbesc(normalise_link($url)), intval(!$no_guessing), intval($do_oembed), dbesc(serialize($data)), dbesc(datetime_convert()));
return $data;
}