[SCRIPTS] Make them work in v2 by setting PUBLICDIR

This commit is contained in:
Diogo Cordeiro 2019-07-15 04:10:29 +01:00
parent 5be705ca2a
commit 2e6c7b1bb8
59 changed files with 117 additions and 58 deletions

View File

@ -20,7 +20,8 @@
// Abort if called from a web server // Abort if called from a web server
define('INSTALLDIR', realpath(dirname(__FILE__) . '/..')); define('INSTALLDIR', dirname(__DIR__));
define('PUBLICDIR', INSTALLDIR . DIRECTORY_SEPARATOR . 'public');
$shortoptions = 't:w:'; $shortoptions = 't:w:';
$longoptions = array('tagged=', 'not-tagged='); $longoptions = array('tagged=', 'not-tagged=');

View File

@ -17,7 +17,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
define('INSTALLDIR', realpath(dirname(__FILE__) . '/..')); define('INSTALLDIR', dirname(__DIR__));
define('PUBLICDIR', INSTALLDIR . DIRECTORY_SEPARATOR . 'public');
$shortoptions = 'i:n:f:a:j'; $shortoptions = 'i:n:f:a:j';
$longoptions = array('id=', 'nickname=', 'file=', 'after=', 'json'); $longoptions = array('id=', 'nickname=', 'file=', 'after=', 'json');

View File

@ -18,7 +18,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
define('INSTALLDIR', realpath(dirname(__FILE__) . '/..')); define('INSTALLDIR', dirname(__DIR__));
define('PUBLICDIR', INSTALLDIR . DIRECTORY_SEPARATOR . 'public');
$shortoptions = 'x::'; $shortoptions = 'x::';
$longoptions = array('extensions='); $longoptions = array('extensions=');

View File

@ -18,7 +18,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
define('INSTALLDIR', realpath(dirname(__FILE__) . '/..')); define('INSTALLDIR', dirname(__DIR__));
define('PUBLICDIR', INSTALLDIR . DIRECTORY_SEPARATOR . 'public');
$shortoptions = 'y'; $shortoptions = 'y';
$longoptions = array('yes'); $longoptions = array('yes');

View File

@ -18,7 +18,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
define('INSTALLDIR', realpath(dirname(__FILE__) . '/..')); define('INSTALLDIR', dirname(__DIR__));
define('PUBLICDIR', INSTALLDIR . DIRECTORY_SEPARATOR . 'public');
$shortoptions = 'y'; $shortoptions = 'y';
$longoptions = array('yes'); $longoptions = array('yes');

View File

@ -18,7 +18,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
define('INSTALLDIR', realpath(dirname(__FILE__) . '/..')); define('INSTALLDIR', dirname(__DIR__));
define('PUBLICDIR', INSTALLDIR . DIRECTORY_SEPARATOR . 'public');
$shortoptions = 'y'; $shortoptions = 'y';
$longoptions = array('yes'); $longoptions = array('yes');

View File

@ -18,7 +18,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
define('INSTALLDIR', realpath(dirname(__FILE__) . '/..')); define('INSTALLDIR', dirname(__DIR__));
define('PUBLICDIR', INSTALLDIR . DIRECTORY_SEPARATOR . 'public');
$shortoptions = 'i::n::y'; $shortoptions = 'i::n::y';
$longoptions = array('id=', 'nickname=', 'yes', 'all', 'dry-run'); $longoptions = array('id=', 'nickname=', 'yes', 'all', 'dry-run');

View File

@ -18,7 +18,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
define('INSTALLDIR', realpath(dirname(__FILE__) . '/..')); define('INSTALLDIR', dirname(__DIR__));
define('PUBLICDIR', INSTALLDIR . DIRECTORY_SEPARATOR . 'public');
$shortoptions = "t:l:v:k:"; $shortoptions = "t:l:v:k:";

View File

@ -18,7 +18,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
define('INSTALLDIR', realpath(__DIR__ . '/..')); define('INSTALLDIR', dirname(__DIR__));
define('PUBLICDIR', INSTALLDIR . DIRECTORY_SEPARATOR . 'public');
$shortoptions = 'i:n:o'; $shortoptions = 'i:n:o';
$longoptions = array('id=', 'nickname=', 'owner'); $longoptions = array('id=', 'nickname=', 'owner');

