Skip to content

Instantly share code, notes, and snippets.

@sevein
Created January 13, 2012 19:38
Show Gist options
  • Save sevein/1608301 to your computer and use it in GitHub Desktop.
Save sevein/1608301 to your computer and use it in GitHub Desktop.
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']));
}
else
{
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment