Changeset 6846
- Timestamp:
- Sep 4, 2010, 9:16:02 PM (14 years ago)
- Location:
- extensions/user_tags
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/user_tags/CHANGELOG
r6818 r6846 1 User Tags 0.3.2 - 2010-09-04 2 ================================ 3 * Fix problem of permission check 4 1 5 User Tags 0.3.1 - 2010-08-29 2 6 ================================ -
extensions/user_tags/admin.php
r6813 r6846 28 28 $me = get_plugin_data($plugin_id); 29 29 $save_config = false; 30 31 if (!empty($_GET['action']) && in_array($_GET['action'], array('add', 'get'))) {32 include_once T4U_PLUGIN_ROOT . "/include/t4u_admin_action.inc.php";33 }34 30 35 31 $status_options[null] = '----------'; -
extensions/user_tags/include/t4u_admin_action.inc.php
r6818 r6846 25 25 26 26 if (!empty($_GET['action']) && ($_GET['action']=='add') 27 && isset($_POST['tags']) && $ me->getPermission('add')) {27 && isset($_POST['tags']) && $plugin_config->getPermission('add') ) { 28 28 include_once(PHPWG_ROOT_PATH.'admin/include/functions.php'); 29 29 … … 39 39 40 40 echo json_encode($message); 41 Log::getInstance()->debug('message envoyé');42 41 exit(); 43 42 } else { 44 43 redirect(get_absolute_root_url().$_POST['referer']); 45 44 } 46 } elseif (!empty($_GET['action']) && $_GET['action']=='get' && $ me->getPermission('add')) {45 } elseif (!empty($_GET['action']) && $_GET['action']=='get' && $plugin_config->getPermission('add') ) { 47 46 include_once(PHPWG_ROOT_PATH.'admin/include/functions.php'); 48 47 -
extensions/user_tags/include/t4u_config.class.php
r6813 r6846 99 99 } 100 100 101 public function getActionUrl($action, $method='POST') { 102 $url = get_root_url().'admin.php?page=plugin'; 103 $file = basename($this->plugin_dir) . '/' .'admin.php'; 104 if (strtoupper($method)=='POST') { 105 $url .= '&section='.urlencode($file); 106 $url .= '&action='.urlencode($action); 107 } else { 108 $url .= '§ion='.$file; 109 $url .= '&action='.$action; 110 } 101 public function getActionUrl($base_url, $action) { 102 $url = $base_url; 103 $url .= '&action='.$action; 111 104 112 105 return $url; -
extensions/user_tags/include/t4u_content.class.php
r6818 r6846 42 42 $template->assign('T4U_CSS', T4U_CSS); 43 43 $template->assign('T4U_IMGS', T4U_IMGS); 44 $template->assign('T4U_ADD_SCRIPT', $this->plugin_config->getActionUrl( 'add', 'GET'));45 $template->assign('T4U_GET_SCRIPT', $this->plugin_config->getActionUrl( 'get', 'GET'));44 $template->assign('T4U_ADD_SCRIPT', $this->plugin_config->getActionUrl($picture['url'], 'add')); 45 $template->assign('T4U_GET_SCRIPT', $this->plugin_config->getActionUrl($picture['url'], 'get')); 46 46 $template->assign('T4U_IMAGE_ID', $picture['id']); 47 47 $template->assign('T4U_REFERER', htmlentities($picture['url'])); … … 60 60 61 61 return $content; 62 } 62 } 63 63 } 64 64 ?> -
extensions/user_tags/main.inc.php
r6818 r6846 22 22 /* 23 23 Plugin Name: User Tags 24 Version: 0.3. 124 Version: 0.3.2 25 25 Description: Allow visitors to add tag to images 26 26 Plugin URI: http://phpwebgallery.net/ext/extension_view.php?eid=441 -
extensions/user_tags/public.php
r6798 r6846 24 24 } 25 25 26 if (!empty($_GET['action']) && in_array($_GET['action'], array('add', 'get'))) { 27 include_once T4U_PLUGIN_ROOT . "/include/t4u_admin_action.inc.php"; 28 } 29 26 30 include_once T4U_PLUGIN_ROOT . "/include/t4u_content.class.php"; 27 31 -
extensions/user_tags/template/add_tags.tpl
r6806 r6846 3 3 <script type="text/javascript"> 4 4 var related_tags = ''; 5 var class = 'selected'; 6 {if ($T4U_PERMISSION_DELETE==false)} 7 class += ' locked'; 8 {/if} 5 9 {foreach from=$T4U_RELATED_TAGS item=tag key=id} 6 related_tags += '<option value="{$id}" class="selected'; 7 {if ($T4U_PERMISSION_DELETE==false)} 8 related_tags += ' locked'; 9 {/if} 10 related_tags += '">{$tag}</option>'; 10 related_tags += '<option value="{$id}" class="'+class+'">{$tag}</option>'; 11 11 {/foreach} 12 12 var path = new Array();
Note: See TracChangeset
for help on using the changeset viewer.