Changeset 1991


Ignore:
Timestamp:
06/22/10 09:12:34 (3 years ago)
Author:
shibuya246
Message:

[Branch 1.4] add plugin latest version numbers

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/1.4/libs/Debug.php

    r1918 r1991  
    111111        public function generateReport($h, $type = 'log') 
    112112        { 
     113                $sysinfo = new SystemInfo(); 
     114                $sysinfo->plugin_version_getAll($h); 
     115         
    113116                $report = $this->getSystemData($h); 
    114117                 
     
    176179                // plugins: folder, enabled, version, order 
    177180                 
    178                 $sql = "SELECT plugin_folder, plugin_enabled, plugin_version, plugin_order FROM " . TABLE_PLUGINS . " ORDER BY plugin_order"; 
     181                $sql = "SELECT plugin_folder, plugin_enabled, plugin_version, plugin_order, plugin_latestversion FROM " . TABLE_PLUGINS . " ORDER BY plugin_order"; 
    179182                $plugins = $h->db->get_results($h->db->prepare($sql)); 
    180183                if ($plugins) { 
     
    183186                                $report['hotaru_plugins'][$plugin->plugin_folder]['version'] = $plugin->plugin_version; 
    184187                                $report['hotaru_plugins'][$plugin->plugin_folder]['order'] = $plugin->plugin_order; 
     188                                $report['hotaru_plugins'][$plugin->plugin_folder]['plugin_latestversion'] = $plugin->plugin_latestversion; 
    185189                        } 
    186190                } 
     
    317321                        foreach ($report['hotaru_plugins'] as $key => $value) { 
    318322                                $output .= $value['order'] . ". " . $key . " v." . $value['version'] . " "; 
    319                                 if ($value['enabled']) { $output .= "[enabled] \n"; } else { $output .= "[disabled] \n"; } 
    320                         } 
    321                 } 
     323                                $output .= " (" . $value['plugin_latestversion']  .") "; 
     324                                if ($value['enabled']) { $output .= "[enabled] \n"; } else { $output .= "[disabled] \n"; }                               
     325                        } 
     326                } 
     327                $output .= "\n(Number in brackets above denotes latest versions available at HotaruCMS.org)\n"; 
    322328                 
    323329                $output .= "\n"; 
Note: See TracChangeset for help on using the changeset viewer.