289
edits
| Line 64: | Line 64: | ||
== Importing/Exporting == | == Importing/Exporting == | ||
=== Importing charts === | === Importing charts === | ||
The format is... | The format is a serialized array of charts. The array structure looks like this: | ||
$charts - array, where | |||
$charts[$i] - chart #i object with fields title, description, type, etc | |||
$charts[$i]['q'][$j] - query #j for each chart (#i), with fields url, mapping, etc | |||
$charts[$i]['q'][$j]['r'][$k] - result #k for each query #j for each chart #i, with fields bugs, count, label, etc | |||
Importing should not be allowed for most users, as it is a massive dump of charts into a database. Also, there is no input validation - as long as the unserialize() process passes, anything can be inserted into the database. | |||
Read about serialize() and unserialize() here: | |||
http://us2.php.net/serialize | |||
http://us2.php.net/unserialize | |||
= Sharing pages = | = Sharing pages = | ||
edits