This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
FILES_TO_COMMIT=`git status -s | cut -c4-` | |
if [[ ! -z $FILES_TO_COMMIT ]]; then | |
for file in $FILES_TO_COMMIT; do | |
if [[ "$file" == *.php ]]; then | |
./vendor/bin/php-cs-fixer fix "$file" | |
fi | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function combos($data, &$all = array(), $group = array(), $val = null, $i = 0) { | |
if (isset($val)) { | |
array_push($group, $val); | |
} | |
if ($i >= count($data)) { | |
array_push($all, $group); | |
} else { | |
foreach ($data[$i] as $v) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class ExtraFieldInWhitelist extends Module | |
{ | |
public function __construct() | |
{ | |
$this->name = 'extrafieldinwhitelist'; | |
$this->tab = 'front_office_features'; | |
$this->version = '1'; | |
$this->author = 'Krystian Podemski'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* 2007-2016 PrestaShop | |
* | |
* NOTICE OF LICENSE | |
* | |
* This source file is subject to the Open Software License (OSL 3.0) | |
* that is bundled with this package in the file LICENSE.txt. | |
* It is also available through the world-wide-web at this URL: | |
* http://opensource.org/licenses/osl-3.0.php |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Hook extends HookCore | |
{ | |
/* | |
* module: shiptopay | |
* date: 2015-11-09 21:58:42 | |
* version: 2.0 | |
*/ | |
public static function getHookModuleExecList($hook_name = null) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
Using: | |
/override/modules/bankwire/controllers/front/payment.php | |
class BankwirePaymentModuleFrontControllerOverride extends BankwirePaymentModuleFrontController | |
*/ | |
if (!defined('_PS_VERSION_')) | |
exit; | |
class Dispatcher extends DispatcherCore { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
public static function getToken($page = true, Context $context = null) | |
{ | |
if (!$context) { | |
$context = Context::getContext(); | |
} | |
if (!Validate::isLoadedObject($context->customer)) { | |
$unique = $context->cookie->id_guest; | |
} else { | |
$unique = $context->customer->id.$context->customer->passwd; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Resize image - preserve ratio of width and height. | |
* @param string $sourceImage path to source JPEG image | |
* @param string $targetImage path to final JPEG image file | |
* @param int $maxWidth maximum width of final image (value 0 - width is optional) | |
* @param int $maxHeight maximum height of final image (value 0 - height is optional) | |
* @param int $quality quality of final image (0-100) | |
* @return bool | |
*/ | |
function resizeImage($sourceImage, $targetImage, $maxWidth, $maxHeight, $quality = 80) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript:(function(e,t){function n(e){e+="";var t=e.charAt(0).toUpperCase();return t+e.substr(1)}function u(){var t=i();var r=document.body.style;var u;var a;if(e.devicePixelRatio>1){u=o;e.devicePixelRatio=1}else{u=s;e.devicePixelRatio=2}for(var f in u){a=t?t+n(f):f;r[a]=u[f]}}var r="Webkit Moz Khtml O ms Icab".split(" ");var i=function(){var e="";var t="Transform";var n=document.body.style;for(var i=0,s=r.length;i<s;i++){if(n[r[i]+t]!==void 0){return r[i]}}return e};var s={transform:"scale(2)",transformOrigin:"0 0","overflow-x":"visible!important"};var o={transform:"",transformOrigin:"","overflow-x":"hidden"};if(!this.setInterval){return"Can't copy paste this. https://bugzilla.mozilla.org/show_bug.cgi?id=527530"}var a=setInterval(function(){if(document.body){clearInterval(a);u()}},10)})(window,location) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Address extends AddressCore | |
{ | |
public function validateController($htmlentities = true) | |
{ | |
$errors = parent::validateController($htmlentities); | |
if(Tools::getValue('company', 0)) |
NewerOlder