Permalink
Browse files

Automatically use freshly generated Browserscope IDs on the same page

  • Loading branch information...
1 parent 66574a8 commit 1a3b19992332aec347ab8546e0414ebc6419432e @mathiasbynens committed Dec 18, 2011
Showing with 2 additions and 1 deletion.
  1. +2 −1 _tpl/testPage.tpl
View
@@ -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);
}

0 comments on commit 1a3b199

Please sign in to comment.