$collector->addRoute(['GET'] , '/logs/view' , Module\Admin\Logs\View::class);
$collector->addRoute(['GET', 'POST'], '/logs' , Module\Admin\Logs\Settings::class);
+ $collector->addRoute(['GET'] , '/phpinfo' , Module\Admin\PhpInfo::class);
+
$collector->addRoute(['GET'] , '/queue[/deferred]' , Module\Admin\Queue::class);
$collector->addRoute(['GET', 'POST'], '/site' , Module\Admin\Site::class);
--- /dev/null
+<?php\r
+\r
+namespace Friendica\Module\Admin;\r
+\r
+use Friendica\Module\BaseAdminModule;\r
+\r
+class PhpInfo extends BaseAdminModule\r
+{\r
+ public static function rawContent()\r
+ {\r
+ parent::rawContent();\r
+\r
+ phpinfo();\r
+ exit();\r
+ }\r
+}\r
use Friendica\BaseModule;\r
use Friendica\Core\L10n;\r
use Friendica\Core\Renderer;\r
+use Friendica\Core\System;\r
use Friendica\Database\DBA;\r
\r
abstract class BaseAdminModule extends BaseModule\r
}\r
}\r
\r
+ public static function rawContent()\r
+ {\r
+ if (!is_site_admin()) {\r
+ System::httpExit(403);\r
+ }\r
+\r
+ if (!empty($_SESSION['submanage'])) {\r
+ System::httpExit(403);\r
+ }\r
+\r
+ return '';\r
+ }\r
+\r
public static function content()\r
{\r
if (!is_site_admin()) {\r
'deleteitem' => ['admin/item/delete' , L10n::t('Delete Item') , 'deleteitem'],\r
]],\r
'logs' => [L10n::t('Logs'), [\r
- 'logsconfig' => ['admin/logs/', L10n::t('Logs') , 'logs'],\r
+ 'logsconfig' => ['admin/logs/', L10n::t('Logs') , 'logs'],\r
'logsview' => ['admin/logs/view' , L10n::t('View Logs') , 'viewlogs'],\r
]],\r
'diagnostics' => [L10n::t('Diagnostics'), [\r
+ 'phpinfo' => ['admin/phpinfo' , L10n::t('PHP Info') , 'phpinfo'],\r
'itemsource' => ['admin/item/source' , L10n::t('Item Source') , 'itemsource'],\r
]],\r
];\r