Fixes for db/cache counter
[mailer.git] / inc / modules / admin / overview-inc.php
index c55b3909b4fed0d88bb4c6831abfe6ab5c618f20..665d189f4e55e067594d3cae798bfe078b6f7809 100644 (file)
@@ -104,12 +104,17 @@ function OUTPUT_STANDARD_OVERVIEW(&$result_tasks)
 
                                if (!empty($cacheArray['active_extensions'][$ext])) {
                                        // Maybe we want to keept the current extension active?
-                                       if (($cacheArray['active_extensions'][$ext] == "Y") && (!EXT_IS_ACTIVE($ext, true, true))) {
+                                       if (($cacheArray['active_extensions'][$ext] == "Y") && (!EXT_IS_ACTIVE($ext))) {
                                                // Reactivate this extension!
                                                $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_extensions SET ext_active='Y' WHERE ext_name='%s' LIMIT 1",
                                                 array($ext), __FILE__, __LINE__);
-                                               EXTENSION_RUN_SQLS(GET_EXT_ID($ext), "activate");
-                                       }
+
+                                               // Extension has been activated?
+                                               if (SQL_AFFECTEDROWS() == 1) {
+                                                       // Then run all queries
+                                                       EXTENSION_RUN_SQLS(GET_EXT_ID($ext), "activate");
+                                               } // END - if
+                                       } // END - if
                                }
                        }
                }