Changeset 5143
- Timestamp:
- Mar 15, 2010, 2:35:35 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin.php
r5139 r5143 124 124 'U_CONFIG_EXTENTS'=> $link_start.'extend_for_templates', 125 125 'U_CONFIG_MENUBAR'=> $link_start.'menubar', 126 'U_CONFIG_THEMES'=> $link_start.'themes_new', 126 127 'U_CATEGORIES'=> $link_start.'cat_list', 127 128 'U_MOVE'=> $link_start.'cat_move', -
trunk/admin/include/plugins.class.php
r4385 r5143 269 269 * Retrieve PEM server datas to $server_plugins 270 270 */ 271 function get_server_plugins($new=false )271 function get_server_plugins($new=false, $ext_type='plugin') 272 272 { 273 273 global $user; 274 275 $pem_category_id = 12; 276 if ('theme' == $ext_type) 277 { 278 $pem_category_id = 10; 279 } 274 280 275 281 // Retrieve PEM versions 276 282 $version = PHPWG_VERSION; 277 283 $versions_to_check = array(); 278 $url = PEM_URL . '/api/get_version_list.php?category_id= 12&format=php';284 $url = PEM_URL . '/api/get_version_list.php?category_id='.$pem_category_id.'&format=php'; 279 285 if (fetchRemote($url, $result) and $pem_versions = @unserialize($result)) 280 286 { … … 308 314 309 315 // Retrieve PEM plugins infos 310 $url = PEM_URL . '/api/get_revision_list.php?category_id= 12&format=php&last_revision_only=true';316 $url = PEM_URL . '/api/get_revision_list.php?category_id='.$pem_category_id.'&format=php&last_revision_only=true'; 311 317 $url .= '&version=' . implode(',', $versions_to_check); 312 318 $url .= '&lang=' . substr($user['language'], 0, 2); … … 365 371 * @param string - plugin id or extension id 366 372 */ 367 function extract_plugin_files($action, $revision, $dest) 368 { 369 if ($archive = tempnam( PHPWG_PLUGINS_PATH, 'zip')) 373 function extract_plugin_files($action, $revision, $dest, $ext_type = 'plugin') 374 { 375 if ('plugin' == $ext_type) 376 { 377 $install_basedir = PHPWG_PLUGINS_PATH; 378 $main_filename = 'main.inc.php'; 379 } 380 elseif ('theme' == $ext_type) 381 { 382 $install_basedir = PHPWG_ROOT_PATH.'themes/'; 383 $main_filename = 'themeconf.inc.php'; 384 } 385 else 386 { 387 fatal_error('unknown extension type "'.$ext_type.'"'); 388 } 389 390 if ($archive = tempnam( $install_basedir, 'zip')) 370 391 { 371 392 $url = PEM_URL . '/download.php?rid=' . $revision; … … 382 403 { 383 404 // we search main.inc.php in archive 384 if (basename($file['filename']) == 'main.inc.php'405 if (basename($file['filename']) == $main_filename 385 406 and (!isset($main_filepath) 386 407 or strlen($file['filename']) < strlen($main_filepath))) … … 394 415 if ($action == 'upgrade') 395 416 { 396 $extract_path = PHPWG_PLUGINS_PATH. $dest;417 $extract_path = $install_basedir . $dest; 397 418 } 398 419 else 399 420 { 400 $extract_path = PHPWG_PLUGINS_PATH421 $extract_path = $install_basedir 401 422 . ($root == '.' ? 'extension_' . $dest : basename($root)); 402 423 } -
trunk/admin/themes/default/template/admin.tpl
r5123 r5143 23 23 <li><a href="{$U_CONFIG_MENUBAR}">{'Menu'|@translate}</a></li> 24 24 <li><a href="{$U_CONFIG_EXTENTS}">{'Templates'|@translate}</a></li> 25 <li><a href="{$U_CONFIG_THEMES}">{'Themes'|@translate}</a></li> 25 26 </ul> 26 27 </dd>
Note: See TracChangeset
for help on using the changeset viewer.