Ignore:
Timestamp:
May 13, 2010, 12:06:29 PM (14 years ago)
Author:
patdenice
Message:

Upgrade work for 2.1.
Language keys have not been inserted yet.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/autoupdate/plugins_update.php

    r4711 r6167  
    55function autoupdate_plugins_update_filter($content, &$smarty)
    66{
    7   $search = '<a href="{$plugin.URL_DOWNLOAD}">{\'plugins_download\'|@translate}</a>';
    8   $replacement = '  <a href="{$plugin.URL_DOWNLOAD}">{\'plugins_download\'|@translate}</a><br>
     7  $l_key = version_compare(PHPWG_VERSION, '2.1', '<') ? 'plugins_download' : 'Download file';
     8
     9  $search = '<a href="{$plugin.URL_DOWNLOAD}">{\''.$l_key.'\'|@translate}</a>';
     10
     11  $replacement = '  <a href="{$plugin.URL_DOWNLOAD}">{\''.$l_key.'\'|@translate}</a><br>
    912    <a href="#" onClick="autoupdate_ignore(\'{$plugin.EXT_NAME}\', true, {$smarty.foreach.plugins_loop.index}); return false;" id="au_ignore_{$smarty.foreach.plugins_loop.index}_true" {if $plugin.EXT_NAME|@in_array:$AU_IGNORE_LIST}style="display: none;"{/if}>{\'Don\\\'t notify on admin homepage\'|@translate}</a>
    1013    <a href="#" onClick="autoupdate_ignore(\'{$plugin.EXT_NAME}\', false, {$smarty.foreach.plugins_loop.index}); return false;" id="au_ignore_{$smarty.foreach.plugins_loop.index}_false" {if !$plugin.EXT_NAME|@in_array:$AU_IGNORE_LIST}style="display: none;"{/if}>{\'Notify on admin homepage\'|@translate}</a>';
     
    1821  jQuery.post(
    1922    "'.PHPWG_ROOT_PATH.'plugins/autoupdate/remote.php",
    20     { "autoupdate_ignore[]": [name, bool] },
     23    { "autoupdate_ignore'.(version_compare(PHPWG_VERSION, '2.1', '<') ? '[]' : '').'": [name, bool] },
    2124    function(data) {
    2225      if (data == "ok") {
     
    3033';
    3134
    32 //$template->delete_compiled_templates();
    3335$template->block_html_head('', $script_head, $smarty, $repeat);
    3436$template->set_prefilter('plugins', 'autoupdate_plugins_update_filter');
Note: See TracChangeset for help on using the changeset viewer.