Merge branch 'master' into newicon

This commit is contained in:
rugk 2016-08-20 19:09:39 +02:00
commit f7a75a9d33
6 changed files with 62 additions and 5 deletions

View File

@ -74,7 +74,7 @@ endif;
<span class="icon-bar"></span> <span class="icon-bar"></span>
<span class="icon-bar"></span> <span class="icon-bar"></span>
</button> </button>
<a class="reloadlink navbar-brand" href="/"> <a class="reloadlink navbar-brand" href="">
<img alt="<?php echo I18n::_('PrivateBin'); ?>" src="img/logo.svg" width="225" /> <img alt="<?php echo I18n::_('PrivateBin'); ?>" src="img/logo.svg" width="225" />
</a> </a>
</div> </div>

View File

@ -74,7 +74,7 @@ endif;
<span class="icon-bar"></span> <span class="icon-bar"></span>
</button> </button>
<a class="reloadlink navbar-brand" href="/"> <a class="reloadlink navbar-brand" href="/">
<img alt="<?php echo I18n::_('PrivateBin'); ?>" src="img/logo.svg" width="225" /> <img alt="<?php echo I18n::_('PrivateBin'); ?>" src="img/icon.svg" width="45" />
</a> </a>
</div> </div>
<div id="navbar" class="navbar-collapse collapse"> <div id="navbar" class="navbar-collapse collapse">

View File

@ -73,7 +73,7 @@ endif;
<span class="icon-bar"></span> <span class="icon-bar"></span>
<span class="icon-bar"></span> <span class="icon-bar"></span>
</button> </button>
<a class="reloadlink navbar-brand" href="/"> <a class="reloadlink navbar-brand" href="">
<img alt="<?php echo I18n::_('PrivateBin'); ?>" src="img/logo.svg" width="225" /> <img alt="<?php echo I18n::_('PrivateBin'); ?>" src="img/logo.svg" width="225" />
</a> </a>
</div> </div>

View File

@ -73,7 +73,7 @@ endif;
<span class="icon-bar"></span> <span class="icon-bar"></span>
<span class="icon-bar"></span> <span class="icon-bar"></span>
</button> </button>
<a class="reloadlink navbar-brand" href="/"> <a class="reloadlink navbar-brand" href="">
<img alt="<?php echo I18n::_('PrivateBin'); ?>" src="img/logo.svg" width="225" /> <img alt="<?php echo I18n::_('PrivateBin'); ?>" src="img/logo.svg" width="225" />
</a> </a>
</div> </div>

View File

@ -73,7 +73,7 @@ endif;
<span class="icon-bar"></span> <span class="icon-bar"></span>
<span class="icon-bar"></span> <span class="icon-bar"></span>
</button> </button>
<a class="reloadlink navbar-brand" href="/"> <a class="reloadlink navbar-brand" href="">
<img alt="<?php echo I18n::_('PrivateBin'); ?>" src="img/logo.svg" width="225" /> <img alt="<?php echo I18n::_('PrivateBin'); ?>" src="img/logo.svg" width="225" />
</a> </a>
</div> </div>

View File

@ -0,0 +1,57 @@
<?php
$dist = dirname(__DIR__).'/dist';
if (!is_dir($dist)) {
mkdir($dist, 0755);
}
if (file_exists($dist.'/random_compat.phar')) {
unlink($dist.'/random_compat.phar');
}
$phar = new Phar(
$dist.'/random_compat.phar',
FilesystemIterator::CURRENT_AS_FILEINFO | \FilesystemIterator::KEY_AS_FILENAME,
'random_compat.phar'
);
rename(
dirname(__DIR__).'/lib/random.php',
dirname(__DIR__).'/lib/index.php'
);
$phar->buildFromDirectory(dirname(__DIR__).'/lib');
rename(
dirname(__DIR__).'/lib/index.php',
dirname(__DIR__).'/lib/random.php'
);
/**
* If we pass an (optional) path to a private key as a second argument, we will
* sign the Phar with OpenSSL.
*
* If you leave this out, it will produce an unsigned .phar!
*/
if ($argc > 1) {
if (!@is_readable($argv[1])) {
echo 'Could not read the private key file:', $argv[1], "\n";
exit(255);
}
$pkeyFile = file_get_contents($argv[1]);
$private = openssl_get_privatekey($pkeyFile);
if ($private !== false) {
$pkey = '';
openssl_pkey_export($private, $pkey);
$phar->setSignatureAlgorithm(Phar::OPENSSL, $pkey);
/**
* Save the corresponding public key to the file
*/
if (!@is_readable($dist.'/random_compat.phar.pubkey')) {
$details = openssl_pkey_get_details($private);
file_put_contents(
$dist.'/random_compat.phar.pubkey',
$details['key']
);
}
} else {
echo 'An error occurred reading the private key from OpenSSL.', "\n";
exit(255);
}
}