Exemple #1
0
 function updateFeed($id, $name, $description, $table, $type, $options, $fields)
 {
     $options = json_decode($options, true);
     foreach ($options as &$option) {
         $option = BigTreeCMS::replaceHardRoots($option);
     }
     // Fix stuff up for the db.
     $id = sqlescape($id);
     $name = sqlescape(BigTree::safeEncode($name));
     $description = sqlescape(BigTree::safeEncode($description));
     $table = sqlescape($table);
     $type = sqlescape($type);
     $options = BigTree::json($options, true);
     $fields = BigTree::json($fields, true);
     sqlquery("UPDATE bigtree_feeds SET name = '{$name}', description = '{$description}', `table` = '{$table}', type = '{$type}', fields = '{$fields}', options = '{$options}' WHERE id = '{$id}'");
     $this->track("bigtree_feeds", $id, "updated");
 }