function _sbp_paths_edit in Search by Page 7
Same name and namespace in other branches
- 6 sbp_paths.module \_sbp_paths_edit()
Edits or adds new path.
1 string reference to '_sbp_paths_edit'
- sbp_paths_menu in ./
sbp_paths.module - Implements hook_menu().
File
- ./
sbp_paths.module, line 322 - Module file for Search by Page Paths, a sub-module for Search by Page.
Code
function _sbp_paths_edit($environment, $pid = 0) {
if ($pid) {
$values = db_query('SELECT * FROM {sbpp_path} p WHERE p.pid = :pid', array(
':pid' => $pid,
))
->fetchAssoc();
$values['languages'] = @unserialize($values['languages']);
if (!$values['languages']) {
$values['languages'] = array();
}
return drupal_get_form('sbp_paths_edit_form', $values);
}
else {
return drupal_get_form('sbp_paths_edit_form', array(
'environment' => $environment,
));
}
}