Skip to content

Commit

Permalink
Eliminate font tracker; remove old fonts; add 1.7.11 patches from Pro…
Browse files Browse the repository at this point in the history
…vidence
  • Loading branch information
collectiveaccess committed Feb 25, 2021
1 parent cdc6339 commit f9c4da7
Show file tree
Hide file tree
Showing 26 changed files with 118 additions and 1,096 deletions.
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# README: Pawtucket2 version 1.7.10
# README: Pawtucket2 version 1.7.11

### About CollectiveAccess

Expand All @@ -21,9 +21,9 @@ Pawtucket2 is meant to be customized. The download package includes a neutral de
All CollectiveAccess components are freely available under the open source GNU Public License version 3.


### About CollectiveAccess 1.7.10
### About CollectiveAccess 1.7.11

Version 1.7.10 is a maintenance release with bug fixes and improved support for MySQL 8.0.
Version 1.7.11 is a maintenance release with bug fixes and improved support for MySQL 8.0.


### Updating from a previous version
Expand All @@ -33,28 +33,28 @@ NOTE: The update process is relatively safe and rarely, if ever, causes data los

#### Updating from version 1.7 or later

Before attempting to upgrade your Pawtucket2 installation to version 1.7.10 make sure your Providence installation has been updated to 1.7.10. While it is often possible to run an older version of Pawtucket2 with a newer version of Providence, it is not guaranteed. It is usually not possible to run an older version of Providence with a newer version of Pawtucket2.
Before attempting to upgrade your Pawtucket2 installation to version 1.7.11 make sure your Providence installation has been updated to 1.7.11. While it is often possible to run an older version of Pawtucket2 with a newer version of Providence, it is not guaranteed. It is usually not possible to run an older version of Providence with a newer version of Pawtucket2.

To update from a version 1.7.x installation decompress the CollectiveAccess Pawtucket 1.7.10 tar.gz or zip file, and replace the files in your existing installation with those in the update. Take care to preserve your media directory, custom theme (in `themes/your_theme_name_here`) and your setup.php file.
To update from a version 1.7.x installation decompress the CollectiveAccess Pawtucket 1.7.11 tar.gz or zip file, and replace the files in your existing installation with those in the update. Take care to preserve your media directory, custom theme (in `themes/your_theme_name_here`) and your setup.php file.

Once the updated files are in place navigate in your web browser to the home page of your Pawtucket2 installation. If you see the home page you're done. If you see this message:

```"Your database is out-of-date. Please install all schema migrations starting with migration #xxx. Click here to automatically apply the required updates, or see the update HOW-TO for instructions on applying database updates manually."```
```"Your database is out-of-date. Please install all schema migrations starting with migration #xxx."```

you have not updated your Providence installation to version 1.7.10.
you have not updated your Providence installation to version 1.7.11.


#### Updating from version 1.6 or earlier

To update from a version 1.6.x or older installation decompress the CollectiveAccess Providence 1.7.10 tar.gz or zip file, and replace the files in your existing installation with those in the update. Take care to preserve your media directory and custom theme (in `themes/your_theme_name_here`).
To update from a version 1.6.x or older installation decompress the CollectiveAccess Providence 1.7.11 tar.gz or zip file, and replace the files in your existing installation with those in the update. Take care to preserve your media directory and custom theme (in `themes/your_theme_name_here`).

Next rename your existing setup.php to something else (Eg. `setup.php-old`). Then copy the version 1.7.10 template in `setup.php-dist` to `setup.php`. Edit this file with your database login information, system name and other basic settings. You can reuse the settings in your old setup.php file as-is. Only the format of the setup.php file has changed.
Next rename your existing setup.php to something else (Eg. `setup.php-old`). Then copy the version 1.7.11 template in `setup.php-dist` to `setup.php`. Edit this file with your database login information, system name and other basic settings. You can reuse the settings in your old setup.php file as-is. Only the format of the setup.php file has changed.

Once the updated files are in place navigate in your web browser to the home page of your Pawtucket2 installation. If you see the home page you're done. If you see this message:

```"Your database is out-of-date. Please install all schema migrations starting with migration #xxx. Click here to automatically apply the required updates, or see the update HOW-TO for instructions on applying database updates manually."```

you have not updated your Providence installation to version 1.7.10.
you have not updated your Providence installation to version 1.7.11.

