Changeset 9712 for extensions
- Timestamp:
- Mar 15, 2011, 8:25:09 PM (13 years ago)
- Location:
- extensions/autoupdate/trunk
- Files:
-
- 1 added
- 1 deleted
- 10 edited
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
extensions/autoupdate/trunk/admin.php
r9707 r9712 3 3 if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); 4 4 5 include_once(AUTOUPDATE_PATH.'include/functions.inc.php');6 include_once(PHPWG_ROOT_PATH.'admin/include/pclzip.lib.php');7 5 include_once(PHPWG_ROOT_PATH.'admin/include/tabsheet.class.php'); 8 6 -
extensions/autoupdate/trunk/ajax/check_updates.php
r9710 r9712 5 5 include_once( PHPWG_ROOT_PATH.'include/common.inc.php' ); 6 6 include_once(PHPWG_ROOT_PATH.'admin/include/functions.php'); 7 include_once(PHPWG_ROOT_PATH.'admin/include/functions_plugins.inc.php');8 7 9 8 check_status(ACCESS_ADMINISTRATOR); -
extensions/autoupdate/trunk/ajax/ignore_list.php
r9710 r9712 5 5 include_once( PHPWG_ROOT_PATH.'include/common.inc.php' ); 6 6 include_once(PHPWG_ROOT_PATH.'admin/include/functions.php'); 7 include_once(PHPWG_ROOT_PATH.'admin/include/functions_plugins.inc.php');8 7 9 8 check_status(ACCESS_ADMINISTRATOR); -
extensions/autoupdate/trunk/ajax/update_language.php
r9710 r9712 5 5 include_once( PHPWG_ROOT_PATH.'include/common.inc.php' ); 6 6 include_once(PHPWG_ROOT_PATH.'admin/include/functions.php'); 7 include_once(PHPWG_ROOT_PATH.'admin/include/functions_plugins.inc.php');8 7 9 8 check_status(ACCESS_ADMINISTRATOR); -
extensions/autoupdate/trunk/ajax/update_plugin.php
r9710 r9712 5 5 include_once(PHPWG_ROOT_PATH.'include/common.inc.php' ); 6 6 include_once(PHPWG_ROOT_PATH.'admin/include/functions.php'); 7 include_once(PHPWG_ROOT_PATH.'admin/include/functions_plugins.inc.php');8 7 9 8 if (!defined('AUTOUPDATE_PATH')) -
extensions/autoupdate/trunk/ajax/update_theme.php
r9710 r9712 5 5 include_once( PHPWG_ROOT_PATH.'include/common.inc.php' ); 6 6 include_once(PHPWG_ROOT_PATH.'admin/include/functions.php'); 7 include_once(PHPWG_ROOT_PATH.'admin/include/functions_plugins.inc.php');8 7 9 8 check_status(ACCESS_ADMINISTRATOR); -
extensions/autoupdate/trunk/include/functions.inc.php
r6351 r9712 295 295 if (!version_compare($_POST['upgrade_to'], PHPWG_VERSION, '>')) 296 296 { 297 redirect(get_ admin_plugin_menu_link(AUTOUPDATE_PATH . '/autoupdate.php'));297 redirect(get_root_url().'admin.php?page=plugin-'.basename(dirname(__FILE__))); 298 298 } 299 299 … … 417 417 } 418 418 419 if (!function_exists('is_webmaster'))420 {421 function is_webmaster($user_status = '')422 {423 return is_autorize_status(ACCESS_WEBMASTER, $user_status);424 }425 }426 427 419 define('AU_DEFAULT_INDEX', file_get_contents(AUTOUPDATE_PATH.'index.php')); 428 420 ?> -
extensions/autoupdate/trunk/main.inc.php
r9710 r9712 28 28 function check_for_auto_upgrade($plugin_menu_links) 29 29 { 30 global $template, $page, $conf, $header_notes, $prefixeTable; 31 32 load_language('plugin.lang', dirname(__FILE__).'/'); 30 global $template, $page, $header_notes; 33 31 34 32 if ($page['page'] == 'intro') … … 44 42 or $_SESSION['need_update'] !== false or $_SESSION['extensions_need_update'] !== array()) 45 43 { 44 load_language('plugin.lang', dirname(__FILE__).'/'); 46 45 $template->set_filename('autoupdate_head', realpath(AUTOUPDATE_PATH.'template/head.tpl')); 47 46 array_push($header_notes, $template->parse('autoupdate_head', true)); -
extensions/autoupdate/trunk/template/update_ext.tpl
r9710 r9712 1 1 {combine_script id='jquery.jgrowl' load='footer' require='jquery' path='themes/default/js/plugins/jquery.jgrowl_minimized.js' } 2 {combine_script id='jquery.autoupdate' load='footer' require='jquery' path='plugins/autoupdate/template/autoupdate.js' } 2 3 {combine_css path="admin/themes/default/uploadify.jGrowl.css"} 3 4 4 {footer_script require='jquery. jgrowl'}5 {footer_script require='jquery.autoupdate,jquery.effects.blind,jquery.jgrowl'} 5 6 var extList = new Array(); 6 7 var confirmMsg = '{'Are you sure?'|@translate|@escape:'javascript'}'; … … 10 11 var restoreMsg = '{'autoupdate_reset_ignore'|@translate|@escape:'javascript'}'; 11 12 13 checkFieldsets(); 14 12 15 {literal} 13 16 jQuery(document).ready(function() { 14 15 17 jQuery("td[id^='desc_'], p[id^='revdesc_']").click(function() { 16 18 id = this.id.split('_'); … … 19 21 return false; 20 22 }); 21 22 jQuery("#update_all").click(function() {23 if (confirm(confirmMsg)) {24 extList = [];25 jQuery('.updateExtension').each( function() {26 if (jQuery(this).parents('div').css('display') == 'block') {27 extList.push(jQuery(this).attr('onClick'));28 }29 });30 if (extList.length > 0) eval(extList[0]);31 }32 return false;33 });34 35 jQuery("#reset_ignore").click(function() {36 jQuery.post(37 "plugins/autoupdate/ajax/ignore_list.php",38 { reset: true },39 function(data) {40 if (data == "ok") {41 jQuery(".pluginBox, fieldset").show();42 jQuery("#up_to_date").hide();43 jQuery("#reset_ignore").hide();44 jQuery("#ignored").hide();45 }46 }47 );48 return false;49 });50 51 23 }); 52 53 function checkFieldsets() { 54 var types = new Array('plugin', 'theme', 'language'); 55 var total = 0; 56 var ignored = 0; 57 for (i=0;i<3;i++) { 58 nbExtensions = 0; 59 jQuery("div[id^='"+types[i]+"_']").each(function(index) { 60 if (jQuery(this).css('display') == 'block') 61 nbExtensions++; 62 else 63 ignored++; 64 }); 65 total = total + nbExtensions; 66 if (nbExtensions == 0) 67 jQuery("#"+types[i]+"s").hide(); 68 } 69 70 if (total == 0) { 71 jQuery("#update_all").hide(); 72 jQuery("#up_to_date").show(); 73 } 74 if (ignored > 0) { 75 jQuery("#reset_ignore").val(restoreMsg + ' (' + ignored + ')'); 76 } 77 } 78 79 function upgradeExtension(type, id, revision) { 80 jQuery.ajax({ 81 type: 'POST', 82 url: 'plugins/autoupdate/ajax/update_'+type+'.php', 83 data: { id: id, revision: revision }, 84 success: function(data) { 85 if (data['result']) { 86 jQuery("#"+type+"_"+id).remove(); 87 checkFieldsets(); 88 jQuery.jGrowl( 89 data['msg'], 90 { 91 theme: 'success', 92 header: successHead, 93 life: 4000, 94 sticky: false 95 } 96 ); 97 if (extList.length > 0) extList.shift(); 98 if (extList.length > 0) eval(extList[0]); 99 } else { 100 jQuery.jGrowl( 101 data['msg'], 102 { 103 theme: 'error', 104 header: errorHead, 105 sticky: true 106 } 107 ); 108 extList = []; 109 } 110 }, 111 error: function(data) { 112 jQuery.jGrowl( 113 errorMsg, 114 { 115 theme: 'error', 116 header: errorHead, 117 sticky: true 118 } 119 ); 120 extList = []; 121 }, 122 dataType: 'json' 123 }); 124 return false; 125 } 126 127 function ignoreExtension(type, id) { 128 jQuery.post( 129 "plugins/autoupdate/ajax/ignore_list.php", 130 { type: type+'s', id: id }, 131 function(data) { 132 if (data == "ok") { 133 jQuery("#"+type+"_"+id).hide(); 134 jQuery("#reset_ignore").show(); 135 checkFieldsets(); 136 } 137 } 138 ); 139 return false; 140 } 141 142 checkFieldsets(); 143 {/literal}{/footer_script} 24 {/literal} 25 {/footer_script} 144 26 145 27 <div class="titrePage"> … … 148 30 149 31 <div> 150 <input type="button" id="update_all" value="{'autoupdate_update_all'|@translate}" >151 <input type="button" id="reset_ignore" value="{'autoupdate_reset_ignore'|@translate}" {if !$SHOW_RESET}style="display:none;"{/if}>32 <input type="button" id="update_all" value="{'autoupdate_update_all'|@translate}" onClick="updateAll();"> 33 <input type="button" id="reset_ignore" value="{'autoupdate_reset_ignore'|@translate}" onClick="resetIgnored();" {if !$SHOW_RESET}style="display:none;"{/if}> 152 34 </div> 153 35 -
extensions/autoupdate/trunk/update_ext.inc.php
r9707 r9712 112 112 $template->assign('update_languages', $update_languages); 113 113 $template->assign('SHOW_RESET', (!empty($conf['AU_ignore']['plugins']) or !empty($conf['AU_ignore']['themes']) or !empty($conf['AU_ignore']['languages']))); 114 $template->set_filename('plugin_admin_content', realpath(AUTOUPDATE_PATH.'template/ extensions.tpl'));114 $template->set_filename('plugin_admin_content', realpath(AUTOUPDATE_PATH.'template/update_ext.tpl')); 115 115 $template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content'); 116 116 -
extensions/autoupdate/trunk/update_pwg.inc.php
r9707 r9712 2 2 3 3 if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); 4 5 include_once(AUTOUPDATE_PATH.'include/functions.inc.php'); 6 include_once(PHPWG_ROOT_PATH.'admin/include/pclzip.lib.php'); 4 7 5 8 /* … … 137 140 ); 138 141 139 $template->set_filename('plugin_admin_content', realpath(AUTOUPDATE_PATH.'template/ autoupdate.tpl'));142 $template->set_filename('plugin_admin_content', realpath(AUTOUPDATE_PATH.'template/update_pwg.tpl')); 140 143 $template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content'); 141 144
Note: See TracChangeset
for help on using the changeset viewer.