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
SELECT id_customer, IFNULL(ps_gender_lang.name, NULLIF(ps_customer.id_gender, 0)) AS gender, ps_lang.iso_code AS lang, ps_customer.firstname, ps_customer.lastname, email, ps_customer.company, passwd, secure_key, birthday, newsletter, ip_registration_newsletter, optin, website, ps_customer.note, ps_customer.active, is_guest, ps_customer.deleted, ps_customer. date_add, ps_customer.date_upd, | |
ps_address.alias AS address_alias, ps_address.address1, ps_address.address2, ps_address.company AS address_company, ps_address.postcode, ps_address.city, ps_address.other, ps_address.phone, ps_address.phone_mobile, ps_address.vat_number, IFNULL(ps_country.iso_code,ps_address.id_country) AS country | |
FROM `ps_customer` | |
INNER JOIN ps_lang ON ps_customer.id_lang=ps_lang.id_lang | |
LEFT JOIN ps_gender_lang ON ps_gender_lang.id_gender= ps_customer.id_gender AND ps_gender_lang.id_lang=1 | |
LEFT JOIN ps_address USING(id_customer) | |
LEFT JOIN ps_country ON ps_country.id_country=ps_address.id_country; |
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
Show hidden characters
{ | |
"default_triggers": [ | |
":", | |
";", | |
".", | |
" ", | |
"(", | |
")", | |
"_", | |
"enter" |
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
# Ignore everything except custom files | |
/* | |
!/modules | |
/modules/* | |
!/modules/custom/ | |
!/themes | |
/themes/* | |
!/themes/custom/ | |
!/profiles | |
/profiles/* |
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
# ignore git files | |
.gitattributes export-ignore | |
.gitignore export-ignore | |
# ignore drupal files | |
.editorconfig export-ignore | |
/*.txt export-ignore | |
install.php export-ignore | |
modules/README.txt export-ignore | |
sites/README.txt export-ignore | |
themes/README.txt export-ignore |
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 | |
/** | |
* Implements hook_preprocess_html(). | |
*/ | |
function <theme>_preprocess_html(&$vars) | |
{ | |
$meta = array( | |
'#tag' => 'meta', | |
'#attributes' => array( |
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 | |
/** | |
* Implements hook_preprocess_html(). | |
*/ | |
function <theme>_preprocess_html(&$variables) | |
{ | |
$header = drupal_get_http_header('status'); | |
if ($header && preg_match('`^[0-9]+`', $header, $matches)) { | |
switch ($matches[0]) { |
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 | |
/** | |
* Flatten a multidimensional array to a single dimensional array by joining nested keys together | |
* | |
* @param array $array The array to flatten | |
* @param string $glue Glue string to join keys together | |
* @return array | |
*/ | |
function array_linearize(array $array, $glue = '/') | |
{ |
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 | |
$xml = <<<ENDXML | |
<catalog xmlns:ns1="http://localhost/ns1" xmlns:ns2="http://localhost/ns2"> | |
<product id="1" ns2:order="2"> | |
<name>Test</name> | |
<ns1:price>100</ns1:price> | |
</product> | |
</catalog> | |
ENDXML; |
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
# more info : http://httpd.apache.org/docs/current/en/expr.html#vars | |
# deny access from monday to friday and between 9am to 6pm | |
RewriteCond %{TIME_WDAY} ^1|2|3|4|5$ | |
RewriteCond %{TIME_HOUR} ^0?9|10|11|12|13|14|15|16|17|18$ | |
RewriteRule ^nsfw\.html$ - [L] |
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
{ | |
"require-dev": { | |
"squizlabs/php_codesniffer": "2.*" | |
}, | |
"scripts": { | |
"phpcs-setup": [ | |
"\"vendor/bin/phpcs\" --config-set default_standard ruleset.xml", | |
"\"vendor/bin/phpcs\" --config-set colors 1", | |
"\"vendor/bin/phpcs\" --config-set show_progress 1", | |
"\"vendor/bin/phpcs\" --config-set report_width 120", |
NewerOlder