This file contains hidden or 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 _applyPlugin($function, $args) { | |
foreach ($this->plugins as $plugin) { | |
if (method_exists($plugin, $function)) { | |
switch (count($args)) { // call_user_func_array() doesn't work well with references | |
case 0: $return = $plugin->$function(); break; | |
case 1: $return = $plugin->$function($args[0]); break; | |
case 2: $return = $plugin->$function($args[0], $args[1]); break; | |
case 3: $return = $plugin->$function($args[0], $args[1], $args[2]); break; | |
case 4: $return = $plugin->$function($args[0], $args[1], $args[2], $args[3]); break; |
This file contains hidden or 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 | |
$SQL = "INSERT INTO `productgroups` "; | |
$SQL .= "( "; | |
$SQL .= "`xmlid`,"; | |
$SQL .= "`lang`,"; | |
$SQL .= "`title`"; | |
$SQL .= ") "; | |
$SQL .= "VALUES ( "; | |
$SQL .= "'".mysql_real_escape_string($_POST['group']['xmlid'])."', "; | |
$SQL .= "'".mysql_real_escape_string($_POST['group']['lang'])."', "; |
This file contains hidden or 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 | |
/** | |
* Explodes an XPath into an Array / only 2 Levels | |
* @param array $xpath | |
* @param boolean $utf8Encode | |
* @return array | |
*/ | |
private function titleExploder($xpath, $utf8Encode = TRUE) { | |
$exTitle = explode('/', $xpath); |
This file contains hidden or 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 | |
use ActionController; // etc.. | |
/** | |
* Example controller | |
*/ | |
class EventController extends ActionController { | |
public function invitePeopleFormAction(SearchForm $searchForm = NULL) { | |
// check individual properties of $searchForm, e.g. $searchForm->getEvent() |
This file contains hidden or 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
{% compress js %} | |
<script src="/static/coffee/app.coffee" type="text/coffeescript" charset="utf-8"></script> | |
{% endcompress %} |
This file contains hidden or 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
if (is_array($soapResultObject->Body->ExecuteResponse->ExecuteResult->Results->KeyValuePairOfstringanyType->value->Entities->Entity)) { | |
foreach ($soapResultObject->Body->ExecuteResponse->ExecuteResult->Results->KeyValuePairOfstringanyType->value->Entities->Entity as $entity) { | |
$entities_array[] = $this->findByUid($entity->LogicalName->LogicalName, $entity->Id->Id, $convertToClass); | |
} | |
} elseif (isset($soapResultObject->Body->ExecuteResponse->ExecuteResult->Results->KeyValuePairOfstringanyType->value->Entities->Entity)) { | |
$entity = $soapResultObject->Body->ExecuteResponse->ExecuteResult->Results->KeyValuePairOfstringanyType->value->Entities->Entity; | |
$entities_array[] = $this->findByUid($entity->LogicalName->LogicalName, $entity->Id->Id, $convertToClass); | |
} |
This file contains hidden or 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
jsoncontactlist = PAGE | |
jsoncontactlist { | |
10 = USER_INT | |
10 { | |
userFunc = Tx_Extbase_Core_Bootstrap->run | |
extensionName = hsgtalents | |
pluginName = message | |
controller = Message | |
controllerConfiguration { | |
Message = findRecipients |
This file contains hidden or 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
import sys | |
from tcunittest import TeamcityTestRunner | |
from tcmessages import TeamcityServiceMessages | |
from pycharm_run_utils import adjust_django_sys_path | |
from nose_utils import TeamcityNoseRunner | |
adjust_django_sys_path() |
This file contains hidden or 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
activation_link = user.registrationprofile.get_absolute_url() | |
self.assertIn(activation_link, mail.outbox[0].body) |
This file contains hidden or 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 has_verified_email(self): | |
try: | |
verification = self.emailverification | |
except EmailVerification.DoesNotExist: | |
return True | |
return verification.is_verified() | |
has_verified_email.boolean = True |