Changeset 8086 for branches/2.1/admin/include/languages.class.php
- Timestamp:
- Dec 11, 2010, 10:37:44 PM (13 years ago)
- Location:
- branches/2.1
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.1
- Property svn:mergeinfo changed
/trunk merged: 8079-8080,8082-8084
- Property svn:mergeinfo changed
-
branches/2.1/admin/include/languages.class.php
r6551 r8086 197 197 global $user; 198 198 199 $pem_category_id = 8; 199 $get_data = array( 200 'category_id' => 8, 201 'format' => 'php', 202 ); 200 203 201 204 // Retrieve PEM versions 202 205 $version = PHPWG_VERSION; 203 206 $versions_to_check = array(); 204 $url = PEM_URL . '/api/get_version_list.php ?category_id='.$pem_category_id.'&format=php';205 if (fetchRemote($url, $result ) and $pem_versions = @unserialize($result))207 $url = PEM_URL . '/api/get_version_list.php'; 208 if (fetchRemote($url, $result, $get_data, get_hosting_technical_details()) and $pem_versions = @unserialize($result)) 206 209 { 207 210 if (!preg_match('/^\d+\.\d+\.\d+/', $version)) … … 224 227 225 228 // Retrieve PEM languages infos 226 $url = PEM_URL . '/api/get_revision_list.php?category_id='.$pem_category_id.'&format=php&last_revision_only=true'; 227 $url .= '&version=' . implode(',', $versions_to_check); 228 $url .= '&lang='.$user['language']; 229 230 if (fetchRemote($url, $result)) 229 $url = PEM_URL . '/api/get_revision_list.php'; 230 $get_data = array_merge($get_data, array( 231 'last_revision_only' => 'true', 232 'version' => implode(',', $versions_to_check), 233 'lang' => $user['language'], 234 ) 235 ); 236 237 if (fetchRemote($url, $result, $get_data)) 231 238 { 232 239 $pem_languages = @unserialize($result); … … 259 266 if ($archive = tempnam( PHPWG_ROOT_PATH.'language', 'zip')) 260 267 { 261 $url = PEM_URL . '/download.php?rid=' . $revision; 262 $url .= '&origin=piwigo_' . $action; 263 264 if ($handle = @fopen($archive, 'wb') and fetchRemote($url, $handle)) 268 $url = PEM_URL . '/download.php'; 269 $get_data = array( 270 'rid' => $revision, 271 'origin' => 'piwigo_'.$action, 272 ); 273 274 if ($handle = @fopen($archive, 'wb') and fetchRemote($url, $handle, $get_data)) 265 275 { 266 276 fclose($handle);
Note: See TracChangeset
for help on using the changeset viewer.