View File

@ -24,7 +24,8 @@
* @license https://www.gnu.org/licenses/agpl.html GNU AGPL v3 or later * @license https://www.gnu.org/licenses/agpl.html GNU AGPL v3 or later
*/ */
define('INSTALLDIR', dirname(__FILE__)); define('INSTALLDIR', dirname(__DIR__));
define('PUBLICDIR', INSTALLDIR . DIRECTORY_SEPARATOR . 'public');
define('GNUSOCIAL', true); define('GNUSOCIAL', true);
define('STATUSNET', true); define('STATUSNET', true);

View File

@ -18,7 +18,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
define('INSTALLDIR', realpath(dirname(__FILE__) . '/..')); define('INSTALLDIR', dirname(__DIR__));
define('PUBLICDIR', INSTALLDIR . DIRECTORY_SEPARATOR . 'public');
$shortoptions = 'b:g:j:n:t:u:w:x:z:'; $shortoptions = 'b:g:j:n:t:u:w:x:z:';
$longoptions = array( $longoptions = array(

View File

@ -18,7 +18,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
define('INSTALLDIR', realpath(dirname(__FILE__) . '/..')); define('INSTALLDIR', dirname(__DIR__));
define('PUBLICDIR', INSTALLDIR . DIRECTORY_SEPARATOR . 'public');
$shortoptions = 'i::u::y'; $shortoptions = 'i::u::y';
$longoptions = array('id=', 'uri=', 'yes'); $longoptions = array('id=', 'uri=', 'yes');

View File

@ -18,7 +18,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
define('INSTALLDIR', realpath(dirname(__FILE__) . '/..')); define('INSTALLDIR', dirname(__DIR__));
define('PUBLICDIR', INSTALLDIR . DIRECTORY_SEPARATOR . 'public');
$shortoptions = 'y'; $shortoptions = 'y';
$longoptions = array('yes'); $longoptions = array('yes');

View File

@ -18,7 +18,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
define('INSTALLDIR', realpath(dirname(__FILE__) . '/..')); define('INSTALLDIR', dirname(__DIR__));
define('PUBLICDIR', INSTALLDIR . DIRECTORY_SEPARATOR . 'public');
$shortoptions = 'i::n::y'; $shortoptions = 'i::n::y';
$longoptions = array('id=', 'nickname=', 'yes'); $longoptions = array('id=', 'nickname=', 'yes');

View File

@ -18,7 +18,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
define('INSTALLDIR', realpath(dirname(__FILE__) . '/..')); define('INSTALLDIR', dirname(__DIR__));
define('PUBLICDIR', INSTALLDIR . DIRECTORY_SEPARATOR . 'public');
$shortoptions = 'i::n::u::y'; $shortoptions = 'i::n::u::y';
$longoptions = array('id=', 'nickname=', 'uri=', 'yes'); $longoptions = array('id=', 'nickname=', 'uri=', 'yes');

View File

@ -17,6 +17,7 @@ Options:
ENDOFHELP; ENDOFHELP;
define('INSTALLDIR', dirname(__DIR__)); define('INSTALLDIR', dirname(__DIR__));
define('PUBLICDIR', INSTALLDIR . DIRECTORY_SEPARATOR . 'public');
set_include_path(INSTALLDIR . DIRECTORY_SEPARATOR . 'extlib' . PATH_SEPARATOR . get_include_path()); set_include_path(INSTALLDIR . DIRECTORY_SEPARATOR . 'extlib' . PATH_SEPARATOR . get_include_path());
$pattern = "*.php *.inc"; $pattern = "*.php *.inc";

View File

@ -18,7 +18,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
define('INSTALLDIR', realpath(dirname(__FILE__) . '/..')); define('INSTALLDIR', dirname(__DIR__));
define('PUBLICDIR', INSTALLDIR . DIRECTORY_SEPARATOR . 'public');
$helptext = <<<END_OF_CHECKSCHEMA_HELP $helptext = <<<END_OF_CHECKSCHEMA_HELP
Attempt to pull a schema definition for a given table. Attempt to pull a schema definition for a given table.
@ -250,4 +251,4 @@ if (count($args)) {
} }
} else { } else {
show_help($helptext); show_help($helptext);
} }

