Changeset 607084
- Timestamp:
- 10/02/2012 05:46:38 PM (14 years ago)
- Location:
- piwigomedia
- Files:
-
- 5 edited
- 11 copied
-
tags/1.0.1 (copied) (copied from piwigomedia/trunk)
-
tags/1.0.1/css/popup.css (copied) (copied from piwigomedia/trunk/css/popup.css)
-
tags/1.0.1/functions.php (copied) (copied from piwigomedia/trunk/functions.php) (2 diffs)
-
tags/1.0.1/js/piwigomedia.js (copied) (copied from piwigomedia/trunk/js/piwigomedia.js)
-
tags/1.0.1/languages/piwigomedia-pt_PT.mo (copied) (copied from piwigomedia/trunk/languages/piwigomedia-pt_PT.mo)
-
tags/1.0.1/languages/piwigomedia-pt_PT.po (copied) (copied from piwigomedia/trunk/languages/piwigomedia-pt_PT.po)
-
tags/1.0.1/languages/piwigomedia.pot (copied) (copied from piwigomedia/trunk/languages/piwigomedia.pot)
-
tags/1.0.1/piwigomedia.php (copied) (copied from piwigomedia/trunk/piwigomedia.php) (1 diff)
-
tags/1.0.1/popup.php (copied) (copied from piwigomedia/trunk/popup.php) (1 diff)
-
tags/1.0.1/query_remote_pwg.php (copied) (copied from piwigomedia/trunk/query_remote_pwg.php) (2 diffs)
-
tags/1.0.1/readme.txt (copied) (copied from piwigomedia/trunk/readme.txt) (2 diffs)
-
trunk/functions.php (modified) (2 diffs)
-
trunk/piwigomedia.php (modified) (1 diff)
-
trunk/popup.php (modified) (1 diff)
-
trunk/query_remote_pwg.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
piwigomedia/tags/1.0.1/functions.php
r606936 r607084 1 1 <?php 2 function curl_post($url, array $post = NULL, array $options = array())2 function pwm_curl_post($url, array $post = NULL, array $options = array()) 3 3 { 4 4 $defaults = array( … … 23 23 } 24 24 25 function curl_get($url, array $get = NULL, array $options = array())25 function pwm_curl_get($url, array $get = NULL, array $options = array()) 26 26 { 27 27 $defaults = array( 28 28 CURLOPT_URL => $url. (strpos($url, '?') === FALSE ? '?' : ''). 29 http_build_query($get ),29 http_build_query($get, '', '&'), 30 30 CURLOPT_HEADER => 0, 31 31 CURLOPT_RETURNTRANSFER => TRUE, -
piwigomedia/tags/1.0.1/piwigomedia.php
r606936 r607084 4 4 Plugin URI: http://joaoubaldo.com 5 5 Description: This plugins allows media from a Piwigo site to be inserted into WordPress posts. 6 Version: 1.0. 06 Version: 1.0.1 7 7 Author: João C. 8 8 Author URI: http://joaoubaldo.com -
piwigomedia/tags/1.0.1/popup.php
r606936 r607084 4 4 // Verify post id 5 5 $error = null; 6 $post_id = $_GET['post_id'];7 if ($post_id == null)8 die('missing post id');9 6 10 7 // Check permissions 11 $post_type = get_post_type($post_id); 12 if ($post_type != 'page' && $post_type != 'post') 13 die('invalid post type'); 14 if ( $post_type == 'page' && !current_user_can('edit_pages')) 8 if (get_current_user_id() == 0) 15 9 die('no access'); 16 if ( $post_type == 'post' && !current_user_can('edit_posts'))17 die('no access');18 19 10 20 11 $sites = array(); -
piwigomedia/tags/1.0.1/query_remote_pwg.php
r606936 r607084 3 3 require_once('functions.php'); 4 4 5 if ( !current_user_can('edit_pages') && !current_user_can('edit_posts')) 5 // Check permissions 6 if (get_current_user_id() == 0) 6 7 die('no access'); 7 8 … … 33 34 $params[$k] = $v; 34 35 } 35 $res = curl_get($site."/ws.php", $params);36 $res = pwm_curl_get($site."/ws.php", $params); 36 37 echo $res; 37 38 ?> -
piwigomedia/tags/1.0.1/readme.txt
r606936 r607084 5 5 Requires at least: 3.0.1 6 6 Tested up to: 3.3.1 7 Stable tag: 1.0. 07 Stable tag: 1.0.1 8 8 9 9 This plugins allows media from a Piwigo site to be inserted into WordPress posts. … … 52 52 53 53 == Changelog == 54 = 1.0.1 = 55 * update: fix to pwm_curl_get(). Some users were experiencing problems with the query built inside this function. 56 * update: permission check now relies on the user being logged on. 57 54 58 = 1.0.0 = 55 59 * Major update: Most of the plugin's core has been rewritten to use jQuery. -
piwigomedia/trunk/functions.php
r606936 r607084 1 1 <?php 2 function curl_post($url, array $post = NULL, array $options = array())2 function pwm_curl_post($url, array $post = NULL, array $options = array()) 3 3 { 4 4 $defaults = array( … … 23 23 } 24 24 25 function curl_get($url, array $get = NULL, array $options = array())25 function pwm_curl_get($url, array $get = NULL, array $options = array()) 26 26 { 27 27 $defaults = array( 28 28 CURLOPT_URL => $url. (strpos($url, '?') === FALSE ? '?' : ''). 29 http_build_query($get ),29 http_build_query($get, '', '&'), 30 30 CURLOPT_HEADER => 0, 31 31 CURLOPT_RETURNTRANSFER => TRUE, -
piwigomedia/trunk/piwigomedia.php
r606936 r607084 4 4 Plugin URI: http://joaoubaldo.com 5 5 Description: This plugins allows media from a Piwigo site to be inserted into WordPress posts. 6 Version: 1.0. 06 Version: 1.0.1 7 7 Author: João C. 8 8 Author URI: http://joaoubaldo.com -
piwigomedia/trunk/popup.php
r606936 r607084 4 4 // Verify post id 5 5 $error = null; 6 $post_id = $_GET['post_id'];7 if ($post_id == null)8 die('missing post id');9 6 10 7 // Check permissions 11 $post_type = get_post_type($post_id); 12 if ($post_type != 'page' && $post_type != 'post') 13 die('invalid post type'); 14 if ( $post_type == 'page' && !current_user_can('edit_pages')) 8 if (get_current_user_id() == 0) 15 9 die('no access'); 16 if ( $post_type == 'post' && !current_user_can('edit_posts'))17 die('no access');18 19 10 20 11 $sites = array(); -
piwigomedia/trunk/query_remote_pwg.php
r606936 r607084 3 3 require_once('functions.php'); 4 4 5 if ( !current_user_can('edit_pages') && !current_user_can('edit_posts')) 5 // Check permissions 6 if (get_current_user_id() == 0) 6 7 die('no access'); 7 8 … … 33 34 $params[$k] = $v; 34 35 } 35 $res = curl_get($site."/ws.php", $params);36 $res = pwm_curl_get($site."/ws.php", $params); 36 37 echo $res; 37 38 ?> -
piwigomedia/trunk/readme.txt
r606936 r607084 5 5 Requires at least: 3.0.1 6 6 Tested up to: 3.3.1 7 Stable tag: 1.0. 07 Stable tag: 1.0.1 8 8 9 9 This plugins allows media from a Piwigo site to be inserted into WordPress posts. … … 52 52 53 53 == Changelog == 54 = 1.0.1 = 55 * update: fix to pwm_curl_get(). Some users were experiencing problems with the query built inside this function. 56 * update: permission check now relies on the user being logged on. 57 54 58 = 1.0.0 = 55 59 * Major update: Most of the plugin's core has been rewritten to use jQuery.
Note: See TracChangeset
for help on using the changeset viewer.