Skip to content

Commit

Permalink
Automatically use freshly generated Browserscope IDs on the same page
Browse files Browse the repository at this point in the history
  • Loading branch information
mathiasbynens committed Dec 18, 2011
1 parent 66574a8 commit 1a3b199
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion _tpl/testPage.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ if (!empty($_POST)) {
}

if (in_array($item->browserscopeID, array(NULL, ''))) {
$sql = 'UPDATE pages SET browserscopeID = "' . $db->real_escape_string(addBrowserscopeTest($item->title, $item->info, 'http://' . DOMAIN . '/' . $item->slug . ($item->revision > 1 ? '/' . $item->revision : ''))) . '" WHERE id = ' . $item->id . "\n";
$item->browserscopeID = addBrowserscopeTest($item->title, $item->info, 'http://' . DOMAIN . '/' . $item->slug . ($item->revision > 1 ? '/' . $item->revision : ''));
$sql = 'UPDATE pages SET browserscopeID = "' . $db->real_escape_string($item->browserscopeID) . '" WHERE id = ' . $item->id . "\n";
$db->query($sql);
}

Expand Down

0 comments on commit 1a3b199

Please sign in to comment.