Navigation

Search

updateSettings

Description

Updates the settings table ($modSettings array).

Syntax

void updateSettings (array $changeArray[, bool $update[, bool $debug]])



Parameter $changeArray

Expected type: Array
Description: An associative array of settings and their values (variable => value)



Parameter $update

Expected type: Boolean
Description: Whether or not to update the settings one at a time (default is false).



Parameter $debug

Expected type: Boolean
Description: Currently not used. Defaults to false.


Notes

  • Assumes all apostrophes have been escaped.
  • If $update is true, settings are updated one at a time using UPDATE, otherwise all settings are updated at the same time using REPLACE INTO
  • If $update is true, automatically assumes that each setting should be changed; otherwise it only updates settings if their current value is different than their value in $changeArray
View all versions of this function