]> git.mxchange.org Git - friendica.git/blob - util/typo.php
Merge branch 'master' of https://github.com/friendica/friendica
[friendica.git] / util / typo.php
1 <?php
2         // Tired of chasing typos and finding them after a commit. 
3         // Run this from cmdline in basedir and quickly see if we've 
4         // got any parse errors in our application files.
5
6
7         error_reporting(E_ERROR | E_WARNING | E_PARSE );
8         ini_set('display_errors', '1');
9         ini_set('log_errors','0');
10
11         include 'boot.php';
12         
13         $a = new App();
14
15         echo "Directory: mod\n";
16         $files = glob('mod/*.php');
17         foreach($files as $file) {
18                 echo $file . "\n";
19                 include_once($file);
20         }
21
22         echo "Directory: include\n";
23         $files = glob('include/*.php');
24         foreach($files as $file) {
25                 echo $file . "\n";
26                 include_once($file);
27         }
28     
29     echo "Directory: object\n";
30         $files = glob('object/*.php');
31         foreach($files as $file) {
32                 echo $file . "\n";
33                 include_once($file);
34         }
35
36         echo "Directory: addon\n";
37         $dirs = glob('addon/*');
38
39         foreach($dirs as $dir) {
40                 $addon = basename($dir);
41                 $files = glob($dir . '/' . $addon . '.php');
42                 foreach($files as $file) {
43                         echo $file . "\n";
44                         include_once($file);
45                 }
46         }
47
48         if(x($a->config,'php_path'))
49                 $phpath = $a->config['php_path'];
50         else
51                 $phpath = 'php';
52
53         echo "String files\n";
54
55         echo 'util/strings.php' . "\n";
56         include_once('util/strings.php');
57         echo count($a->strings) . ' strings' . "\n";
58
59         $files = glob('view/*/strings.php');
60
61         foreach($files as $file) {
62                 echo $file . "\n";
63         passthru($phpath . ' util/typohelper.php ' . $file);
64 //              include_once($file);
65         }