Version 1.7 introduced zoomable media versions for multipage documents such as PDFs, Microsoft Word or Powerpoint. Systems migrated from pre-1.7 versions of CollectiveAccess will not have these media versions available causing the built-in document viewer to fail. If your system includes multipage documents you should regenerate the media **in Providence** using the command-line caUtils utility in `support/bin`. See the [Providence README](https://github.com/collectiveaccess/providence) for details.

Expand Down
49 changes: 42 additions & 7 deletions app/conf/search.conf
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ search_sql_search_do_stemming = 1
# ElasticSearch Plugin Configuration
# -------------------

# Set to 2 version version 2.x, 5 for version 5.x
elasticsearch_version = 5

# enter the elastic search base url here (without any index names)
search_elasticsearch_base_url = http://localhost:9200/

Expand All @@ -62,24 +65,56 @@ elasticsearch_indexing_buffer_size = 250
# -------------------
# Suffixes to add to searches if they conform to a listed regular expression
search_suffixes = {
# [\d]+\.[0-9A-Za-z\.]* = *
# [\\d]+\\.[0-9A-Za-z\\.]* = *
}

# Regex character class used when indexing; values matched will be used as token delimiters
# (in other words, the search expression will be broken into words wherever the matched characters are)
indexing_tokenizer_regex = ^\pL\pN\pNd/_#\@\&\-
indexing_tokenizer_regex = ^\\pL\\pN\\pNd/_#\\@\\&\\-

# Regex character class used when searching; values matched will be used as token delimiters
# (this is the same thing as indexing_tokenizer_regex except that it's used when searching rather than indexing)
search_tokenizer_regex = ^\pL\pN\pNd/_#\@\&\-
search_tokenizer_regex = ^\\pL\\pN\\pNd/_#\\@\\&\\-

# List of regular expressions that if matched cause search input to be treated "as-is" - searched without processing
# This is useful for preventing tokenization of accession numbers and other values that rely upon punctuation being
# kept intact.
asis_regexes = [
"^[\d]+[\.\-][A-Za-z0-9\.\-]+$",
"[^\.]+\.[A-Za-z0-9]{3}$"
"^[\\d]+[\\.\\-][A-Za-z0-9\\.\\-]+$",
"[^\\.]+\\.[A-Za-z0-9]{3}$"
]

# Set if when only a single item found you do not want to redirect the user directly to that item
dont_redirect_to_single_search_result = 0
# List of regular expressions that if matched cause search input to be treated as an idno. This is useful
# for forcing text searches on apparent idno's to limit themselves to the literal idno field. It also allows
# ElasticSearch to support idno text searches with idno's that contain dashes. Without binding to a specific
# field Elastic will treat the dashes as special characters and fail to match dash literals.
#
# You may define as many regular expression as needed here to match idno patterns. Each regular expression will be
# evaluated in term until a match is found. First level keys are table names, with an associated list of regexes.
#
idno_regexes = {
ca_objects = [
"[\\d]{4}\\.[\\d]{1,5}\\.[\\d]{0,5}"
]
}

# List of regular expressions used to rewrite search expressions before execution. First level
# keys are table names, with an associated list of regexes. Each regex key is a descriptive name with an
# associated two element list. The first element is a regular expression, the second is the replacement pattern. Back references
# are supported.
#
rewrite_regexes = {
ca_objects = {
#remove_wildcards = [
# "/\\*", ""
#]
}
}

# By default all in-memory sorting is performed using the PHP SORT_NATURAL mode (see http://php.net/manual/en/function.sort.php)
# This is usually what is wanted, but for some languages (Eg. Spanish) it can return odd results and it may be desirable to disable it
dont_use_natural_sort = 0

# Index "before x" and "after x" date expressions as if they were circa dates
treat_before_dates_as_circa = 0
treat_after_dates_as_circa = 0
75 changes: 51 additions & 24 deletions app/lib/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -358,32 +358,59 @@ public function loadFile($ps_filepath, $pb_die_on_error=false, $pn_num_lines_to_
# handle scalar values
case 20:
// end quote? -> accept scalar
if((trim($vs_token) == '"') && $vn_in_quote) {
if($vn_in_quote) {
$vn_in_quote = 0;
$vn_state = -1;
switch($vs_token) {
# -------------------
case '"':
if ($vb_escape_set || (!$vn_in_quote && strlen($vs_scalar_value))) { // Quote in interior of scalar - assume literal
$vs_scalar_value .= '"';
if(sizeof($va_tokens) == 0) {
$this->ops_config_settings["scalars"][$vs_key] = $this->_trimScalar($vs_scalar_value);
$vn_in_quote = 0;
$vb_escape_set = false;
$vn_state = -1;
}
} else {
if (!$vn_in_quote) { // Quoted scalar
$vn_in_quote = 1;
} else {
// Accept quoted scalar
$vn_in_quote = 0;
$vb_escape_set = false;
$vn_state = -1;

$this->ops_config_settings["scalars"][$vs_key] = $vs_scalar_value;
$this->ops_config_settings["scalars"][$vs_key] = $vs_scalar_value;
}
}
$vb_escape_set = false;
break;
}
}

if (preg_match("/[\r\n]/", $vs_token) && !$vn_in_quote) {
$this->ops_config_settings["scalars"][$vs_key] = $this->_trimScalar($vs_scalar_value);
$vn_state = -1;
} else {
if ((sizeof($va_tokens) == 0) && !$vn_in_quote) {
$vs_scalar_value .= $vs_token;

# accept scalar
$this->ops_config_settings["scalars"][$vs_key] = $this->_trimScalar($vs_scalar_value);

# initialize
$vn_state = -1;
} else { # keep going to next line
$vs_scalar_value .= $vs_token;
$vn_state = 20;
}
# -------------------
case '\\':
if ($vb_escape_set) {
$vs_scalar_value .= $vs_token;
$vb_escape_set = false;
} else {
$vb_escape_set = true;
}
break;
# -------------------
default:
if (preg_match("/[\r\n]/", $vs_token) && !$vn_in_quote) { // Return ends scalar
$this->ops_config_settings["scalars"][$vs_key] = $this->_trimScalar($vs_scalar_value);
$vn_in_quote = 0;
$vb_escape_set = false;
$vn_state = -1;
} elseif ((sizeof($va_tokens) == 0) && !$vn_in_quote) {
$vs_scalar_value .= $vs_token;
$this->ops_config_settings["scalars"][$vs_key] = $this->_trimScalar($vs_scalar_value);
$vn_in_quote = 0;
$vb_escape_set = false;
$vn_state = -1;
} else { # keep going to next line
$vs_scalar_value .= $vs_token;
$vn_state = 20;
}
break;
# -------------------
}
break;
# ------------------------------------
Expand Down
7 changes: 7 additions & 0 deletions app/lib/Plugins/TaskQueueHandlers/mediaproc.php
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,13 @@ public function process($pa_parameters) {
}
}
} else {
if(is_array($va_media_center = $t_instance->getMediaCenter($vs_field))) {
$pa_parameters['_centerX'] = caGetOption('x', $va_media_center, 0.5);
$pa_parameters['_centerY'] = caGetOption('y', $va_media_center, 0.5);

if (($pa_parameters['_centerX'] < 0) || ($pa_parameters['_centerX'] > 1)) { $pa_parameters['_centerX'] = 0.5; }
if (($pa_parameters['_centerY'] < 0) || ($pa_parameters['_centerY'] > 1)) { $pa_parameters['_centerY'] = 0.5; }
}
if (!($o_media->transform($operation, $pa_parameters))) {
$this->error = $o_media->errors[0];
$o_media->cleanup();
Expand Down
12 changes: 6 additions & 6 deletions app/lib/pawtucket/ConfigurationCheck.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* ----------------------------------------------------------------------
*
* Software by Whirl-i-Gig (http://www.whirl-i-gig.com)
* Copyright 2010-2017 Whirl-i-Gig
* Copyright 2010-2021 Whirl-i-Gig
*
* For more information visit http://www.CollectiveAccess.org
*
Expand Down Expand Up @@ -123,7 +123,7 @@ public static function DBInnoDBQuickCheck() {
}
}
if(!$vb_innodb_available){
self::addError(_t("Your MySQL installation doesn't support the InnoDB storage engine which is required by CollectiveAccess. For more information also see %1.","<a href='http://dev.mysql.com/doc/refman/5.1/en/innodb.html' target='_blank'>http://dev.mysql.com/doc/refman/5.1/en/innodb.html</a>"));
self::addError(_t("Your MySQL installation doesn't support the InnoDB storage engine which is required by CollectiveAccess."));
}

return true;
Expand Down Expand Up @@ -160,9 +160,9 @@ public static function DBTableQuickCheck() {
*/
public static function DBOutOfDateQuickCheck() {
if (!in_array('ca_schema_updates', self::$opo_db->getTables())) {
self::addError(_t("Your database is extremely out-of-date. Please install all database migrations starting with migration #1 or contact [email protected] for assistance. See the <a href=\"http://docs.collectiveaccess.org/wiki/Applying_Database_Updates\">update HOW-TO</a> for instructions on applying database updates manually."));
self::addError(_t("Your database is extremely out-of-date. Please install all database migrations starting with migration #1 or contact [email protected] for assistance."));
} else if (($vn_schema_revision = self::getSchemaVersion()) < __CollectiveAccess_Schema_Rev__) {
self::addError(_t("Your database is out-of-date. Please install all schema migrations starting with migration #%1. See <a href=\"http://wiki.collectiveaccess.org/index.php?title=Upgrade\">http://wiki.collectiveaccess.org/index.php?title=Upgrade</a> for migration instructions.",($vn_schema_revision + 1)));
self::addError(_t("Your database is out-of-date. Please install all schema migrations starting with migration #%1.",($vn_schema_revision + 1)));
}
return true;
}
Expand All @@ -172,8 +172,8 @@ public static function DBOutOfDateQuickCheck() {
*/
public static function PHPVersionQuickCheck() {
$va_php_version = caGetPHPVersion();
if($va_php_version["versionInt"]<50400){
self::addError(_t("CollectiveAccess requires PHP version 5.4 or higher to function properly. You're running %1. Please upgrade.",$va_php_version["version"]));
if($va_php_version["versionInt"]<70200){
self::addError(_t("CollectiveAccess requires PHP version 7.2 or higher to function properly. You're running %1. Please upgrade.",$va_php_version["version"]));
}
return true;
}
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
8 changes: 2 additions & 6 deletions themes/default/assets/pawtucket/css/error.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
@import url("//hello.myfonts.net/count/28ec2c");

@font-face {font-family: 'DIN-Regular';src: url('din/28EC2C_0_0.eot');src: url('din/28EC2C_0_0.eot?#iefix') format('embedded-opentype'),url('din/28EC2C_0_0.woff') format('woff'),url('din/28EC2C_0_0.ttf') format('truetype');}

html, body {
font: 12px Helvetica, Sans-serif;
margin:0px;
Expand Down Expand Up @@ -136,7 +132,7 @@ H2{
text-align: center;
color:red;
padding:10px 0px 5px 0px;
font-family: 'DIN-Regular', helvetica, sans-serif;
font-family: Helvetica, sans-serif;
font-size: 22px;
}

Expand Down Expand Up @@ -179,4 +175,4 @@ ol.paramList li {
padding: 2px 4px;
list-style-type: decimal;
margin-left: 20px;
}
}
36 changes: 0 additions & 36 deletions themes/default/assets/pawtucket/css/fonts.css
Original file line number Diff line number Diff line change
@@ -1,39 +1,3 @@
/* @license
* MyFonts Webfont Build ID 2681900, 2013-11-05T14:49:13-0500
*
* The fonts listed in this notice are subject to the End User License
* Agreement(s) entered into by the website owner. All other parties are
* explicitly restricted from using the Licensed Webfonts(s).
*
* You may obtain a valid license at the URLs below.
*
* Webfont: DIN17 SB-Regular by Scangraphic Digital Type Collection
* URL: http://www.myfonts.com/fonts/efscangraphic/din-17-sb/regular/
* Copyright: Copyright (c) Scangraphic Prepress Technology GmbH, 1992 - 2003. Veronika Elsner, Guenther Flake GbR, Hamburg 2004
* Licensed pageviews: 10,000
*
*
* License: http://www.myfonts.com/viewlicense?type=web&buildid=2681900
*
* © 2013 MyFonts Inc
*/


/* DIN-Regular
@font-face {font-family: 'DIN17SBOP-Regular';src: url('din/28EC2C_0_0.eot');src: url('din/28EC2C_0_0.eot?#iefix') format('embedded-opentype'),url('din/28EC2C_0_0.woff') format('woff'),url('din/28EC2C_0_0.ttf') format('truetype');}
*/

/* Proxima-Nova
@font-face {font-family: 'Proximanova';src: url('proximanova/proximanova-reg-webfont.eot');src: url('proximanova/proximanova-reg-webfont.eot?#iefix') format('embedded-opentype'),url('proximanova/proximanova-reg-webfont.woff') format('woff'),url('proximanova/proximanova-reg-webfont.ttf') format('truetype');}
@font-face {font-family: 'ProximanovaBold';src: url('proximanova/proximanova-bold-webfont.eot');src: url('proximanova/proximanova-bold-webfont.eot?#iefix') format('embedded-opentype'),url('proximanova/proximanova-bold-webfont.woff') format('woff'),url('proximanova/proximanova-bold-webfont.ttf') format('truetype');}
*/

/* Franklin Gothic
@font-face {font-family: 'Franklin Gothic';src: url('franklingothic/frankgotmed-webfont.eot');src: url('franklingothic/frankgotmed-webfont.eot?#iefix') format('embedded-opentype'),url('franklingothic/frankgotmed-webfont.woff') format('woff'),url('franklingothic/frankgotmed-webfont.ttf') format('truetype');}
*/

/* Webfont: Lato-Bold */@font-face {
font-family: 'Lato';
src: url('Lato/Lato-Bold.eot'); /* IE9 Compat Modes */
Expand Down
Binary file not shown.
Loading

0 comments on commit f9c4da7

Please sign in to comment.