Xano

Code

  1. <?php
  2. $binary = '/user/local/bin/aspell';
  3. exec('which ' . $binary, $output, $code);
  4.  
  5. // $binary is in reality a variable set by an administrator.

Code

  1.       'view modes' => array(
  2.         'full' => array(
  3.           'label' => t('Full node'),
  4.         ),
  5.         'teaser' => array(
  6.           'label' => t('Teaser'),
  7.         ),
  8.         'rss' => ar

If it's stupid and it works, it ain't stupid

  1. function mew_menu_rebuild() {
  2.   // Menu items can appear twice after overwriting them.

Code

  1. index::__set_state(array(
  2.    'iid' => 0,
  3.    'title' => 'Website crew',
  4.    'description' => 'These are all crew members of this website, sorted by their role.',
  5.    'cache_lifetime' => '0',
  6.    'lan

Code

  1. $foobar = array(
  2.   'a' => array(
  3.     array(
  4.       '#title' => 'foo',
  5.     ),
  6.     array(
  7.       '#title' => 'bar',
  8.     ),
  9.   ),
  10.   'b' => array(
  11.     array(
  12.       '#title' => 'froo',
  13.     ),
  14.    

Code

  1.         foreach ($layers as $layer) {
  2.           if ($layer->entity_type == $entity_type) {
  3.             if ($i == count($selectors) - 1) {
  4.               $index->contexts['page']->browsable_path = $s

Code

  1. .item-list ul.index-display-flat ul li.first {
  2.   border: 0;
  3. }
  4.  
  5. /* Browsable */
  6. .item-list ul.index-display-flat ul li.parent {
  7.   background: url(../../../../../themes/garland/images/menu-collaps

Code

  1. $index->contexts['page']->path = 'browse';
  2. $_GET['q'] = 'browse/node_type-page';
  3.  
  4. if ($path = trim(ltrim($_GET['q'], $index->contexts['page']->path), '/'))
  5. // $path is 1
  6.  
  7. trim(ltrim($_GET['q'],

Code

  1. $('#index-contexts').addClass('index-vertical-tabs').find('fieldset').hide().wrapAll('<div id="index-contexts-panes"></div>').first().show();

Code

  1. if (!$postcal_code || !db_result(db_query("SELECT COUNT(*) FROM {zipcodes} WHERE zip LIKE '%s'", $postal_code))) {
  2.   form_error($a3['postal_code'], t('This postal code does not exist.'));
  3. }

Code

  1. class indexCallback {
  2.   public $function = NULL;
  3.   public $file = NULL;
  4.   public $module = NULL;
  5.  
  6.   function __construct($function, $file = NULL, $module = NULL) {
  7.     $this->function = $functio

Code

  1. indexLayer Object
  2. (
  3.     [index] => index Object
  4.         (
  5.             [iid] => 1
  6.             [title] => Test index
  7.             [description] =>
  8.             [layers] => Array
  9.                 (

Code

  1. <?php
  2. class indexEntity {
  3.   public $children = array();
  4.   public $children_count = 0;
  5.   public $depth = NULL;
  6.   public $data = NULL;
  7.  
  8.   function __construct(stdClass $data, $depth) {
  9.     $this

Code

  1. <?php
  2. function index_preview(index $index, $type) {
  3.   if ($index->$type['enabled'] && $index->$type['mode']) {
  4.     return $index->view($type);
  5.   }
  6.   return NULL;
  7. }
  8.  
  9. /*
  10. $index = index Object

Code

  1.   $form['create']['block_mode'] = array(
  2.     '#type' => 'select',
  3.     '#title' => t('Display mode'),
  4.     '#options' => $block_modes,
  5.     '#default_value' => $index->block_mode,
  6.     '#prefix' => '

Code

  1.       $form['layer_type_' .

Fix for Code

  1.   /**
  2.    * Get a layer's children.
  3.    *
  4.    * @param $layers array
  5.    *   The layers to search.
  6.    * @param $parent_lid string
  7.    *   The layer ID of the layer to get the children for.
  8.    */
  9.  

Code

  1.   /**
  2.    * Get a layer's children.
  3.    *
  4.    * @param $layers array
  5.    *   The layers to search.
  6.    * @param $parent_lid string
  7.    *   The layer ID of the layer to get the children for.
  8.    */
  9.  

Code

  1. function theme_index_form_add(array $form) {
  2.   $rows = array();
  3.   for ($i = 0; $i < $form['layers']['layer_count']['#value']; $i++) {
  4.     $layer = &$form['layers']['selectors'][$i];
  5.     $required

Code

  1. <?php
  2.   for ($i = $length[0] - 1, $j = $length[1] - 1; $i >= 0, $j >= 0; $i--, $j--) {
  3.     // Check if the current token has changed or not.
  4.     if ($tokens[0][$i]['string'] !== $tokens[1][$j]['str
Syndicate content