Changeset 24757 for extensions/SocialButtons/include/install.inc.php
- Timestamp:
- Oct 4, 2013, 10:09:05 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/SocialButtons/include/install.inc.php
r23201 r24757 11 11 'position' => 'toolbar', 12 12 'on_index' => true, 13 'light' => false, 13 14 'twitter' => array( 14 15 'enabled' => true, … … 42 43 { 43 44 $temp = is_string($conf['TumblrShare']) ? unserialize($conf['TumblrShare']) : $conf['TumblrShare']; 44 $default_config['tumblr']['type'] =$temp['type'];45 $default_config['tumblr']['img_size'] = $temp['img_size'];45 if (!empty($temp['type'])) $default_config['tumblr']['type'] = $temp['type']; 46 if (!empty($temp['img_size'])) $default_config['tumblr']['img_size'] = $temp['img_size']; 46 47 } 47 48 if (isset($conf['TweetThis'])) 48 49 { 49 50 $temp = is_string($conf['TweetThis']) ? unserialize($conf['TweetThis']) : $conf['TweetThis']; 50 $default_config['twitter']['size'] =$temp['size'];51 $default_config['twitter']['count'] = $temp['count'] ? 'bubble' : 'none';52 $default_config['twitter']['via'] =$temp['via'];51 if (!empty($temp['type'])) $default_config['twitter']['size'] = $temp['size']; 52 if (!empty($temp['count'])) $default_config['twitter']['count'] = $temp['count'] ? 'bubble' : 'none'; 53 if (!empty($temp['via'])) $default_config['twitter']['via'] = $temp['via']; 53 54 } 54 55 if (isset($conf['GooglePlusOne'])) 55 56 { 56 57 $temp = is_string($conf['GooglePlusOne']) ? unserialize($conf['GooglePlusOne']) : $conf['GooglePlusOne']; 57 $default_config['google']['size'] =$temp['size'];58 $default_config['google']['annotation'] = $temp['annotation'];58 if (!empty($temp['size'])) $default_config['google']['size'] = $temp['size']; 59 if (!empty($temp['annotation'])) $default_config['google']['annotation'] = $temp['annotation']; 59 60 } 60 61 … … 64 65 else 65 66 { 66 $new_conf = unserialize($conf['SocialButtons']);67 $new_conf = is_string($conf['SocialButtons']) ? unserialize($conf['SocialButtons']) : $conf['SocialButtons']; 67 68 68 69 if (empty($new_conf['pinterest'])) … … 74 75 ); 75 76 } 77 76 78 if (!isset($new_conf['on_index'])) 77 79 { … … 84 86 } 85 87 88 if (!isset($new_conf['light'])) 89 { 90 $new_conf['light'] = false; 91 } 92 86 93 $conf['SocialButtons'] = serialize($new_conf); 87 94 conf_update_param('SocialButtons', $conf['SocialButtons']);
Note: See TracChangeset
for help on using the changeset viewer.