function panels_mini_update_6303 in Panels 6.3
Add the admin description field.
File
- panels_mini/
panels_mini.install, line 167
Code
function panels_mini_update_6303() {
$ret = array();
$field = array(
'type' => 'varchar',
'length' => '128',
'description' => 'The administrative title of the mini panel.',
);
db_add_field($ret, 'panels_mini', 'admin_title', $field);
$result = db_query("SELECT pid, did, title FROM {panels_mini}");
while ($mini = db_fetch_object($result)) {
db_query("UPDATE {panels_mini} SET admin_title = '%s' WHERE pid = %d", $mini->title, $mini->pid);
db_query("UPDATE {panels_display} SET title = '%s' WHERE did = %d", $mini->title, $mini->pid);
}
db_drop_field($ret, 'panels_mini', 'title');
return $ret;
}