function _make_sure_node_promote_flag_is_off in Invoice 6
Makes sure that node promote flag is off
On ?q=admin/content/node-type/invoice there is a checkbox in the workflow fieldset that is called "Promoted to front page", if this is turned on invoices will be displayed at ?q=node global node overview. Because invoices are private, I guess this must always be disabled for anyone.
2 calls to _make_sure_node_promote_flag_is_off()
- invoice_install in ./
invoice.install - Implementation of hook_install()
- invoice_update_4 in ./
invoice.install - Implementation of hook_update_N()
File
- ./
invoice_helpers.inc, line 570 - Invoice module
Code
function _make_sure_node_promote_flag_is_off() {
$node_options = variable_get('node_options_invoice', array());
if (in_array('promote', $node_options)) {
foreach ($node_options as $key => $option) {
if ($option == 'promote') {
unset($node_options[$key]);
}
}
}
// Set published status
if (!in_array('status', $node_options)) {
$node_options[] = 'status';
}
variable_set('node_options_invoice', $node_options);
}