From cb5f2411d79a29eaeeb2b4259e9d746f7bb1719a Mon Sep 17 00:00:00 2001
From: skodak <skodak>
Date: Tue, 24 Mar 2009 11:01:45 +0000
Subject: [PATCH] MDL-17966 reverting previous commit, solution proposed in
 tracker

---
 lib/adminlib.php | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/lib/adminlib.php b/lib/adminlib.php
index a4b6fc56b8..3edc845cc5 100644
--- a/lib/adminlib.php
+++ b/lib/adminlib.php
@@ -4269,11 +4269,7 @@ function admin_write_settings($formdata) {
             $adminroot->errors[$fullname]->id    = $setting->get_id();
             $adminroot->errors[$fullname]->error = $error;
         }
-        // $SITE didn't update synchronously, and we shouldn't
-        // update in this loop (expensive to do this). $SITE will
-        // be updated at the end of this function, see MDL-17966
-        // if ($original !== serialize($setting->get_setting())) {
-        if ($original !== serialize($data[$fullname])) {
+        if ($original !== serialize($setting->get_setting())) {
             $count++;
             $callbackfunction = $setting->updatedcallback;
             if (function_exists($callbackfunction)) {
-- 
2.39.5