Changeset 29251 for extensions/Google2Piwigo
- Timestamp:
- Aug 23, 2014, 12:51:23 PM (10 years ago)
- Location:
- extensions/Google2Piwigo
- Files:
-
- 1 added
- 1 deleted
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/Google2Piwigo/admin.php
r28832 r29251 5 5 6 6 load_language('plugin.lang', PICASA_WA_PATH); 7 $conf['google2piwigo'] = safe_unserialize($conf['google2piwigo']); 7 8 8 9 if (!file_exists(PICASA_WA_CACHE)) -
extensions/Google2Piwigo/include/ws_functions.inc.php
r26198 r29251 28 28 } 29 29 30 global $conf, $pwg_loaded_plugins; 30 global $conf; 31 32 $conf['google2piwigo'] = safe_unserialize($conf['google2piwigo']); 31 33 32 34 include_once(PHPWG_ROOT_PATH . 'admin/include/functions.php'); … … 130 132 if (!empty($params['fills'])) 131 133 { 132 $params['fills'] = rtrim($params['fills'], ','); 133 $params['fills'] = explode(',', $params['fills']); 134 $fills = rtrim($params['fills'], ','); 135 $fills = explode(',', $fills); 136 $fills = array_flip($fills); 134 137 135 138 $updates = array(); 136 if (i n_array('fill_name', $params['fills'])) $updates['name'] = pwg_db_real_escape_string($photo['title']);137 if (i n_array('fill_date', $params['fills'])) $updates['date_creation'] = date('Y-m-d H:i:s', $photo['timestamp']);138 if (i n_array('fill_author', $params['fills'])) $updates['author'] = pwg_db_real_escape_string($photo['author']);139 if (i n_array('fill_description', $params['fills'])) $updates['comment'] = pwg_db_real_escape_string($photo['description']);140 if (i n_array('fill_geotag', $params['fills']) and !empty($photo['latlon']))139 if (isset($fills['fill_name'])) $updates['name'] = pwg_db_real_escape_string($photo['title']); 140 if (isset($fills['fill_date'])) $updates['date_creation'] = date('Y-m-d H:i:s', $photo['timestamp']); 141 if (isset($fills['fill_author'])) $updates['author'] = pwg_db_real_escape_string($photo['author']); 142 if (isset($fills['fill_description'])) $updates['comment'] = pwg_db_real_escape_string($photo['description']); 143 if (isset($fills['fill_geotag']) and !empty($photo['latlon'])) 141 144 { 142 145 $latlon = explode(' ', $photo['latlon']); … … 157 160 } 158 161 159 if (!empty($photo['tags']) and i n_array('fill_tags', $params['fills']))162 if (!empty($photo['tags']) and isset($fills['fill_tags'])) 160 163 { 161 164 set_tags(get_tag_ids($photo['tags']), $photo['image_id']); -
extensions/Google2Piwigo/main.inc.php
r28832 r29251 17 17 define('PICASA_WA_ADMIN', get_root_url() . 'admin.php?page=plugin-' . PICASA_WA_ID); 18 18 define('PICASA_WA_CACHE', PHPWG_ROOT_PATH . $conf['data_location'] . 'picasa_wa_cache/'); 19 define('PICASA_WA_VERSION', 'auto');20 19 21 20 22 include_once(PICASA_WA_PATH . 'include/ws_functions.inc.php'); 21 if (defined('IN_WS')) 22 { 23 include_once(PICASA_WA_PATH . 'include/ws_functions.inc.php'); 23 24 24 25 add_event_handler('init', 'picasa_wa_init'); 26 add_event_handler('ws_add_methods', 'picasa_wa_add_ws_method'); 25 add_event_handler('ws_add_methods', 'picasa_wa_add_ws_method'); 26 } 27 27 28 28 if (defined('IN_ADMIN')) … … 66 66 } 67 67 } 68 69 function picasa_wa_init()70 {71 global $conf;72 include_once(PICASA_WA_PATH . 'maintain.inc.php');73 $maintain = new Google2Piwigo_maintain(PICASA_WA_ID);74 $maintain->autoUpdate(PICASA_WA_VERSION, 'install');75 76 $conf['google2piwigo'] = unserialize($conf['google2piwigo']);77 }
Note: See TracChangeset
for help on using the changeset viewer.