قرینه از
https://github.com/matomo-org/matomo.git
synced 2025-08-22 06:57:53 +00:00

* [Coding Style] Enable rule PSR12.Files.FileHeader * Apply CS * Replace Piwik with Matomo in file headers * Unify file headers (position, no. of lines, https links) * Rebuild dist files * Apply CS * Fix system test that relies on line numbers in a file that had the file header updated --------- Co-authored-by: Stefan Giehl <stefan@matomo.org>
40 خطوط
1.3 KiB
PHP
40 خطوط
1.3 KiB
PHP
<?php
|
|
|
|
/**
|
|
* Matomo - free/libre analytics platform
|
|
*
|
|
* @link https://matomo.org
|
|
* @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
|
|
*/
|
|
|
|
namespace Piwik\Plugins\Diagnostics\Diagnostic;
|
|
|
|
use Piwik\Filesystem;
|
|
use Piwik\Translation\Translator;
|
|
use Piwik\Url;
|
|
|
|
class RecommendedPrivateDirectories extends AbstractPrivateDirectories
|
|
{
|
|
protected $privatePaths = ['tmp/', 'tmp/empty', 'lang/en.json'];
|
|
protected $labelKey = 'Diagnostics_RecommendedPrivateDirectories';
|
|
|
|
public function __construct(Translator $translator)
|
|
{
|
|
parent::__construct($translator);
|
|
Filesystem::mkdir(PIWIK_INCLUDE_PATH . '/tmp');
|
|
file_put_contents(PIWIK_INCLUDE_PATH . '/tmp/empty', 'test');
|
|
}
|
|
|
|
protected function addError(DiagnosticResult &$result)
|
|
{
|
|
$result->addItem(new DiagnosticResultItem(
|
|
DiagnosticResult::STATUS_INFORMATIONAL,
|
|
$this->translator->translate('Diagnostics_UrlsAccessibleViaBrowser') . ' ' .
|
|
$this->translator->translate('General_ReadThisToLearnMore', [
|
|
'<a target="_blank" rel="noopener noreferrer" href="' . Url::addCampaignParametersToMatomoLink('https://matomo.org/faq/troubleshooting/how-do-i-fix-the-error-private-directories-are-accessible/') . '">',
|
|
'</a>',
|
|
])
|
|
));
|
|
}
|
|
}
|