chx

theme drupal alter

  1. === modified file 'includes/common.inc'
  2. --- includes/common.inc 2009-09-25 15:20:12 +0000
  3. +++ includes/common.inc 2009-09-30 05:55:35 +0000
  4. @@ -3989,6 +3989,7 @@ function drupal_system_listing($mas

Code

  1.                 // Version compare treats 'x' as lower than '0'. So <2.x is
  2.                 // handled properly as 2.0-anything is higher than 2.x.

dd

  1. function dd($data, $label = NULL, $print_r = FALSE) {
  2.   // Print $data contents to string.
  3.   $string = ($print_r ? print_r($data, TRUE) : var_export($data, TRUE)) .

dependency on version

  1. function _module_build_dependencies($files) {
  2.   require_once DRUPAL_ROOT .

Code

  1. foreach (array('module', 'theme') as $type) {
  2.   if ($dir = drupal_get_path($type, $name)) {
  3.     return array('type' => constant("UPDATE_EXTENSION_TYPE_$type"), 'location' => $dir);
  4.   }
  5. }
  6. return F

more fapi half oop code

  1. <?php
  2.  
  3. class drupalFormElement implements ArrayAccess, IteratorAggregate {
  4.   protected $storage = array();
  5.   protected $input = TRUE;
  6.  
  7.   function getIterator() {
  8.     return new ArrayIterator(

Code

  1. <?php
  2.  
  3. function _element_children_replace($matches) {
  4.   $element = $matches[1];
  5.   $key = $matches[2];
  6.   return 'foreach ('. $element . ' as $element_child) ' . str_replace($element . '[' .

New menu local tasks code with examples

  1. function menu_local_tasks($return_level) {
  2.   static $output;
  3.   if (!isset($output)) {
  4.     $output = array();
  5.     $tasks = array();
  6.     $item = menu_get_item();
  7.     // Collect local tasks.
  8.     $

Fix for Code

  1. /**
  2.  * Redirects comment links to the correct page depending on comment settings.
  3.  */
  4. function comment_() {
  5.   $node = menu_get_object();
  6.   $comment = menu_get_object('comment', 3);
  7.   if ($node &

new menu local tasks code

  1. function menu_local_tasks($return_level) {
  2.   static $output;
  3.   if (!isset($output)) {
  4.     $tasks = array();
  5.     $links = array();
  6.     $output = array();
  7.     $item = menu_get_item();
  8.     $defaul

Half OOP FAPI: no methods

  1. <?php
  2.  
  3. class DrupalInputElement extends ArrayObject {
  4.   /**
  5.    * This elements accepts user input.
  6.    */
  7.   protected $input = TRUE;
  8.   public $default_value;
  9.   function __construct($args) {
  10.  

New menu local tasks code

  1. function menu_local_tasks($return_level) {
  2.   static $output;
  3.   if (!isset($output)) {
  4.     $tasks = array();
  5.     $links = array();
  6.     $output = array();
  7.     $item = menu_get_item();
  8.     $defaul

Code

  1. function update_untar($untar_methods, $file, $directory) {
  2.   if (substr($directory,0,1) != DIRECTORY_SEPARATOR) {
  3.     $directory = DIRECTORY_SEPARATOR .

Code

  1.     if (substr($directory,0,1) != DIRECTORY_SEPARATOR) {
  2.       $directory = DIRECTORY_SEPARATOR . $directory;
  3.     }
  4.     $directory = file_directory_temp() . '/update-extraction' .

Code

  1.   function __get($name) {
  2.     static $connection;
  3.     if ($name == 'connection') {
  4.       if (empty($connection)) {
  5.         $connection = $this->connect();
  6.       }
  7.       return $connection;
  8.    

Code

  1.   public function condition($field, $value = NULL, $operator = NULL) {
  2.     $this->where->condition($field, $value, $operator);
  3.     return $this;
  4.   }

Fix for removing INs patch with debug YesCT

  1.       if (!isset($data)) {
  2.         // Build and run the query, and build the tree.
  3.         if ($item['access']) {

Code

  1. === modified file 'includes/database.inc'
  2. --- includes/database.inc       2008-04-20 18:23:21 +0000
  3. +++ includes/database.inc       2008-06-19 07:02:46 +0000
Syndicate content