Skip to content

Instantly share code, notes, and snippets.

@jraddaoui
Created October 8, 2013 17:55
Show Gist options
  • Save jraddaoui/6888725 to your computer and use it in GitHub Desktop.
Save jraddaoui/6888725 to your computer and use it in GitHub Desktop.
radawi@ubuntu:~/www/atom$ git diff
diff --git a/qubit_dev.php b/qubit_dev.php
index 782d49e..349fd66 100644
--- a/qubit_dev.php
+++ b/qubit_dev.php
@@ -12,7 +12,7 @@ if (false !== $envIp = getenv('ATOM_DEBUG_IP'))
if (!in_array(@$_SERVER['REMOTE_ADDR'], $allowedIps))
{
- die('You are not allowed to access this file. Check '.basename(__FILE__).' for more information.');
+ //die('You are not allowed to access this file. Check '.basename(__FILE__).' for more information.');
}
require_once(dirname(__FILE__).'/config/ProjectConfiguration.class.php');
diff --git a/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/vendor/doctrine/Doctrine/Connection/Mssql.php b/vendor/symfony/lib
index 97a3e80..254953e 100644
--- a/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/vendor/doctrine/Doctrine/Connection/Mssql.php
+++ b/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/vendor/doctrine/Doctrine/Connection/Mssql.php
@@ -86,17 +86,17 @@ class Doctrine_Connection_Mssql extends Doctrine_Connection_Common
if ($checkOption && ! $this->getAttribute(Doctrine_Core::ATTR_QUOTE_IDENTIFIER)) {
return $identifier;
}
-
- if (strpos($identifier, '.') !== false) {
- $parts = explode('.', $identifier);
- $quotedParts = array();
- foreach ($parts as $p) {
- $quotedParts[] = $this->quoteIdentifier($p);
+
+ if (strpos($identifier, '.') !== false) {
+ $parts = explode('.', $identifier);
+ $quotedParts = array();
+ foreach ($parts as $p) {
+ $quotedParts[] = $this->quoteIdentifier($p);
}
-
- return implode('.', $quotedParts);
+
+ return implode('.', $quotedParts);
}
-
+
return '[' . str_replace(']', ']]', $identifier) . ']';
}
@@ -108,21 +108,21 @@ class Doctrine_Connection_Mssql extends Doctrine_Connection_Common
*
* Copyright (c) 2005-2008, Zend Technologies USA, Inc.
* All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
- *
+ *
* * Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
- *
+ *
* * Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
- *
+ *
* * Neither the name of Zend Technologies USA, Inc. nor the names of its
* contributors may be used to endorse or promote products derived from this
* software without specific prior written permission.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -143,7 +143,7 @@ class Doctrine_Connection_Mssql extends Doctrine_Connection_Common
public function modifyLimitQuery($query, $limit = false, $offset = false, $isManip = false, $isSubQuery = false, Doctrine_
{
if ($limit === false || !($limit > 0)) {
- return $query;
+ return $query;
}
$orderby = stristr($query, 'ORDER BY');
@@ -151,7 +151,7 @@ class Doctrine_Connection_Mssql extends Doctrine_Connection_Common
if ($offset !== false && $orderby === false) {
throw new Doctrine_Connection_Exception("OFFSET cannot be used in MSSQL without ORDER BY due to emulation reasons.
}
-
+
$count = intval($limit);
$offset = intval($offset);
@@ -206,14 +206,14 @@ class Doctrine_Connection_Mssql extends Doctrine_Connection_Common
}
if ($orderby !== false) {
- $query .= ' ORDER BY ';
+ $query .= ' ORDER BY ';
- for ($i = 0, $l = count($orders); $i < $l; $i++) {
- if ($i > 0) { // not first order clause
- $query .= ', ';
- }
+ for ($i = 0, $l = count($orders); $i < $l; $i++) {
+ if ($i > 0) { // not first order clause
+ $query .= ', ';
+ }
- $query .= $this->modifyOrderByColumn($tables[$i], $columns[$i], $this->quoteIdentifier('inner_tbl') . '.' . $t
+ $query .= $this->modifyOrderByColumn($tables[$i], $columns[$i], $this->quoteIdentifier('inner_tbl') . '.' . $t
$query .= (stripos($sorts[$i], 'asc') !== false) ? 'DESC' : 'ASC';
}
}
@@ -238,8 +238,8 @@ class Doctrine_Connection_Mssql extends Doctrine_Connection_Common
}
/**
- * Parse an OrderBy-Statement into chunks
- *
+ * Parse an OrderBy-Statement into chunks
+ *
* @param string $orderby
*/
private function parseOrderBy($orderby)
@@ -250,18 +250,18 @@ class Doctrine_Connection_Mssql extends Doctrine_Connection_Common
$parsed = str_ireplace('ORDER BY', '', $orderby);
preg_match_all('/(\w+\(.+?\)\s+(ASC|DESC)),?/', $orderby, $matches);
-
+
$matchesWithExpressions = $matches[1];
foreach ($matchesWithExpressions as $match) {
$chunks[] = $match;
$parsed = str_replace($match, '##' . (count($chunks) - 1) . '##', $parsed);
}
-
+
$tokens = preg_split('/,/', $parsed);
-
+
for ($i = 0, $iMax = count($tokens); $i < $iMax; $i++) {
- $tokens[$i] = trim(preg_replace('/##(\d+)##/', function ($matches)
+ $tokens[$i] = trim(preg_replace_callback('/##(\d+)##/', function ($matches) use ($chunks)
{
return $chunks[$matches[1]];
}, $tokens[$i]));
@@ -269,15 +269,15 @@ class Doctrine_Connection_Mssql extends Doctrine_Connection_Common
return $tokens;
}
-
+
/**
* Order and Group By are not possible on columns from type text.
- * This method fix this issue by wrap the given term (column) into a CAST directive.
- *
+ * This method fix this issue by wrap the given term (column) into a CAST directive.
+ *
* @see DC-828
* @param Doctrine_Table $table
* @param string $field
- * @param string $term The term which will changed if it's necessary, depending to the field type.
+ * @param string $term The term which will changed if it's necessary, depending to the field type.
* @return string
*/
public function modifyOrderByColumn(Doctrine_Table $table, $field, $term)
@@ -287,7 +287,7 @@ class Doctrine_Connection_Mssql extends Doctrine_Connection_Common
if ($def['type'] == 'string' && $def['length'] === NULL) {
$term = 'CAST(' . $term . ' AS varchar(8000))';
}
-
+
return $term;
}
@@ -301,7 +301,7 @@ class Doctrine_Connection_Mssql extends Doctrine_Connection_Common
{
return $this->modifyLimitQuery($query, $limit, $offset, $isManip, true);
}
-
+
/**
* return version information about the server
*
@@ -457,4 +457,4 @@ class Doctrine_Connection_Mssql extends Doctrine_Connection_Common
return parent::insert($table, $fields);
}
-}
\ No newline at end of file
+}
diff --git a/vendor/symfony/lib/plugins/sfPropelPlugin/lib/vendor/phing/mappers/RegexpMapper.php b/vendor/symfony/lib/plugins/s
index 4510ed2..76191f0 100644
--- a/vendor/symfony/lib/plugins/sfPropelPlugin/lib/vendor/phing/mappers/RegexpMapper.php
+++ b/vendor/symfony/lib/plugins/sfPropelPlugin/lib/vendor/phing/mappers/RegexpMapper.php
@@ -1,5 +1,5 @@
<?php
-/*
+/*
* $Id: RegexpMapper.php 123 2006-09-14 20:19:08Z mrook $
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
@@ -16,7 +16,7 @@
*
* This software consists of voluntary contributions made by many individuals
* and is licensed under the LGPL. For more information please see
- * <http://phing.info>.
+ * <http://phing.info>.
*/
require_once 'phing/mappers/FileNameMapper.php';
@@ -37,14 +37,14 @@ class RegexpMapper implements FileNameMapper {
* @var string
*/
private $to;
-
+
/**
* The Regexp engine.
* @var Regexp
*/
private $reg;
- function __construct() {
+ function __construct() {
// instantiage regexp matcher here
$this->reg = new Regexp();
}
@@ -60,10 +60,10 @@ class RegexpMapper implements FileNameMapper {
* Sets the &quot;to&quot; pattern. Required.
*/
function setTo($to) {
-
+
// [HL] I'm changing the way this works for now to just use string
//$this->to = StringHelper::toCharArray($to);
-
+
$this->to = $to;
}
@@ -80,21 +80,21 @@ class RegexpMapper implements FileNameMapper {
* @param string $source The source filename.
*/
private function replaceReferences($source) {
-
+
// FIXME
// Can't we just use engine->replace() to handle this? the Preg engine
// will automatically convert \1 references to $1
-
+
// the expression has already been processed (when ->matches() was run in Main())
// so no need to pass $source again to the engine.
- $groups = (array) $this->reg->getGroups();
-
+ $groups = (array) $this->reg->getGroups();
+
// replace \1 with value of $groups[1] and return the modified "to" string
- return preg_replace_callback('/\\\([\d]+)/', function ($matches)
+ return preg_replace_callback('/\\\([\d]+)/', function ($matches) use ($groups)
{
return $groups[$matches[1]];
}, $this->to);
}
-
+
}
(END)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment