Skip to content

Instantly share code, notes, and snippets.

View sevein's full-sized avatar

Jesús García Crespo sevein

View GitHub Profile
@sevein
sevein / fix-issue-4539.patch
Created January 17, 2013 01:20
Fix for issue #4539 for ICA-AtoM 1.3.0
diff --git a/apps/qubit/modules/user/actions/indexAction.class.php b/apps/qubit/modules/user/actions/indexAction.class.php
index 806c432..57dc69f 100644
--- a/apps/qubit/modules/user/actions/indexAction.class.php
+++ b/apps/qubit/modules/user/actions/indexAction.class.php
@@ -32,6 +32,6 @@ class UserIndexAction extends sfAction
}
}
- $this->amountOfNotes = count($this->resource->notes);
+ $this->amountOfNotes = count($this->resource->getNotes());
data/fixtures/settings.yml | 7 +-
lib/task/migrate/arUpgradeSqlTask.class.php | 118 +++++++++++++++++++-
lib/task/migrate/arUpgrader130.class.php | 49 --------
.../migrate/migrations/arMigration0093.class.php | 50 +++++++++
.../migrate/migrations/arMigration0094.class.php | 49 ++++++++
5 files changed, 220 insertions(+), 53 deletions(-)
diff --git a/data/fixtures/settings.yml b/data/fixtures/settings.yml
index e292b26..924ac85 100644
--- a/data/fixtures/settings.yml
<?php
/*
* This file is part of the AccesstoMemory (AtoM) software.
*
* AccesstoMemory (AtoM) is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
<?php
/*
* This file is part of the AccesstoMemory (AtoM) software.
*
* AccesstoMemory (AtoM) is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
@sevein
sevein / getLatLong.php
Created September 20, 2012 21:15
Generate latitude and longitude values for ICA-AtoM institution primary contacts
<?php
// See https://developers.google.com/maps/documentation/geocoding
// Thanks Google!
foreach (QubitRepository::getAll() as $item)
{
if (null !== $contact = $item->getPrimaryContact())
{
$address = $contact->streetAddress . ' ' . $contact->postalCode . ' ' . $contact->countryCode;
@sevein
sevein / gist:3681357
Created September 9, 2012 00:00
$ svn diff -r 11368:HEAD --summarize
M plugins/qtElasticSearchPlugin/config/qtElasticSearchPluginConfiguration.class.php
M plugins/qtElasticSearchPlugin/lib/model/QubitTermMapping.class.php
M plugins/qtElasticSearchPlugin/lib/model/QubitActorMapping.class.php
M plugins/qtElasticSearchPlugin/lib/model/QubitInformationObjectMapping.class.php
M plugins/qtElasticSearchPlugin/lib/model/QubitPdoActor.class.php
M plugins/qtElasticSearchPlugin/lib/model/QubitRepositoryMapping.class.php
M plugins/qtElasticSearchPlugin/lib/model/QubitContactInformationMapping.class.php
M plugins/qtElasticSearchPlugin/lib/model/QubitPdoInformationObject.class.php
M plugins/qtElasticSearchPlugin/lib/qtElasticSearchPlugin.class.php
M plugins/qtElasticSearchPlugin/lib/QubitMapping.class.php
@sevein
sevein / bad.xml
Created September 2, 2012 01:12
the good and the bad
<dublincore xmlns:dcterms="http://purl.org/dc/terms/" xsi:schemaLocation="http://purl.org/dc/terms/ http://dublincore.org/schemas/xmls/qdc/2008/02/11/dcterms.xsd">
<dcterms:title>Policy Development records</dcterms:title>
<dcterms:creator/>
<dcterms:subject/>
<dcterms:description>Records documenting rules and procedures for developing, authoring and approving corporate policies.</dcterms:description>
<dcterms:publisher/>
<dcterms:contributor/>
<dcterms:date>08-19-2008/01-02-2010</dcterms:date>
<dcterms:type/>
<dcterms:format> </dcterms:format>
@sevein
sevein / gist:3538681
Last active October 9, 2015 16:08
ICA-AtoM 1.3 - Error upgrading from Release 1.1 (step v63)
@sevein
sevein / package.xml
Created August 29, 2012 19:01
ICA-AtoM 1.3 package.xml - bundled by Archivematica
<?xml version="1.0" encoding="utf-8" ?>
<package version="2.0" xmlns="http://pear.php.net/dtd/package-2.0" xmlns:tasks="http://pear.php.net/dtd/tasks-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://pear.php.net/dtd/tasks-1.0 http://pear.php.net/dtd/tasks-1.0.xsd http://pear.php.net/dtd/package-2.0 http://pear.php.net/dtd/package-2.0.xsd">
<name>icaatom (archivematica 0.9)</name>
<channel>pear.qubit-toolkit.org</channel>
<summary>Open archival description system</summary>
<description>
ICA-AtoM is web-based archival description software that is based on International Council on Archives (ICA) standards. "AtoM" is an acronymn for "Access to Memory". ICA-AtoM is multilingual and supports multi-repository collections.
</description>
<lead>
<name>Jack Bates</name>
@sevein
sevein / qubit_sql_debug.patch
Created July 4, 2012 15:40
Add verbosity to Propel error messages
Index: vendor/symfony/lib/plugins/sfPropelPlugin/lib/vendor/propel/util/BasePeer.php
===================================================================
--- vendor/symfony/lib/plugins/sfPropelPlugin/lib/vendor/propel/util/BasePeer.php
+++ vendor/symfony/lib/plugins/sfPropelPlugin/lib/vendor/propel/util/BasePeer.php
@@ -283,7 +283,7 @@
$sql = 'INSERT INTO ' . $tableName
. ' (' . implode(',', $columns) . ')'
. ' VALUES (';
- // . substr(str_repeat("?,", count($columns)), 0, -1) .
+ // . substr(str_repeat("?,", count($columns)), 0, -1) .