Skip to content

Instantly share code, notes, and snippets.

#celery\concurrency\processes\_win.py
from ctypes import byref, sizeof, windll, Structure, WinError, POINTER
from ctypes.wintypes import DWORD, c_size_t, LONG, c_char, c_void_p
### had to change to ####
from ctypes import c_size_t, c_char, c_void_p, byref, sizeof, windll, Structure, WinError, POINTER
from ctypes.wintypes import DWORD, LONG
<?php
public function inputDefaults($defaults = null, $merge = false) {
if (!is_null($defaults)) {
$this->_inputDefaults = array_merge($merge ? $this->_inputDefaults : array(), (array)$defaults);
}
return $this->_inputDefaults;
}
<?php
public function beforeFilter() {
parent::beforeFilter();
// Painel de Controle
if (isset($this->params['prefix']) && $this->params['prefix'] == 'admin') {
$this->layout = 'admin';
// Configuração do AuthComponent
diff --git a/lib/Cake/View/Helper.php b/lib/Cake/View/Helper.php
index f198f82..fb2952d 100644
--- a/lib/Cake/View/Helper.php
+++ b/lib/Cake/View/Helper.php
@@ -267,15 +267,29 @@ class Helper extends Object {
* @param array $options Options array. Possible keys:
* `fullBase` Return full url with domain name
* `pathPrefix` Path prefix for relative urls
+ * `ext` Asset extension to append
* @return string Generated url
<?php
public function pluginSplit($name, $fallback = true) {
$plugin = null;
list($first, $second) = pluginSplit($name);
if (CakePlugin::loaded($first) === true) {
$name = $second;
$plugin = $first;
}
if (isset($this->plugin) && !$plugin && $fallback) {
$plugin = $this->plugin;