root/contributed_modules/modules/check_xml.php

Revision 10694, 0.6 kB (checked in by p_lindheimer, 2 years ago)

add check_xml.php to contributed_modules

  • Property svn:executable set to *
Line 
1 #!/usr/bin/php -q
2 <?php
3
4   $module = trim($argv[1],'/');
5
6   if (! @include_once('xml2Array.class.php')) {
7     exec("svn export http://www.freepbx.org/v2/svn/freepbx/trunk/amp_conf/htdocs/admin/libraries/xml2Array.class.php xml2Array.class.php",$exec_out,$ret);
8     if ($ret != 0) die("Could not find xml2Array.class.php, got ret: $ret\n");
9     require_once('xml2Array.class.php');
10   }
11
12   function die_freepbx($string) {
13     echo "Error Parsing XML File:\n";
14     echo $string."\n";
15     exit(10);
16   }
17
18   $xml_data = file_get_contents("$module/module.xml");
19   $parser = new xml2ModuleArray($xml_data);
20   $xmlarray = $parser->parseAdvanced($xml_data);
21   exit;
22
23
Note: See TracBrowser for help on using the browser.