Changeset 19832
- Timestamp:
- Jan 5, 2013, 11:28:38 AM (12 years ago)
- Location:
- extensions/pbase2piwigo
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/pbase2piwigo/include/functions.inc.php
r17434 r19832 346 346 347 347 curl_setopt($ch, CURLOPT_URL, $src); 348 curl_setopt($ch, CURLOPT_HEADER, 0);348 curl_setopt($ch, CURLOPT_HEADER, false); 349 349 curl_setopt($ch, CURLOPT_HTTPHEADER, array("Accept-language: en")); 350 350 curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)'); … … 365 365 } 366 366 367 if (($out = curl_exec($ch)) === false) 367 $out = curl_exec($ch); 368 curl_close($ch); 369 370 if ($out === false) 368 371 { 369 372 return 'file_error'; 370 373 } 371 372 curl_close($ch); 373 374 if (!$return) 374 else if (!$return) 375 375 { 376 376 fclose($newf); -
extensions/pbase2piwigo/main.inc.php
r17314 r19832 13 13 global $conf; 14 14 15 define('PBASE_PATH', PHPWG_PLUGINS_PATH . basename(dirname(__FILE__)) . '/'); 16 define('PBASE_ADMIN', get_root_url() . 'admin.php?page=plugin-' . basename(dirname(__FILE__))); 17 define('PBASE_FS_CACHE', $conf['data_location'].'pbase_cache/'); 15 define('PBASE_PATH', PHPWG_PLUGINS_PATH . basename(dirname(__FILE__)) . '/'); 16 define('PBASE_ADMIN', get_root_url() . 'admin.php?page=plugin-' . basename(dirname(__FILE__))); 17 define('PBASE_FS_CACHE', PHPWG_ROOT_PATH . $conf['data_location'] . 'pbase_cache/'); 18 18 19 19 20 if (defined('IN_ADMIN')) … … 31 32 } 32 33 34 33 35 include_once(PBASE_PATH . 'include/ws_functions.inc.php'); 34 36 -
extensions/pbase2piwigo/maintain.inc.php
r17225 r19832 1 1 <?php 2 2 if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); 3 4 define(5 'pbase2piwigo_default_config',6 serialize(array(7 ))8 );9 3 10 4 … … 13 7 global $conf; 14 8 15 // conf_update_param('pbase2piwigo', pbase2piwigo_default_config); 16 17 mkdir($conf['data_location'].'pbase_cache/', 0755); 9 mkgetdir(PHPWG_ROOT_PATH . $conf['data_location'] . 'pbase_cache/', MKGETDIR_DEFAULT&~MKGETDIR_DIE_ON_ERROR); 18 10 } 19 11 … … 21 13 { 22 14 global $conf; 23 24 // if (empty($conf['pbase2piwigo']))25 // {26 // conf_update_param('pbase2piwigo', pbase2piwigo_default_config);27 // }28 15 29 if (!file_exists( $conf['data_location'].'pbase_cache/'))16 if (!file_exists(PHPWG_ROOT_PATH . $conf['data_location'] . 'pbase_cache/')) 30 17 { 31 mk dir($conf['data_location'].'pbase_cache/', 0755);18 mkgetdir(PHPWG_ROOT_PATH . $conf['data_location'] . 'pbase_cache/', MKGETDIR_DEFAULT&~MKGETDIR_DIE_ON_ERROR); 32 19 } 33 20 } … … 35 22 function plugin_uninstall() 36 23 { 37 // pwg_query('DELETE FROM `'. CONFIG_TABLE .'` WHERE param = "pbase2piwigo" LIMIT 1;');24 global $conf; 38 25 39 rrmdir( $conf['data_location'].'pbase_cache/');26 rrmdir(PHPWG_ROOT_PATH . $conf['data_location'] . 'pbase_cache/'); 40 27 } 41 28
Note: See TracChangeset
for help on using the changeset viewer.