Changeset 8086 for branches/2.1/admin/include/plugins.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/plugins.class.php
r6724 r8086 291 291 global $user; 292 292 293 $get_data = array( 294 'category_id' => 12, 295 'format' => 'php', 296 ); 297 293 298 // Retrieve PEM versions 294 299 $version = PHPWG_VERSION; 295 300 $versions_to_check = array(); 296 $url = PEM_URL . '/api/get_version_list.php ?category_id=12&format=php';297 if (fetchRemote($url, $result ) and $pem_versions = @unserialize($result))301 $url = PEM_URL . '/api/get_version_list.php'; 302 if (fetchRemote($url, $result, $get_data, get_hosting_technical_details()) and $pem_versions = @unserialize($result)) 298 303 { 299 304 if (!preg_match('/^\d+\.\d+\.\d+/', $version)) … … 326 331 327 332 // Retrieve PEM plugins infos 328 $url = PEM_URL . '/api/get_revision_list.php?category_id=12&format=php&last_revision_only=true'; 329 $url .= '&version=' . implode(',', $versions_to_check); 330 $url .= '&lang=' . substr($user['language'], 0, 2); 331 $url .= '&get_nb_downloads=true'; 333 $url = PEM_URL . '/api/get_revision_list.php'; 334 $get_data = array_merge($get_data, array( 335 'last_revision_only' => 'true', 336 'version' => implode(',', $versions_to_check), 337 'lang' => substr($user['language'], 0, 2), 338 'get_nb_downloads' => 'true', 339 ) 340 ); 332 341 333 342 if (!empty($plugins_to_check)) 334 343 { 335 $url .= $new ? '&extension_exclude=' : '&extension_include='; 336 $url .= implode(',', $plugins_to_check); 337 } 338 if (fetchRemote($url, $result)) 344 if ($new) 345 { 346 $get_data['extension_exclude'] = implode(',', $plugins_to_check); 347 } 348 else 349 { 350 $get_data['extension_include'] = implode(',', $plugins_to_check); 351 } 352 } 353 if (fetchRemote($url, $result, $get_data)) 339 354 { 340 355 $pem_plugins = @unserialize($result); … … 387 402 if ($archive = tempnam( PHPWG_PLUGINS_PATH, 'zip')) 388 403 { 389 $url = PEM_URL . '/download.php?rid=' . $revision; 390 $url .= '&origin=piwigo_' . $action; 391 392 if ($handle = @fopen($archive, 'wb') and fetchRemote($url, $handle)) 404 $url = PEM_URL . '/download.php'; 405 $get_data = array( 406 'rid' => $revision, 407 'origin' => 'piwigo_'.$action, 408 ); 409 410 if ($handle = @fopen($archive, 'wb') and fetchRemote($url, $handle, $get_data)) 393 411 { 394 412 fclose($handle);
Note: See TracChangeset
for help on using the changeset viewer.