Commit c1fa6578 authored by Nicholas Thompson's avatar Nicholas Thompson
Browse files

Added CVS $ marker to admin inc and fixed issue with with permissions found in #330253

parent 28b1d530
<?php
// $Id$
/**
* @file
* Admin include file.
*/
/**
* Displays the form for the standard settings tab.
......
......@@ -173,10 +173,12 @@ function page_title_form_alter(&$form, $form_state, $form_id) {
function page_title_nodeapi(&$node, $op, $teaser = NULL, $page = NULL) {
switch ($op) {
case 'update':
db_query("DELETE FROM {page_title} WHERE nid = %d", $node->nid);
if (user_access('set page title')) {
db_query("DELETE FROM {page_title} WHERE nid = %d", $node->nid);
}
// fallthrough to insert intentional!
case 'insert':
if (isset($node->page_title) && drupal_strlen(trim($node->page_title)) > 0) {
if (isset($node->page_title) && drupal_strlen(trim($node->page_title)) > 0 && user_access('set page title')) {
db_query("INSERT INTO {page_title} VALUES (%d, '%s')", $node->nid, $node->page_title);
}
break;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment