forked from Aspen-Discovery/aspen-discovery
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch '24.08.00' of https://github.com/Abhyastamita/aspen-disc…
…overy into 24.08.00
- Loading branch information
Showing
8 changed files
with
79 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<?php | ||
require_once __DIR__ . '/../bootstrap.php'; | ||
|
||
global $serverName; | ||
|
||
$passkeyFile = ROOT_DIR . "/../../sites/$serverName/conf/passkey"; | ||
if (!file_exists($passkeyFile)) { | ||
// Return the file path (note that all ini files are in the conf/ directory) | ||
$methods = [ | ||
'aes-256-gcm', | ||
'aes-128-gcm', | ||
]; | ||
foreach ($methods as $cipher) { | ||
if (in_array($cipher, openssl_get_cipher_methods())) { | ||
//Generate a 32 character password which will encode to 64 characters in hex notation | ||
$key = bin2hex(openssl_random_pseudo_bytes(32)); | ||
break; | ||
} | ||
} | ||
$passkeyFhnd = fopen($passkeyFile, 'w'); | ||
fwrite($passkeyFhnd, $cipher . ':' . $key); | ||
fclose($passkeyFhnd); | ||
|
||
//Make sure the file is not readable by anyone except the aspen user | ||
if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') { | ||
$runningOnWindows = true; | ||
} else { | ||
$runningOnWindows = false; | ||
} | ||
if (!$runningOnWindows) { | ||
exec('chown aspen:aspen_apache ' . $passkeyFile); | ||
exec('chmod 440 ' . $passkeyFile); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
code/web/interface/themes/responsive/Search/results-no-displayMode-toggle.tpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{strip} | ||
{* User's viewing mode toggle switch *} | ||
<div class="row">{* browse styling replicated here *} | ||
<div class="col-xs-6"> | ||
{if !empty($recordCount)} | ||
{* <span class="sidebar-label"> | ||
<label for="results-sort">{translate text='Sort'}</label></span> *} | ||
<label for="results-sort">{translate text='Sort by' isPublicFacing=true}</label> | ||
<select id="results-sort" name="sort" onchange="document.location.href = this.options[this.selectedIndex].value;" class="input-medium"> | ||
{foreach from=$sortList item=sortData key=sortLabel} | ||
<option value="{$sortData.sortUrl|escape}"{if !empty($sortData.selected)} selected="selected"{/if}>{translate text=$sortData.desc isPublicFacing=true inAttribute=true}</option> | ||
{/foreach} | ||
</select> | ||
{/if} | ||
</div> | ||
<div class="col-xs-6"> | ||
<div id="selected-browse-label"> | ||
<div class="btn-group" id="hideSearchCoversSwitch"> | ||
<label for="hideCovers" class="checkbox{* control-label*}"> {translate text='Hide Covers' isPublicFacing=true} | ||
<input id="hideCovers" type="checkbox" onclick="AspenDiscovery.Account.toggleShowCovers(!$(this).is(':checked'))" {if $showCovers == false}checked="checked"{/if}> | ||
</label> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
{/strip} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters