X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=inc%2Fextensions%2Fext-mediadata.php;h=24cfd05a38ef220dfb410dcafd4249d7dc182b7b;hb=443e8da00cd49aaf7ba7ed534e90d1c71b0483d0;hp=b7af7fa6ca7927cffbfcd5197e793486f81526f4;hpb=c6838f887ab007b0d82ab9d727ba2d30b4bc5a97;p=mailer.git
diff --git a/inc/extensions/ext-mediadata.php b/inc/extensions/ext-mediadata.php
index b7af7fa6ca..24cfd05a38 100644
--- a/inc/extensions/ext-mediadata.php
+++ b/inc/extensions/ext-mediadata.php
@@ -18,6 +18,7 @@
* svn:keywords Date Revision" (autoprobset!) at least!!!!!! *
* -------------------------------------------------------------------- *
* Copyright (c) 2003 - 2009 by Roland Haeder *
+ * Copyright (c) 2009, 2010 by Mailer Developer Team *
* For more information visit: http://www.mxchange.org *
* *
* This program is free software; you can redistribute it and/or modify *
@@ -56,29 +57,29 @@ switch (getExtensionMode()) {
addExtensionSql('');
// Add the filters
- registerFilter('add_points', 'UPDATE_MEDIADATA_ENTRY', false, true, getExtensionDryRun());
- registerFilter('sub_points', 'UPDATE_MEDIADATA_ENTRY', false, true, getExtensionDryRun());
+ registerFilter('add_points', 'UPDATE_MEDIADATA_ENTRY', false, true, isExtensionDryRun());
+ registerFilter('sub_points', 'UPDATE_MEDIADATA_ENTRY', false, true, isExtensionDryRun());
break;
case 'remove': // Do stuff when removing extension
// SQL commands to run
- addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_mediadata`");
+ addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_mediadata`');
addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `what`='config_mediadata'");
addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_guest_menu` WHERE `what`='mediadata'");
// Remove the filters
- unregisterFilter('add_points', 'UPDATE_MEDIADATA_ENTRY', false, true, getExtensionDryRun());
- unregisterFilter('sub_points', 'UPDATE_MEDIADATA_ENTRY', false, true, getExtensionDryRun());
+ unregisterFilter(__FUNCTION__, __LINE__, 'add_points', 'UPDATE_MEDIADATA_ENTRY', true, isExtensionDryRun());
+ unregisterFilter(__FUNCTION__, __LINE__, 'sub_points', 'UPDATE_MEDIADATA_ENTRY', true, isExtensionDryRun());
break;
case 'activate': // Do stuff when admin activates this extension
// SQL commands to run
- addExtensionSql('');
+ addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_guest_menu` SET `visible`='Y', `locked`='N' WHERE `what`='mediadata' LIMIT 1");
break;
case 'deactivate': // Do stuff when admin deactivates this extension
// SQL commands to run
- addExtensionSql('');
+ addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_guest_menu` SET `visible`='N', `locked`='Y' WHERE `what`='mediadata' LIMIT 1");
break;
case 'update': // Update an extension
@@ -100,7 +101,7 @@ switch (getExtensionMode()) {
case '0.0.4': // SQL queries for v0.0.4
// SQL commands to run
- addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_mediadata`");
+ addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_mediadata`');
addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_mediadata` (
`media_key` VARCHAR(255) NOT NULL DEFAULT '',
`media_value` VARCHAR(255) NOT NULL DEFAULT '',
@@ -131,7 +132,7 @@ PRIMARY KEY (media_key)
// Update notes (these will be set as task text!)
setExtensionUpdateNotes("Start des {?mt_word2?} und Anzahl Anmeldungen aufgenommen. (Task #13)
-Bitte stellen Sie diesen derzeit manuell unter Einstellungen-Medidata selber einstellen.");
+Bitte stellen Sie diesen derzeit manuell unter Einstellungen-Medidata selber einstellen.");
break;
case '0.0.8': // SQL queries for v0.0.8
@@ -158,7 +159,7 @@ Bitte stellen Sie diesen derzeit manuell unter