]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - scripts/docgen.php
Make attachment fit better in notice: drop text and link
[quix0rs-gnu-social.git] / scripts / docgen.php
index ac0a5c83dcc380a9bab719506d4c498aecc759fd..e8731a7d5afaf78d7c36a2ed942aa8fa8a489841 100755 (executable)
@@ -16,14 +16,15 @@ Options:
 
 ENDOFHELP;
 
-define('INSTALLDIR', realpath(dirname(__FILE__) . '/..'));
+define('INSTALLDIR', dirname(__DIR__));
+define('PUBLICDIR', INSTALLDIR . DIRECTORY_SEPARATOR . 'public');
 set_include_path(INSTALLDIR . DIRECTORY_SEPARATOR . 'extlib' . PATH_SEPARATOR . get_include_path());
 
 $pattern = "*.php *.inc";
 $exclude = 'config.php */extlib/* */local/* */plugins/* */scripts/*';
 $plugin = false;
 
-require_once 'Console/Getopt.php';
+require_once INSTALLDIR . '/vendor/autoload.php';
 $parser = new Console_Getopt();
 $result = $parser->getopt($_SERVER['argv'], $shortoptions, $longoptions);
 if (PEAR::isError($result)) {
@@ -72,9 +73,9 @@ if ($plugin) {
 
 function getVersion()
 {
-    // define('STATUSNET_VERSION', '0.9.1');
+    // define('GNUSOCIAL_VERSION', '0.9.1');
     $source = file_get_contents(INSTALLDIR . '/lib/common.php');
-    if (preg_match('/^\s*define\s*\(\s*[\'"]STATUSNET_VERSION[\'"]\s*,\s*[\'"](.*)[\'"]\s*\)\s*;/m', $source, $matches)) {
+    if (preg_match('/^\s*define\s*\(\s*[\'"]GNUSOCIAL_VERSION[\'"]\s*,\s*[\'"](.*)[\'"]\s*\)\s*;/m', $source, $matches)) {
         return $matches[1];
     }
     return 'unknown';