Changeset 8086 for branches/2.1/admin/include/themes.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/themes.class.php
r6551 r8086 448 448 global $user; 449 449 450 $pem_category_id = 10; 450 $get_data = array( 451 'category_id' => 10, 452 'format' => 'php', 453 ); 451 454 452 455 // Retrieve PEM versions 453 456 $version = PHPWG_VERSION; 454 457 $versions_to_check = array(); 455 $url = PEM_URL . '/api/get_version_list.php ?category_id='.$pem_category_id.'&format=php';456 if (fetchRemote($url, $result ) and $pem_versions = @unserialize($result))458 $url = PEM_URL . '/api/get_version_list.php'; 459 if (fetchRemote($url, $result, $get_data, get_hosting_technical_details()) and $pem_versions = @unserialize($result)) 457 460 { 458 461 if (!preg_match('/^\d+\.\d+\.\d+/', $version)) … … 485 488 486 489 // Retrieve PEM themes infos 487 $url = PEM_URL . '/api/get_revision_list.php?category_id='.$pem_category_id.'&format=php&last_revision_only=true'; 488 $url .= '&version=' . implode(',', $versions_to_check); 489 $url .= '&lang=' . substr($user['language'], 0, 2); 490 $url .= '&get_nb_downloads=true'; 490 $url = PEM_URL . '/api/get_revision_list.php'; 491 $get_data = array_merge($get_data, array( 492 'last_revision_only' => 'true', 493 'version' => implode(',', $versions_to_check), 494 'lang' => substr($user['language'], 0, 2), 495 'get_nb_downloads' => 'true', 496 ) 497 ); 491 498 492 499 if (!empty($themes_to_check)) 493 500 { 494 $url .= $new ? '&extension_exclude=' : '&extension_include='; 495 $url .= implode(',', $themes_to_check); 496 } 497 if (fetchRemote($url, $result)) 501 if ($new) 502 { 503 $get_data['extension_exclude'] = implode(',', $themes_to_check); 504 } 505 else 506 { 507 $get_data['extension_include'] = implode(',', $themes_to_check); 508 } 509 } 510 if (fetchRemote($url, $result, $get_data)) 498 511 { 499 512 $pem_themes = @unserialize($result); … … 547 560 if ($archive = tempnam( PHPWG_THEMES_PATH, 'zip')) 548 561 { 549 $url = PEM_URL . '/download.php?rid=' . $revision; 550 $url .= '&origin=piwigo_' . $action; 551 552 if ($handle = @fopen($archive, 'wb') and fetchRemote($url, $handle)) 562 $url = PEM_URL . '/download.php'; 563 $get_data = array( 564 'rid' => $revision, 565 'origin' => 'piwigo_'.$action, 566 ); 567 568 if ($handle = @fopen($archive, 'wb') and fetchRemote($url, $handle, $get_data)) 553 569 { 554 570 fclose($handle);
Note: See TracChangeset
for help on using the changeset viewer.