Extension ext-mediadata continued, wrapper function introduced:
authorRoland Häder <roland@mxchange.org>
Fri, 15 Jul 2011 11:23:30 +0000 (11:23 +0000)
committerRoland Häder <roland@mxchange.org>
Fri, 15 Jul 2011 11:23:30 +0000 (11:23 +0000)
- ext-mediadata: Rewritten output of engine software, version and repository
  data (used revision and when created)
- Wrapper function getDateTimeFromRepository() introduced

inc/config-global.php
inc/functions.php
inc/language/mediadata_de.php
inc/modules/guest/what-mediadata.php
inc/versions.php
inc/wrapper-functions.php
install/tables.sql
templates/de/html/mediadata.tpl

index 65a5c49cb438103a39a2c6f7dfc3dc89342fe5aa..60e9a8b5cc9f00670887e1f837472896361901d8 100644 (file)
@@ -90,7 +90,7 @@ setConfigEntry('VERSION', 'v0.2.1');
 setConfigEntry('AUTHOR' , 'Roland H&auml;der');
 
 // CFG: TITLE
 setConfigEntry('AUTHOR' , 'Roland H&auml;der');
 
 // CFG: TITLE
-setConfigEntry('TITLE', 'Mailer Project');
+setConfigEntry('TITLE', 'Mailer-Project');
 
 // CFG: COPY
 setConfigEntry('COPY', 'Copyright &copy; 2003 - 2009, by Roland H&auml;der,<br />2009 - 2011 by Mailer Developer Team');
 
 // CFG: COPY
 setConfigEntry('COPY', 'Copyright &copy; 2003 - 2009, by Roland H&auml;der,<br />2009 - 2011 by Mailer Developer Team');
