Ignore:
Timestamp:
Jan 26, 2011, 12:01:48 PM (13 years ago)
Author:
plg
Message:

bug 2132: remove references to the plugin version

Location:
extensions/ContactForm/include
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • extensions/ContactForm/include/cf_common.inc.php

    r8909 r8910  
    66/* ************************** */
    77
    8 // Version
    98define('CF_TITLE',              'cf_plugin_name');
    109
  • extensions/ContactForm/include/cf_functions.inc.php

    r8152 r8910  
    187187}
    188188
    189 function cf_get_history_list($file_name, &$errors = array()) {
    190   // Include language advices
    191   load_language('plugin.lang', CF_PATH);
    192   global $lang;
    193   $month_list = $lang['month'];
    194   $history = array();
    195   if (!file_exists($file_name)) {
    196     array_push($errors, sprintf(l10n('cf_file_not_found'), $file_name));
    197     return $history;
    198   }
    199   $raw_history = file($file_name,
    200                       FILE_IGNORE_NEW_LINES|FILE_SKIP_EMPTY_LINES);
    201 
    202   $index = -1;
    203   array_push($errors, sprintf(l10n('cf_file_empty'), $file_name));
    204   foreach($raw_history as $new_line) {
    205     $pos = strpos($new_line, ' ');
    206     switch ($pos) {
    207       case 0:
    208         // History item
    209         if (isset($history[$index]) and is_array($history[$index])) {
    210           array_push($history[$index]['CHANGES'], trim($new_line));
    211         }
    212         break;
    213       default:
    214         // New history date
    215         $index++;
    216         list($date, $version) = explode(' ', $new_line);
    217         list($year, $month, $day) = explode('-', $date);
    218         $date_array = array('RAW' => $date);
    219         if (isset($month)) {
    220           $month = $month_list[intval($month)];
    221         }
    222         if (isset($year) and isset($month) and isset($day)) {
    223           $date_array['FORMATTED'] = cf_format_date($year,
    224                                                     $month,
    225                                                     $day,
    226                                                     l10n('cf_format_date'));
    227         }
    228         $history[$index] = array(
    229             'DATE'     => $date_array,
    230             'VERSION'  => $version,
    231             'CHANGES'  => array(),
    232           );
    233     }
    234   }
    235   return $history;
    236 }
    237 
    238189?>
Note: See TracChangeset for help on using the changeset viewer.