View File

@ -18,7 +18,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
define('INSTALLDIR', realpath(dirname(__FILE__) . '/..')); define('INSTALLDIR', dirname(__DIR__));
define('PUBLICDIR', INSTALLDIR . DIRECTORY_SEPARATOR . 'public');
$longoptions = array('dry-run', 'start=', 'end='); $longoptions = array('dry-run', 'start=', 'end=');

View File

@ -24,7 +24,8 @@ if (isset($_SERVER) && array_key_exists('REQUEST_METHOD', $_SERVER)) {
exit(); exit();
} }
define('INSTALLDIR', realpath(dirname(__FILE__) . '/..')); define('INSTALLDIR', dirname(__DIR__));
define('PUBLICDIR', INSTALLDIR . DIRECTORY_SEPARATOR . 'public');
define('GNUSOCIAL', true); define('GNUSOCIAL', true);
define('STATUSNET', true); // compatibility define('STATUSNET', true); // compatibility

View File

@ -18,7 +18,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
define('INSTALLDIR', realpath(dirname(__FILE__) . '/..')); define('INSTALLDIR', dirname(__DIR__));
define('PUBLICDIR', INSTALLDIR . DIRECTORY_SEPARATOR . 'public');
$helptext = <<<END_OF_FLUSHROUTER_HELP $helptext = <<<END_OF_FLUSHROUTER_HELP
flushrouter.php -s<sitename> flushrouter.php -s<sitename>
@ -31,4 +32,4 @@ require_once INSTALLDIR.'/scripts/commandline.inc';
$cache = Cache::instance(); $cache = Cache::instance();
$cache->delete(Router::cacheKey()); $cache->delete(Router::cacheKey());
print "OK.\n"; print "OK.\n";

View File

@ -18,7 +18,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
define('INSTALLDIR', realpath(dirname(__FILE__) . '/..')); define('INSTALLDIR', dirname(__DIR__));
define('PUBLICDIR', INSTALLDIR . DIRECTORY_SEPARATOR . 'public');
$shortoptions = 'd'; $shortoptions = 'd';
$longoptions = array('delete'); $longoptions = array('delete');
@ -42,4 +43,4 @@ if (empty($sn)) {
print "Flushing cache for {$nickname}..."; print "Flushing cache for {$nickname}...";
$sn->decache(); $sn->decache();
print "OK.\n"; print "OK.\n";

View File

@ -18,7 +18,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
define('INSTALLDIR', realpath(dirname(__FILE__) . '/..')); define('INSTALLDIR', dirname(__DIR__));
define('PUBLICDIR', INSTALLDIR . DIRECTORY_SEPARATOR . 'public');
$helptext = <<<ENDOFHELP $helptext = <<<ENDOFHELP
getpiddir.php - print out the currently configured PID directory getpiddir.php - print out the currently configured PID directory

View File

@ -25,7 +25,8 @@
* daemon names. * daemon names.
*/ */
define('INSTALLDIR', realpath(dirname(__FILE__) . '/..')); define('INSTALLDIR', dirname(__DIR__));
define('PUBLICDIR', INSTALLDIR . DIRECTORY_SEPARATOR . 'public');
$helptext = <<<ENDOFHELP $helptext = <<<ENDOFHELP
getvaliddaemons.php - print out a list of valid daemons that should be started getvaliddaemons.php - print out a list of valid daemons that should be started

View File

@ -20,7 +20,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
define('INSTALLDIR', realpath(dirname(__FILE__) . '/..')); define('INSTALLDIR', dirname(__DIR__));
define('PUBLICDIR', INSTALLDIR . DIRECTORY_SEPARATOR . 'public');
$helptext = <<<END_OF_HELP $helptext = <<<END_OF_HELP
gnusocialversion.php [options] gnusocialversion.php [options]

View File

@ -18,7 +18,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
define('INSTALLDIR', realpath(dirname(__FILE__) . '/..')); define('INSTALLDIR', dirname(__DIR__));
define('PUBLICDIR', INSTALLDIR . DIRECTORY_SEPARATOR . 'public');
$helptext = <<<END_OF_QUEUE_HELP $helptext = <<<END_OF_QUEUE_HELP
USAGE: handlequeued.php <queue> <notice id> USAGE: handlequeued.php <queue> <notice id>

View File

@ -18,7 +18,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
define('INSTALLDIR', realpath(dirname(__FILE__) . '/..')); define('INSTALLDIR', dirname(__DIR__));
define('PUBLICDIR', INSTALLDIR . DIRECTORY_SEPARATOR . 'public');
$shortoptions = 'fi::a'; $shortoptions = 'fi::a';
$longoptions = array('id::', 'foreground', 'all'); $longoptions = array('id::', 'foreground', 'all');

View File

@ -18,7 +18,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
define('INSTALLDIR', realpath(dirname(__FILE__) . '/..')); define('INSTALLDIR', dirname(__DIR__));
define('PUBLICDIR', INSTALLDIR . DIRECTORY_SEPARATOR . 'public');
$shortoptions = 'i:n:f:'; $shortoptions = 'i:n:f:';
$longoptions = array('id=', 'nickname=', 'file='); $longoptions = array('id=', 'nickname=', 'file=');

View File

@ -31,6 +31,7 @@ if (php_sapi_name() !== 'cli') {
} }
define('INSTALLDIR', dirname(__DIR__)); define('INSTALLDIR', dirname(__DIR__));
define('PUBLICDIR', INSTALLDIR . DIRECTORY_SEPARATOR . 'public');
set_include_path(get_include_path() . PATH_SEPARATOR . INSTALLDIR . '/extlib'); set_include_path(get_include_path() . PATH_SEPARATOR . INSTALLDIR . '/extlib');
require_once INSTALLDIR . '/lib/installer.php'; require_once INSTALLDIR . '/lib/installer.php';

