source: extensions/cl_conflit/include/constants.php @ 31979

Last change on this file since 31979 was 8629, checked in by cljosse, 13 years ago

[cl_conflit] compatibility whith piwishack


File size: 1.8 KB
Line 
1<?php
2global $prefixeTable;
3if (!defined('CL_CONFLIT_TABLE')) define('CL_CONFLIT_TABLE', $prefixeTable.'cl_conflit');
4                $path = CONFLIT_PATH;
5          $plg_data = implode( '', file($path.'main.inc.php') );
6          if ( preg_match("|Plugin Name: (.*)|", $plg_data, $val) )
7          {
8            $conflit_plugin['name'] = trim( $val[1] );
9          }
10          if (preg_match("|Version: (.*)|", $plg_data, $val))
11          {
12            $conflit_plugin['version'] = trim($val[1]);
13          }
14          if ( preg_match("|Plugin URI: (.*)|", $plg_data, $val) )
15          {
16            $conflit_plugin['uri'] = trim($val[1]);
17          }
18          if ($desc = load_language('description.txt', $path.'/', array('return' => true)))
19          {
20            $conflit_plugin['description'] = trim($desc);
21          }
22          elseif ( preg_match("|Description: (.*)|", $plg_data, $val) )
23          {
24            $conflit_plugin['description'] = trim($val[1]);
25          }
26          if ( preg_match("|Author: (.*)|", $plg_data, $val) )
27          {
28            $conflit_plugin['author'] = trim($val[1]);
29          }
30          if ( preg_match("|Author URI: (.*)|", $plg_data, $val) )
31          {
32            $conflit_plugin['author uri'] = trim($val[1]);
33          }
34          if (!empty($conflit_plugin['uri']) and strpos($conflit_plugin['uri'] , 'extension_view.php?eid='))
35          {
36            list( , $extension) = explode('extension_view.php?eid=', $conflit_plugin['uri']);
37            if (is_numeric($extension)) $conflit_plugin['extension'] = $extension;
38          }
39          // IMPORTANT SECURITY !
40          $conflit_plugin = array_map('htmlspecialchars', $conflit_plugin);
41
42global $cl_plugin, $cl_version;
43 $cl_version = $conflit_plugin['version'] ;
44 $cl_plugin  = $conflit_plugin;
45 
46?>
Note: See TracBrowser for help on using the repository browser.