-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathurl_decode.php
More file actions
55 lines (48 loc) · 1.15 KB
/
url_decode.php
File metadata and controls
55 lines (48 loc) · 1.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<?php defined('BASEPATH') OR exit('No direct script access allowed');
/**
* Inventory Plugin
*
* Fetch specific types of inventory
*
* @package MDV_CMS
* @author MDV.com Dev Team
* @copyright Copyright (c) 2010 - 2011, MDV.com
*
* Usage: {pyro:minifier:local_theme_files js_files="file.js,files2.js"}
*
*/
class Plugin_url_decode extends Plugin
{
/**
* Private Variables
*/
private $base_url;
private $curr_url;
/**
* Plugin Constructor
*/
public function Plugin_url_decode()
{
// Fetch base url
$this->base_url = parseStr( '{pyro:url:site}' );
// Fetch current url
$this->curr_url = parseStr( '{pyro:url:current}' );
}
/**
* Determine inventory url
*/
public function activate_current()
{
// save arguments
$url = $this->attribute( 'url', false );
// extra variables needed
$first_seg = parseStr( '{pyro:url:segments segment="1" default="false"}' );
// eary return
if( $url == $this->curr_url )
return 'active';
// check for `inventory` mode
if( $first_seg == "inventario" && $url == $this->base_url.ltrim( $_SERVER['REQUEST_URI'], "/" ) )
return 'active';
}
}
/* End of file minifier.php */