View File

@ -17,7 +17,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
define('INSTALLDIR', realpath(dirname(__FILE__) . '/..')); define('INSTALLDIR', dirname(__DIR__));
define('PUBLICDIR', INSTALLDIR . DIRECTORY_SEPARATOR . 'public');
$shortoptions = 'i:n:g:G:'; $shortoptions = 'i:n:g:G:';
$longoptions = array('id=', 'nickname=', 'group=', 'group-id='); $longoptions = array('id=', 'nickname=', 'group=', 'group-id=');

View File

@ -17,7 +17,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
define('INSTALLDIR', realpath(dirname(__FILE__) . '/..')); define('INSTALLDIR', dirname(__DIR__));
define('PUBLICDIR', INSTALLDIR . DIRECTORY_SEPARATOR . 'public');
$shortoptions = 'i:n:g:G:'; $shortoptions = 'i:n:g:G:';
$longoptions = array('id=', 'nickname=', 'group=', 'group-id='); $longoptions = array('id=', 'nickname=', 'group=', 'group-id=');

View File

@ -18,7 +18,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
define('INSTALLDIR', realpath(dirname(__FILE__) . '/..')); define('INSTALLDIR', dirname(__DIR__));
define('PUBLICDIR', INSTALLDIR . DIRECTORY_SEPARATOR . 'public');
$helptext = <<<END_OF_HELP $helptext = <<<END_OF_HELP
Script for converting mail messages into notices. Takes message body Script for converting mail messages into notices. Takes message body

View File

@ -20,7 +20,8 @@
// Abort if called from a web server // Abort if called from a web server
define('INSTALLDIR', realpath(dirname(__FILE__) . '/..')); define('INSTALLDIR', dirname(__DIR__));
define('PUBLICDIR', INSTALLDIR . DIRECTORY_SEPARATOR . 'public');
require_once INSTALLDIR.'/scripts/commandline.inc'; require_once INSTALLDIR.'/scripts/commandline.inc';

View File

@ -18,7 +18,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
define('INSTALLDIR', realpath(dirname(__FILE__) . '/..')); define('INSTALLDIR', dirname(__DIR__));
define('PUBLICDIR', INSTALLDIR . DIRECTORY_SEPARATOR . 'public');
$shortoptions = 'g:n:'; $shortoptions = 'g:n:';
$longoptions = array('nickname=', 'group='); $longoptions = array('nickname=', 'group=');

