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 / 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) .
||||||
||||||||
(||||||||)
||||||||
\______/
..--.| |.--..
.-`` | | ``-.
.` `-.__.-` `.
: _ :
qbAclPlugin arAclPlugin
qtAccessionPlugin arAccessionPlugin
qtOaiPlugin arOaiPlugin
qtSwordPlugin arSwordPlugin
qtTrilliumPlugin arTrilliumPlugin
sfAlouettePlugin arAlouettePlugin
sfAuditPlugin arAuditPlugin
sfCaribouPlugin arCaribouPlugin
sfColumbiaPlugin arColubmiaPlugin
sfDcPlugin arDcPlugin
@sevein
sevein / settings.yml
Created June 26, 2012 17:32
Qubit settings.yml example with default_culture = fr, default_timezone = US/Pacific
# You can find more information about this file on the symfony website:
# http://www.symfony-project.org/reference/1_4/en/04-Settings
prod:
.settings:
no_script_name: false
logging_enabled: false
cache: true
dev:
@sevein
sevein / nested_set.php
Created June 21, 2012 22:07
Extra NestedSet functionality
<?php
/**
* Extra operations for nested sets
*/
public function moveToPrevSiblingOf($sibling, PropelPDO $con = null)
{
/*
if (!$this->isInTree())
<?php
/*
* This file is part of Qubit Toolkit.
*
* Qubit Toolkit 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 / sql_debug.patch
Created May 18, 2012 21:53
SQL debug for Qubit
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) .
@sevein
sevein / qubit-1.2-issue-2219.patch
Created January 13, 2012 19:38
Fix for issue 2219, change regular expression to capture ID properly
Index: apps/qubit/modules/contactinformation/actions/editComponent.class.php
===================================================================
--- apps/qubit/modules/contactinformation/actions/editComponent.class.php (revision 10667)
+++ apps/qubit/modules/contactinformation/actions/editComponent.class.php (working copy)
@@ -119,7 +119,7 @@
{
if (isset($item['id']))
{
- $this->contactInformation = QubitContactInformation::getById(preg_replace('/^(.*)(\d+)$/', '$2', $item['id']));
+ $this->contactInformation = QubitContactInformation::getById(preg_replace('/^.*\/(\d+)$/', '$1', $item['id']));
@sevein
sevein / migrate-1.2.0.patch
Created January 13, 2012 07:11
Set data version
Index: lib/task/migrate/MigrateTask.class.php
===================================================================
--- lib/task/migrate/MigrateTask.class.php (revision 10579)
+++ lib/task/migrate/MigrateTask.class.php (working copy)
@@ -204,6 +204,8 @@
$dir = dirname($originalFileName);
$migratedFileName = $dir.DIRECTORY_SEPARATOR.$migratedFileName;
+ $this->setDataVersion();
+