Skip to content

Instantly share code, notes, and snippets.

@TimWolla
Created May 2, 2013 14:07
Show Gist options
  • Save TimWolla/5502437 to your computer and use it in GitHub Desktop.
Save TimWolla/5502437 to your computer and use it in GitHub Desktop.
$sql = "UPDATE wcf".WCF_N."_page_menu_item
SET isLandingPage = 0";
$statement = WCF::getDB()->prepareStatement($sql);
$statement->execute();
$sql = "SELECT menuItemID
FROM wcf".WCF_N."_page_menu_item
WHERE menuPosition = ?
AND parentMenuItem = ?
AND menuItemController <> ?
ORDER BY showOrder ASC";
$statement = WCF::getDB()->prepareStatement($sql, 1);
$statement->execute(array(
1,
0,
'header',
'',
''
));
$row = $statement->fetchArray();
$sql = "UPDATE wcf".WCF_N."_page_menu_item
SET isLandingPage = ?,
isDisabled = ?
WHERE menuItemID = ?";
$statement = WCF::getDB()->prepareStatement($sql);
$statement->execute(array(
1,
0,
$row['menuItemID']
));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment