X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fextensions%2Fext-rallye.php;h=82c7fe91fb5a2f5ad3414a07fc9d17a4f2ad60ee;hb=8d4176053d397a86baca20b4d7ab7ed526355be8;hp=816f95cc5177777ff0701e90931cd491e31c1965;hpb=a846d847b39b17912f5255eb448402707a328682;p=mailer.git diff --git a/inc/extensions/ext-rallye.php b/inc/extensions/ext-rallye.php index 816f95cc51..82c7fe91fb 100644 --- a/inc/extensions/ext-rallye.php +++ b/inc/extensions/ext-rallye.php @@ -51,9 +51,9 @@ setExtensionVersionHistory(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0 switch (getExtensionMode()) { case 'register': // Do stuff when installation is running (modules.php?module=admin is called) // SQL commands to run - addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_rallye_data`"); - addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_rallye_prices`"); - addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_rallye_users`"); + addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_rallye_data`'); + addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_rallye_prices`'); + addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_rallye_users`'); addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_rallye_data` ( id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, admin_id BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, @@ -104,9 +104,9 @@ PRIMARY KEY (id) case 'remove': // Do stuff when removing extension // Drop tables - addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_rallye_data`"); - addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_rallye_prices`"); - addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_rallye_users`"); + addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_rallye_data`'); + addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_rallye_prices`'); + addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_rallye_users`'); // Remove menus addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `action`='rallye'"); @@ -114,7 +114,7 @@ PRIMARY KEY (id) addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_member_menu` WHERE `what`='rallyes'"); // Unregister filter - unregisterFilter('extra_autopurge', 'RALLYE_EXTRA_AUTOPURGE', true, getExtensionDryRun()); + unregisterFilter('extra_autopurge', 'RALLYE_EXTRA_AUTOPURGE', true, isExtensionDryRun()); break; case 'activate': // Do stuff when admin activates this extension @@ -312,7 +312,7 @@ Zudem sollten Sie mindestens folgende Templates (in templates/".getLangu addExtensionUpdateDependency('sql_patches'); // Register filter - registerFilter('extra_autopurge', 'RALLYE_EXTRA_AUTOPURGE', false, true, getExtensionDryRun()); + registerFilter('extra_autopurge', 'RALLYE_EXTRA_AUTOPURGE', false, true, isExtensionDryRun()); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Filter hinzugefügt und ist von sql_patches abhängig."); @@ -331,11 +331,11 @@ Zudem sollten Sie mindestens folgende Templates (in templates/".getLangu // @TODO Move this code into rallye_functions.php if (getOutputMode() != 1) { // Get total member count - $total = countSumTotalData('CONFIRMED', 'user_data', 'userid', 'status', true); + $total = getTotalConfirmedUser(); // Add more data on higher versions $ADD1 = ''; $ADD2 = ''; $OR = ''; - if (getExtensionVersion('rallye') >= '0.2.0') { + if (isExtensionInstalledAndNewer('rallye', '0.2.0')) { $ADD1 = ", `min_users`, `min_prices`"; $ADD2 = ", d.min_users, d.min_prices"; $OR = " OR (d.min_users <= ".$total." AND d.min_users > 0)";