Changeset 443 for trunk/xpressme_integration_kit/wp-content/plugins/xpressme/include/xpress_upgrade.php
- Timestamp:
- Nov 16, 2009, 12:53:31 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/xpressme_integration_kit/wp-content/plugins/xpressme/include/xpress_upgrade.php
r442 r443 5 5 6 6 $xpress_version = $xoops_config->module_version . $xoops_config->module_codename; 7 $check_url = "http://ja1.xpressme.info/version_check/?version=$xpress_version"; 7 $lang = WPLANG; 8 9 $check_url = "http://ja.xpressme.info/version_check/index.php?version=$xpress_version&lang=$lang"; 8 10 9 11 echo '<div class="wrap">'."\n"; … … 13 15 if(get_xpress_latest_version()){ 14 16 $latest = get_option('xpressme_latest_version'); 17 //print_r($latest); 15 18 if ($latest) { 16 19 $site_url=$latest['url']; … … 23 26 if (version_compare($xpress_version, $latest_version, '>')){ 24 27 echo '<h3 class="response">'; 25 printf(__('You are using a XPressME Integration Kit development version (%1$s). Cool! Please <a href="%2$s">stay updated</a>.', 'xpressme') , $xpress_version , $ site_url);28 printf(__('You are using a XPressME Integration Kit development version (%1$s). Cool! Please <a href="%2$s">stay updated</a>.', 'xpressme') , $xpress_version , $latest['develop_url']); 26 29 echo '</h3>'; 27 30 … … 35 38 printf(__('Download %s', 'xpressme') , $latest_version); 36 39 echo '</a>'; 40 41 if ($latest['diff_response'] == 'diff_exists'){ 42 echo '<p>'; 43 printf(__('You can download the differential file from version %s to %s and upgrade it manually:', 'xpressme'),$xpress_version,$latest['diff_latest_version']); 44 echo '</p>'; 45 echo '<a class="button" href="' . $latest['diff_package'] . '">'; 46 printf(__('Download differential file for %s', 'xpressme') , $latest['diff_latest_version']); 47 echo '</a>'; 48 } 37 49 } else { 38 50 echo '<h3 class="response">'. __('You have the latest version of XPressME Integration Kit. You do not need to upgrade', 'xpressme') . '</h3>'; 39 51 } 52 53 if ($latest['develop_response'] == 'development_exists' 54 && !empty($latest['develop_package']) 55 ) 56 { 57 echo '<h3 class="response">'; 58 printf(__('You can use the development version %s download the package and install it manually:', 'xpressme'),$latest['develop_latest_version']); 59 echo '</h3>'; 60 echo '<a class="button" href="' . $latest['develop_package'] . '">'; 61 printf(__('Download %s', 'xpressme') , $latest['develop_latest_version']); 62 echo '</a>'; 63 } 64 40 65 } else { 41 66 echo '<h3 class="response">'; … … 74 99 $lang = WPLANG; 75 100 76 $check_url = "http://ja.xpressme.info/version_check/index 2.php?version=$xpress_version?lang=$lang";101 $check_url = "http://ja.xpressme.info/version_check/index.php?version=$xpress_version&lang=$lang"; 77 102 $request_options = array( 78 103 'timeout' => 3, … … 96 121 $body = str_replace(array("\r\n", "\r"), "\n", $body); 97 122 $returns = explode("\n", $body); 123 98 124 if ( isset( $returns[0] ) ) $response = $returns[0]; else $response = ''; 99 125 if ( isset( $returns[1] ) ) $url = clean_url( $returns[1] ); else $url = ''; 100 126 if ( isset( $returns[2] ) ) $package = clean_url( $returns[2] ); else $package = ''; 101 127 if ( isset( $returns[3] ) ) $latest_version = $returns[3]; else $latest_version = ''; 102 if ( isset( $returns[4] ) ) $ before_version = $returns[4]; else $before_version= '';128 if ( isset( $returns[4] ) ) $lang = $returns[4]; else $lang = ''; 103 129 104 130 // diff 105 if ( isset( $returns[ 5] ) ) $diff_response = $returns[5]; else $diff_response = '';106 if ( isset( $returns[ 6] ) ) $diff_url = clean_url( $returns[6] ); else $diff_url = '';107 if ( isset( $returns[ 7] ) ) $diff_package = clean_url( $returns[7] ); else $diff_package = '';108 if ( isset( $returns[ 8] ) ) $diff_latest_version = $returns[8]; else $diff_latest_version = '';109 if ( isset( $returns[ 9] ) ) $diff_before_version = $returns[9]; else $diff_before_version= '';131 if ( isset( $returns[6] ) ) $diff_response = $returns[6]; else $diff_response = ''; 132 if ( isset( $returns[7] ) ) $diff_url = clean_url( $returns[7] ); else $diff_url = ''; 133 if ( isset( $returns[8] ) ) $diff_package = clean_url( $returns[8] ); else $diff_package = ''; 134 if ( isset( $returns[9] ) ) $diff_latest_version = $returns[9]; else $diff_latest_version = ''; 135 if ( isset( $returns[10] ) ) $diff_lang = $returns[10]; else $diff_lang = ''; 110 136 111 137 // developer 112 if ( isset( $returns[1 0] ) ) $develop_response = $returns[10]; else $develop_response = '';113 if ( isset( $returns[1 1] ) ) $develop_url = clean_url( $returns[11] ); else $develop_url = '';114 if ( isset( $returns[1 2] ) ) $develop_package = clean_url( $returns[12] ); else $develop_package = '';115 if ( isset( $returns[1 3] ) ) $develop_latest_version = $returns[13]; else $develop_latest_version = '';116 if ( isset( $returns[1 4] ) ) $develop_before_version = $returns[14]; else $develop_before_version= '';138 if ( isset( $returns[12] ) ) $develop_response = $returns[12]; else $develop_response = ''; 139 if ( isset( $returns[13] ) ) $develop_url = clean_url( $returns[13] ); else $develop_url = ''; 140 if ( isset( $returns[14] ) ) $develop_package = clean_url( $returns[14] ); else $develop_package = ''; 141 if ( isset( $returns[15] ) ) $develop_latest_version = $returns[15]; else $develop_latest_version = ''; 142 if ( isset( $returns[16] ) ) $develop_lang = $returns[16]; else $develop_lang = ''; 117 143 118 144 $write_options = array ( … … 121 147 'package' => $package , 122 148 'latest_version' => $latest_version , 123 ' before_version' => $before_version,149 'lang' => $lang , 124 150 'diff_response' => $diff_response , 125 151 'diff_url' => $diff_url , 126 152 'diff_package' => $diff_package , 127 153 'diff_latest_version' => $diff_latest_version , 128 'diff_ before_version' => $diff_before_version,154 'diff_lang' => $diff_lang , 129 155 'develop_response' => $develop_response , 130 156 'develop_url' => $develop_url , 131 157 'develop_package' => $develop_package , 132 158 'develop_latest_version' => $develop_latest_version , 133 'develop_ before_version' => $develop_before_version,159 'develop_lang' => $develop_lang , 134 160 'check_time' => time() 135 161 );
Note: See TracChangeset
for help on using the changeset viewer.