Core  3.2
PHP API documentation
 All Data Structures Namespaces Files Functions Variables Pages
freedom_refresh.php
Go to the documentation of this file.
1 <?php
2 /*
3  * @author Anakeen
4  * @package FDL
5 */
6 /**
7  * Generated Header (not documented yet)
8  *
9  * @author Anakeen
10  * @version $Id: freedom_refresh.php,v 1.22 2008/12/12 17:48:25 eric Exp $
11  * @package FDL
12  * @subpackage
13  */
14 
15 error_log("*** API script 'freedom_refresh' is deprecated! You should use 'refreshDocuments' instead. ***");
16 
17 $wsh = array_shift($argv);
18 if (substr($wsh, 0, 1) != '/') {
19  $realwsh = realpath($wsh);
20  if ($realwsh === false) {
21  error_log("Error: could not get real path of '%s'.", $wsh);
22  exit(1);
23  }
24  $wsh = $realwsh;
25 }
26 $args = array(
27  escapeshellarg($wsh)
28 );
29 foreach ($argv as $arg) {
30  if (preg_match('/^--api=/', $arg)) {
31  $arg = '--api=refreshDocuments';
32  }
33  $args[] = escapeshellarg($arg);
34 }
35 $cmd = join(' ', $args);
36 $ret = 0;
37 $out = system($cmd, $ret);
38 if ($out === false) {
39  error_log("Error: could not execute command '%s'.", $cmd);
40  exit(1);
41 }
42 exit($ret);
switch($command) exit
Definition: checkVault.php:46
foreach($argv as $arg) $cmd
if(substr($wsh, 0, 1)!= '/') $args
← centre documentaire © anakeen