View File

@ -17,7 +17,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
define('INSTALLDIR', realpath(dirname(__FILE__) . '/..')); define('INSTALLDIR', dirname(__DIR__));
define('PUBLICDIR', INSTALLDIR . DIRECTORY_SEPARATOR . 'public');
$shortoptions = 'i:n:r:w:y'; $shortoptions = 'i:n:r:w:y';
$longoptions = array('id=', 'nickname=', 'remote=', 'password='); $longoptions = array('id=', 'nickname=', 'remote=', 'password=');

View File

@ -18,7 +18,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
define('INSTALLDIR', realpath(dirname(__FILE__) . '/..')); define('INSTALLDIR', dirname(__DIR__));
define('PUBLICDIR', INSTALLDIR . DIRECTORY_SEPARATOR . 'public');
$shortoptions = 'i::yv'; $shortoptions = 'i::yv';
$longoptions = array('id=', 'yes', 'verbose'); $longoptions = array('id=', 'yes', 'verbose');

View File

@ -25,7 +25,8 @@
* @package QueueHandler * @package QueueHandler
*/ */
define('INSTALLDIR', realpath(dirname(__FILE__) . '/..')); define('INSTALLDIR', dirname(__DIR__));
define('PUBLICDIR', INSTALLDIR . DIRECTORY_SEPARATOR . 'public');
$shortoptions = 'ur'; $shortoptions = 'ur';
$longoptions = array('update', 'restart', 'stop'); $longoptions = array('update', 'restart', 'stop');

View File

@ -18,7 +18,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
define('INSTALLDIR', realpath(dirname(__FILE__) . '/..')); define('INSTALLDIR', dirname(__DIR__));
define('PUBLICDIR', INSTALLDIR . DIRECTORY_SEPARATOR . 'public');
$shortoptions = 'fi:at:'; $shortoptions = 'fi:at:';
$longoptions = array('id=', 'foreground', 'all', 'threads='); $longoptions = array('id=', 'foreground', 'all', 'threads=');

View File

@ -18,7 +18,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
define('INSTALLDIR', realpath(dirname(__FILE__) . '/..')); define('INSTALLDIR', dirname(__DIR__));
define('PUBLICDIR', INSTALLDIR . DIRECTORY_SEPARATOR . 'public');
$shortoptions = 'n:w:f:e:'; $shortoptions = 'n:w:f:e:';
$longoptions = array('nickname=', 'password=', 'fullname=', 'email='); $longoptions = array('nickname=', 'password=', 'fullname=', 'email=');

View File

@ -18,7 +18,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
define('INSTALLDIR', realpath(dirname(__FILE__) . '/..')); define('INSTALLDIR', dirname(__DIR__));
define('PUBLICDIR', INSTALLDIR . DIRECTORY_SEPARATOR . 'public');
$shortoptions = 'y'; $shortoptions = 'y';
$longoptions = array('yes'); $longoptions = array('yes');

View File

@ -1,7 +1,8 @@
#!/usr/bin/env php #!/usr/bin/env php
<?php <?php
define('INSTALLDIR', realpath(dirname(__FILE__) . '/..')); define('INSTALLDIR', dirname(__DIR__));
define('PUBLICDIR', INSTALLDIR . DIRECTORY_SEPARATOR . 'public');
$shortoptions = 'e::ay'; $shortoptions = 'e::ay';
$longoptions = array('email=', 'all', 'yes'); $longoptions = array('email=', 'all', 'yes');

View File

@ -17,7 +17,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
define('INSTALLDIR', realpath(dirname(__FILE__) . '/..')); define('INSTALLDIR', dirname(__DIR__));
define('PUBLICDIR', INSTALLDIR . DIRECTORY_SEPARATOR . 'public');
$shortoptions = 'i:n:f:'; $shortoptions = 'i:n:f:';
$longoptions = array('id=', 'nickname=', 'file='); $longoptions = array('id=', 'nickname=', 'file=');

View File

