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
//html/ajax_search.php | |
<?php | |
$init_modules = array('web', 'auth'); | |
require realpath(__DIR__ . '/..') . '/includes/init.php'; | |
require '/includes/generic_search.inc.php'; //requiring html/includes/generic_search.inc.php | |
set_debug($_REQUEST['debug']); | |
//check auth based on session | |
if (!$_SESSION['authenticated']) { | |
echo "Unauthenticated\n"; |
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
/* | |
Copyright (C) 2011 J. Coliz <maniacbug@ymail.com> | |
This program is free software; you can redistribute it and/or | |
modify it under the terms of the GNU General Public License | |
version 2 as published by the Free Software Foundation. | |
*/ | |
#include <SPI.h> | |
#include "nRF24L01.h" |
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
def ProductFilters.ov_range_test(range1, range2) | |
ov = Arel::Table.new("spree_option_values") | |
cast = Arel::Nodes::NamedFunction.new "CAST", [ ov[:presentation].as("integer")] | |
comparaisons = cast.in(range1..range2) | |
comparaisons | |
end | |
Spree::Product.add_search_scope :screenSize_range_any do |*opts| | |
conds = opts.map {|o| Spree::ProductFilters.screenSize_filter[:conds][o]}.reject {|c| c.nil?} | |
scope = conds.shift |