]> git.mxchange.org Git - mailer.git/blobdiff - inc/libs/mediadata_functions.php
Renamed functions to make it more clear, ext-coupon continued:
[mailer.git] / inc / libs / mediadata_functions.php
index 65ad9e015899ae15a28e616dc483852829e0c262..151aa2783e31a7002a3dd06f9ac1f5538aa9a78c 100644 (file)
@@ -16,7 +16,7 @@
  * $Author::                                                          $ *
  * -------------------------------------------------------------------- *
  * Copyright (c) 2003 - 2009 by Roland Haeder                           *
- * Copyright (c) 2009, 2010 by Mailer Developer Team                    *
+ * Copyright (c) 2009 - 2011 by Mailer Developer Team                   *
  * For more information visit: http://www.mxchange.org                  *
  *                                                                      *
  * This program is free software; you can redistribute it and/or modify *
@@ -38,7 +38,7 @@
 // Some security stuff...
 if (!defined('__SECURITY')) {
        die();
-}
+} // END - if
 
 // Update an entry
 function updateMediadataEntry ($keys_array, $mode, $value) {
@@ -108,8 +108,10 @@ function getMediadataEntry ($key) {
        $value = '';
 
        // Check for entry
-       $result = SQL_QUERY_ESC("SELECT media_value FROM `{?_MYSQL_PREFIX?}_mediadata` WHERE media_key='%s' LIMIT 1",
+       $result = SQL_QUERY_ESC("SELECT `media_value` FROM `{?_MYSQL_PREFIX?}_mediadata` WHERE `media_key`='%s' LIMIT 1",
                array($key), __FUNCTION__, __LINE__);
+
+       // Do we have one?
        if (SQL_NUMROWS($result) == 1) {
                // Load data
                list($value) = SQL_FETCHROW($result);
@@ -119,14 +121,5 @@ function getMediadataEntry ($key) {
        return $value;
 }
 
-// Filter for updating media data
-function FILTER_UPDATE_MEDIADATA_ENTRY ($data) {
-       // Execute the filter function
-       $data['added'] = ($data['added'] && updateMediadataEntry(array('total_points'), $data['mode'], $data['points']));
-
-       // Return data
-       return $data;
-}
-
-//
+// [EOF]
 ?>