@ -23,7 +23,8 @@
* @link https://www.gnu.org/software/social/ * @link https://www.gnu.org/software/social/
*/ */
define('INSTALLDIR', realpath(dirname(__DIR__))); define('INSTALLDIR', dirname(__DIR__));
define('PUBLICDIR', INSTALLDIR . DIRECTORY_SEPARATOR . 'public');
$shortoptions = 'i:n:a:'; $shortoptions = 'i:n:a:';
$longoptions = ['id=', 'nickname=', 'subject=', 'all=']; $longoptions = ['id=', 'nickname=', 'subject=', 'all='];

View File

@ -16,6 +16,7 @@
// along with GNU social. If not, see <http://www.gnu.org/licenses/>. // along with GNU social. If not, see <http://www.gnu.org/licenses/>.
define('INSTALLDIR', dirname(__DIR__)); define('INSTALLDIR', dirname(__DIR__));
define('PUBLICDIR', INSTALLDIR . DIRECTORY_SEPARATOR . 'public');
$helptext = <<<END_OF_GC_HELP $helptext = <<<END_OF_GC_HELP
sessiongc.php sessiongc.php

View File

@ -18,7 +18,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
define('INSTALLDIR', realpath(dirname(__FILE__) . '/..')); define('INSTALLDIR', dirname(__DIR__));
define('PUBLICDIR', INSTALLDIR . DIRECTORY_SEPARATOR . 'public');
$shortoptions = 'da'; $shortoptions = 'da';
$longoptions = array('delete', 'all'); $longoptions = array('delete', 'all');

View File

@ -18,7 +18,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
define('INSTALLDIR', realpath(dirname(__FILE__) . '/..')); define('INSTALLDIR', dirname(__DIR__));
define('PUBLICDIR', INSTALLDIR . DIRECTORY_SEPARATOR . 'public');
$helptext = <<<END_OF_PASSWORD_HELP $helptext = <<<END_OF_PASSWORD_HELP
setpassword.php <username> <password> setpassword.php <username> <password>

View File

@ -18,7 +18,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
define('INSTALLDIR', realpath(dirname(__FILE__) . '/..')); define('INSTALLDIR', dirname(__DIR__));
define('PUBLICDIR', INSTALLDIR . DIRECTORY_SEPARATOR . 'public');
$shortoptions = 'd'; $shortoptions = 'd';
$longoptions = array('delete'); $longoptions = array('delete');

View File

@ -18,7 +18,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
define('INSTALLDIR', realpath(dirname(__FILE__) . '/..')); define('INSTALLDIR', dirname(__DIR__));
define('PUBLICDIR', INSTALLDIR . DIRECTORY_SEPARATOR . 'public');
$shortoptions = "t:l:v:k:"; $shortoptions = "t:l:v:k:";

View File

@ -18,7 +18,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
define('INSTALLDIR', realpath(dirname(__FILE__) . '/..')); define('INSTALLDIR', dirname(__DIR__));
define('PUBLICDIR', INSTALLDIR . DIRECTORY_SEPARATOR . 'public');
require_once INSTALLDIR.'/scripts/commandline.inc'; require_once INSTALLDIR.'/scripts/commandline.inc';

View File

@ -18,7 +18,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
define('INSTALLDIR', realpath(dirname(__FILE__) . '/..')); define('INSTALLDIR', dirname(__DIR__));
define('PUBLICDIR', INSTALLDIR . DIRECTORY_SEPARATOR . 'public');
$helptext = <<<END_OF_SHOWTABLE_HELP $helptext = <<<END_OF_SHOWTABLE_HELP
showtable.php <tablename> showtable.php <tablename>

View File

@ -20,7 +20,8 @@
// Abort if called from a web server // Abort if called from a web server
define('INSTALLDIR', realpath(dirname(__FILE__) . '/..')); define('INSTALLDIR', dirname(__DIR__));
define('PUBLICDIR', INSTALLDIR . DIRECTORY_SEPARATOR . 'public');
$helptext = <<<ENDOFHELP $helptext = <<<ENDOFHELP
console.php - provide an interactive PHP interpreter for testing console.php - provide an interactive PHP interpreter for testing

View File