index a14ad083909ab1b1ff0ecffa1f698fdce9626594..8ebb9136698b4824fcb3334260f20ab491c4452c 100644 (file)
@@ -645,7 +645,7 @@ function generateRandomCode ($length, $code, $userid, $extraData = '') {
        if (isConfigEntrySet('file_hash')) {
                $keys .= getEncryptSeperator() . getFileHash();
        } // END - if
        if (isConfigEntrySet('file_hash')) {
                $keys .= getEncryptSeperator() . getFileHash();
        } // END - if
-       $keys .= getEncryptSeperator() . getDateFromPatchTime();
+       $keys .= getEncryptSeperator() . getDateFromRepository();
        if (isConfigEntrySet('master_salt')) {
                $keys .= getEncryptSeperator() . getMasterSalt();
        } // END - if
        if (isConfigEntrySet('master_salt')) {
                $keys .= getEncryptSeperator() . getMasterSalt();
        } // END - if
@@ -890,7 +890,7 @@ function generateHash ($plainText, $salt = '', $hash = true) {
                $server = $_SERVER['PHP_SELF'] . getEncryptSeperator() . detectUserAgent() . getEncryptSeperator() . getenv('SERVER_SOFTWARE') . getEncryptSeperator() . detectRealIpAddress() . getEncryptSeperator() . detectRemoteAddr();
 
                // Build key string
                $server = $_SERVER['PHP_SELF'] . getEncryptSeperator() . detectUserAgent() . getEncryptSeperator() . getenv('SERVER_SOFTWARE') . getEncryptSeperator() . detectRealIpAddress() . getEncryptSeperator() . detectRemoteAddr();
 
                // Build key string
-               $keys   = getSiteKey() . getEncryptSeperator() . getDateKey() . getEncryptSeperator() . getSecretKey() . getEncryptSeperator() . getFileHash() . getEncryptSeperator() . getDateFromPatchTime() . getEncryptSeperator() . getMasterSalt();
+               $keys   = getSiteKey() . getEncryptSeperator() . getDateKey() . getEncryptSeperator() . getSecretKey() . getEncryptSeperator() . getFileHash() . getEncryptSeperator() . getDateFromRepository() . getEncryptSeperator() . getMasterSalt();
 
                // Additional data
                $data = $plainText . getEncryptSeperator() . uniqid(mt_rand(), true) . getEncryptSeperator() . time();
 
                // Additional data
                $data = $plainText . getEncryptSeperator() . uniqid(mt_rand(), true) . getEncryptSeperator() . time();
index 97741a811f0ac1aa67e7e5873b2315639f8afb7f..9d34d95dd25f64db5f768724dcbb23cc936b819e 100644 (file)
@@ -70,9 +70,9 @@ addMessages(array(
 
        'MEDIA_DATA_SCRIPT' => "Daten zur verwendeten Software",
        'ENGINE_SOFTWARE' => "Verwendete Engine",
 
        'MEDIA_DATA_SCRIPT' => "Daten zur verwendeten Software",
        'ENGINE_SOFTWARE' => "Verwendete Engine",
-       'ENGINE_VERSION' => "Installierte Mailer Version",
-       'ENGINE_PATCH_LEVEL' => "Patch-Level",
-       'ENGINE_PATCH_CTIME' => "Letzte Aktualisierung",
+       'ENGINE_VERSION' => "Installierte Version",
+       'ENGINE_REVISION' => "Installierte Revision",
+       'ENGINE_REVISION_CREATED' => "Revision erstellt",
 
 // Admin area
        'ADMIN_CONFIG_MEDIADATA_TITLE' => "Einstellungen zu den Mediendaten",
 
 // Admin area
        'ADMIN_CONFIG_MEDIADATA_TITLE' => "Einstellungen zu den Mediendaten",
index 4582ca66d9026972b7dcbe5d4e7657e72774671f..472c29be6e576cf202cde72caf888e891c12ca7d 100644 (file)
@@ -300,9 +300,6 @@ $content['out_points']  = $OUT_POINTS;
 $content['out_user']    = $OUT_USER;
 $content['out_special'] = $OUT_SPECIAL;
 
 $content['out_user']    = $OUT_USER;
 $content['out_special'] = $OUT_SPECIAL;
 
-// Patch timespamp
-$content['patch_ctime'] = generateDateTime(getConfig('patch_ctime'), 2);
-
 // Load template
 loadTemplate('mediadata', false, $content);
 
 // Load template
 loadTemplate('mediadata', false, $content);
 
index d09da3166985bdae1cd2f58f30ecd95030c071fc..6e35f0562abec288f4a1d2823db7ea6fdc21bad2 100644 (file)
@@ -40,7 +40,7 @@ if (!defined('__SECURITY')) {
        die();
 } // END - if
 
        die();
 } // END - if
 
-// If you understand regular expressions ^^^ you may know how I versionize... ;-)
+// Set full version string
 setConfigEntry('FULL_VERSION', getRepositoryData('Tag'));
 
 // Current SVN revision and date
 setConfigEntry('FULL_VERSION', getRepositoryData('Tag'));
 
 // Current SVN revision and date
index 46822ca578fcfc563ac60e7a6b2a074282759256..2eecd1a2ef5931f614b245f5678037d8ea990847 100644 (file)
@@ -1273,11 +1273,23 @@ function encodeEntities ($str) {
 }
 
 // "Getter" for date from patch_ctime
 }
 
 // "Getter" for date from patch_ctime
-function getDateFromPatchTime () {
+function getDateFromRepository () {
        // Is it cached?
        if (!isset($GLOBALS[__FUNCTION__])) {
                // Then set it
        // Is it cached?
        if (!isset($GLOBALS[__FUNCTION__])) {
                // Then set it
-               $GLOBALS[__FUNCTION__] = generateDateTime(getConfig('patch_ctime'), '5');
+               $GLOBALS[__FUNCTION__] = generateDateTime(getConfig('CURRENT_REPOSITORY_DATE'), '5');
+       } // END - if
+
+       // Return cache
+       return $GLOBALS[__FUNCTION__];
+}
+
+// "Getter" for date/time from patch_ctime
+function getDateTimeFromRepository () {
+       // Is it cached?
+       if (!isset($GLOBALS[__FUNCTION__])) {
+               // Then set it
+               $GLOBALS[__FUNCTION__] = generateDateTime(getConfig('CURRENT_REPOSITORY_DATE'), '2');
        } // END - if
 
        // Return cache
        } // END - if
 
        // Return cache
index b5d36fb5da07e63aa7775597ef3e0d61a092c016..528c4deac4b271eacf05a8483649a09d316ff9b2 100644 (file)
@@ -53,7 +53,7 @@ CREATE TABLE `{?_MYSQL_PREFIX?}_config` (
   `profile_update` BIGINT(20) UNSIGNED NOT NULL DEFAULT '15768000',
   `send_prof_update` ENUM('Y','N') NOT NULL DEFAULT 'Y',
   `resend_profile_update` BIGINT(20) UNSIGNED NOT NULL DEFAULT '172800',
   `profile_update` BIGINT(20) UNSIGNED NOT NULL DEFAULT '15768000',
   `send_prof_update` ENUM('Y','N') NOT NULL DEFAULT 'Y',
   `resend_profile_update` BIGINT(20) UNSIGNED NOT NULL DEFAULT '172800',
-  `patch_level` VARCHAR(100) NOT NULL DEFAULT '78',
+  `patch_level` VARCHAR(100) NOT NULL DEFAULT '0',
   `patch_ctime` VARCHAR(10) NOT NULL DEFAULT 0,
   `guest_stats` ENUM('MEMBERS','MODULES','INACTIVE') NOT NULL DEFAULT 'MEMBERS',
   `ref_payout` TINYINT(3) UNSIGNED NOT NULL DEFAULT 5,
   `patch_ctime` VARCHAR(10) NOT NULL DEFAULT 0,
   `guest_stats` ENUM('MEMBERS','MODULES','INACTIVE') NOT NULL DEFAULT 'MEMBERS',
   `ref_payout` TINYINT(3) UNSIGNED NOT NULL DEFAULT 5,
index a7ff5db10d848be2130f8594bba2d0aabaa3296f..93903e128f837d631a56c7ba9b686e0f8fc8a3a0 100644 (file)
        </tr>
        <tr>
                <td class="bottom medium" align="center" colspan="2">
        </tr>
        <tr>
                <td class="bottom medium" align="center" colspan="2">
-                       <div>{--ENGINE_SOFTWARE--}:</div>
-                       <div><strong>{?TITLE?}</strong></div>
+                       <div>{--ENGINE_SOFTWARE--}/{--ENGINE_VERSION--}:</div>
+                       <div><strong>{?TITLE?} v{?FULL_VERSION?}</strong></div>
                </td>
        </tr>
        <tr>
                </td>
        </tr>
        <tr>
-               <td class="bottom media_left" align="right">{--ENGINE_VERSION--}:</td>
-               <td class="bottom media_right">{?FULL_VERSION?}</td>
+               <td class="bottom media_left" align="right">{--ENGINE_REVISION--}:</td>
+               <td class="bottom media_right">{?CURRENT_REPOSITORY_REVISION?}</td>
        </tr>
        <tr>
        </tr>
        <tr>
-               <td class="bottom media_left" align="right">{--ENGINE_PATCH_LEVEL--}:</td>
-               <td class="bottom media_right">{?patch_level?}</td>
-       </tr>
-       <tr>
-               <td class="bottom media_left" align="right">{--ENGINE_PATCH_CTIME--}:</td>
-               <td class="bottom media_right">$content[patch_ctime]</td>
+               <td class="bottom media_left" align="right">{--ENGINE_REVISION_CREATED--}:</td>
+               <td class="bottom media_right">{%pipe,getDateTimeFromRepository%}</td>
        </tr>
        <tr>
                <td class="media_header" colspan="2">
        </tr>
        <tr>
                <td class="media_header" colspan="2">