return adminSaveSettings($networkData, '_network_data', sprintf("`network_id`=%s", bigintval($id)), array(), false, false);
}
+// Removes given network entry
+function doAdminRemoveNetworkEntry ($table, $column, $id, $limit = 1) {
+ // Remove the entry
+ SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_network_%s` WHERE `%s`=%s LIMIT %s",
+ array($table, $column, $id, $limit), __FILE__, __LINE__);
+
+ // Return affected rows
+ return SQL_AFFECTEDROWS();
+}
+
//------------------------------------------------------------------------------
// Call-back functions
//------------------------------------------------------------------------------
} // END - if
}
+// Removes given networks
+function doAdminNetworkProcessRemovenetworkForm () {
+ // Do we have selections?
+ if (countPostSelection() > 0) {
+ // By default nothing is removed
+ $removed = 0;
+
+ // Something has been selected, so start updating them
+ foreach (postRequestElement('sel') as $id => $sel) {
+ // Update this entry?
+ if ($sel == 1) {
+ // Remove this entry
+ $removed += doAdminRemoveNetworkEntry('data', 'network_id', $id);
+ } // END - if
+ } // END - foreach
+
+ // Do we have removes?
+ if ($removed > 0) {
+ // Removals done
+ loadTemplate('admin_settings_saved', false, sprintf(getMessage('ADMIN_NETWORK_REMOVED'), $removed));
+ } else {
+ // Nothing removed
+ loadTemplate('admin_settings_saved', false, getMessage('ADMIN_NETWORK_NOTHING_REMOVED'));
+ }
+ } // END - if
+}
+
// [EOF]
?>