@ -18,7 +18,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
define('INSTALLDIR', realpath(dirname(__FILE__) . '/..')); define('INSTALLDIR', dirname(__DIR__));
define('PUBLICDIR', INSTALLDIR . DIRECTORY_SEPARATOR . 'public');
$shortoptions = 'i::n::y'; $shortoptions = 'i::n::y';
$longoptions = array('id=', 'nickname=', 'yes', 'dry-run', 'all'); $longoptions = array('id=', 'nickname=', 'yes', 'dry-run', 'all');

View File

@ -17,7 +17,8 @@
* You should have received a copy of the GNU Affero General Public License * You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
define('INSTALLDIR', realpath(dirname(__FILE__) . '/..')); define('INSTALLDIR', dirname(__DIR__));
define('PUBLICDIR', INSTALLDIR . DIRECTORY_SEPARATOR . 'public');
$helptext = <<<ENDOFHELP $helptext = <<<ENDOFHELP
uncache_users.php <idfile> uncache_users.php <idfile>

View File

@ -24,7 +24,8 @@ if (isset($_SERVER) && array_key_exists('REQUEST_METHOD', $_SERVER)) {
exit(); exit();
} }
define('INSTALLDIR', realpath(dirname(__FILE__) . '/..')); define('INSTALLDIR', dirname(__DIR__));
define('PUBLICDIR', INSTALLDIR . DIRECTORY_SEPARATOR . 'public');
function update_core($dir, $domain) function update_core($dir, $domain)
{ {

View File

@ -24,7 +24,8 @@ if (isset($_SERVER) && array_key_exists('REQUEST_METHOD', $_SERVER)) {
exit(); exit();
} }
define('INSTALLDIR', realpath(dirname(__FILE__) . '/..')); define('INSTALLDIR', dirname(__DIR__));
define('PUBLICDIR', INSTALLDIR . DIRECTORY_SEPARATOR . 'public');
define('GNUSOCIAL', true); define('GNUSOCIAL', true);
define('STATUSNET', true); // compatibility define('STATUSNET', true); // compatibility

View File

@ -18,7 +18,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
define('INSTALLDIR', realpath(dirname(__FILE__) . '/..')); define('INSTALLDIR', dirname(__DIR__));
define('PUBLICDIR', INSTALLDIR . DIRECTORY_SEPARATOR . 'public');
$shortoptions = 'i:n:af'; $shortoptions = 'i:n:af';
$longoptions = array('id=', 'nickname=', 'all', 'force'); $longoptions = array('id=', 'nickname=', 'all', 'force');

View File

@ -18,7 +18,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
define('INSTALLDIR', realpath(dirname(__FILE__) . '/..')); define('INSTALLDIR', dirname(__DIR__));
define('PUBLICDIR', INSTALLDIR . DIRECTORY_SEPARATOR . 'public');
$shortoptions = ''; $shortoptions = '';
$longoptions = array(); $longoptions = array();

View File

@ -28,6 +28,7 @@
*/ */
define('INSTALLDIR', dirname(__DIR__)); define('INSTALLDIR', dirname(__DIR__));
define('PUBLICDIR', INSTALLDIR . DIRECTORY_SEPARATOR . 'public');
$shortoptions = 'dfx::'; $shortoptions = 'dfx::';
$longoptions = ['debug', 'files', 'extensions=']; $longoptions = ['debug', 'files', 'extensions='];

View File

@ -18,7 +18,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
define('INSTALLDIR', realpath(dirname(__FILE__) . '/..')); define('INSTALLDIR', dirname(__DIR__));
define('PUBLICDIR', INSTALLDIR . DIRECTORY_SEPARATOR . 'public');
$shortoptions = 'i:n:e:'; $shortoptions = 'i:n:e:';
$longoptions = array('id=', 'nickname=', 'email='); $longoptions = array('id=', 'nickname=', 'email=');

View File

@ -18,7 +18,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
define('INSTALLDIR', realpath(dirname(__FILE__) . '/..')); define('INSTALLDIR', dirname(__DIR__));
define('PUBLICDIR', INSTALLDIR . DIRECTORY_SEPARATOR . 'public');
$shortoptions = 'i:n:r:d'; $shortoptions = 'i:n:r:d';
$longoptions = array('id=', 'nickname=', 'role=', 'delete'); $longoptions = array('id=', 'nickname=', 'role=', 'delete');