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 / search-module-changes.patch
Created October 13, 2011 22:41
search module changes
Index: apps/qubit/modules/search/actions/indexAction.class.php
===================================================================
--- apps/qubit/modules/search/actions/indexAction.class.php (revision 10078)
+++ apps/qubit/modules/search/actions/indexAction.class.php (working copy)
@@ -29,18 +29,20 @@
$request->limit = sfConfig::get('app_hits_per_page');
}
- // limit search to current culture and info. objects
+ // Limit search to current culture and info. objects
@sevein
sevein / cache_qubit_settings.patch
Created June 14, 2011 05:44
Use sfFileCache to cache Qubit settings
Index: lib/SiteSettingsFilter.class.php
===================================================================
--- lib/SiteSettingsFilter.class.php (revision 9157)
+++ lib/SiteSettingsFilter.class.php (working copy)
@@ -20,30 +20,29 @@
class siteSettingsFilter extends sfFilter
{
/*
- * execute this filter on every request in case some params have changed since the last page load
+ * Execute this filter on every request in case some params have changed since the last page load
@sevein
sevein / QubitInformationObject.php.diff
Created April 20, 2011 15:19
cast $value as an array
Index: lib/model/QubitInformationObject.php
===================================================================
--- lib/model/QubitInformationObject.php (revision 9051)
+++ lib/model/QubitInformationObject.php (working copy)
@@ -127,7 +127,7 @@
}
}
- $this->values[$name]->__set('value', serialize($value), $options + array('sourceCulture' => true));
+ $this->values[$name]->__set('value', serialize((array)$value), $options + array('sourceCulture' => true));
@sevein
sevein / editAction.class.php.diff
Created April 15, 2011 13:37
$this-relation was being used in other context, I created new properties "thematicAreaRelations" and "geographicRegionRelations"
--- editAction.usask.class.php 2011-04-15 15:34:34.168164792 +0200
+++ editAction.class.php 2011-04-15 15:32:01.982147000 +0200
@@ -102,7 +102,7 @@
$criteria->add(QubitTerm::TAXONOMY_ID, QubitTaxonomy::THEMATIC_AREA_ID);
$value = array();
- foreach ($this->relations = QubitObjectTermRelation::get($criteria) as $item)
+ foreach ($this->thematicAreaRelations = QubitObjectTermRelation::get($criteria) as $item)
{
$value[] = $this->context->routing->generate(null, array($item->term, 'module' => 'term'));
@sevein
sevein / upload.html
Created March 31, 2011 23:28
Post a form to upload action like yui uploader does in ICA-AtoM
<html>
<head>
<title></title>
</head>
<body>
<form method="post" action="http://localhost/ica-atom/qubit_dev.php/;digitalobject/upload" enctype="multipart/form-data">
<p>Information Object ID:</p>
<input type="text" name="informationObjectId" value="" />
<p>File:</p>
<input type="file" name="file" />