/[drupal]/contributions/modules/views/modules/views_node.inc
ViewVC logotype

Diff of /contributions/modules/views/modules/views_node.inc

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.24.2.28 by merlinofchaos, Sat May 5 00:54:49 2007 UTC revision 1.24.2.29 by merlinofchaos, Sat Jul 14 22:03:30 2007 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: views_node.inc,v 1.24.2.27 2007/05/04 23:40:15 merlinofchaos Exp $  // $Id: views_node.inc,v 1.24.2.28 2007/05/05 00:54:49 merlinofchaos Exp $
3    
4  /**  /**
5   * This include file implements views functionality on behalf of node.module   * This include file implements views functionality on behalf of node.module
# Line 499  function views_handler_arg_nodetype($op, Line 499  function views_handler_arg_nodetype($op,
499  }  }
500    
501  function views_handler_arg_nodeletter($op, &$query, $argtype, $arg = '') {  function views_handler_arg_nodeletter($op, &$query, $argtype, $arg = '') {
502      static $field;
503    switch($op) {    switch($op) {
504      case 'summary':      case 'summary':
505        $len = intval($arg);        $len = intval($arg);
506        $fieldinfo['field'] = ($len <= 0 ? "node.title" : $fieldinfo['field'] = "LEFT(node.title, $len)");        $field = $fieldinfo['field'] = ($len <= 0 ? "node.title" : $fieldinfo['field'] = "LEFT(node.title, $len)");
507        $fieldinfo['fieldname'] = 'letter';        $fieldinfo['fieldname'] = 'letter';
508        return $fieldinfo;        return $fieldinfo;
509        break;        break;
510      case 'sort':      case 'sort':
511        $query->add_orderby('node', 'title', $argtype);        $query->add_orderby('', $field, $argtype, 'letter');
512        break;        break;
513      case 'filter':      case 'filter':
514        $len = intval($argtype['options']);        $len = intval($argtype['options']);

Legend:
Removed from v.1.24.2.28  
changed lines
  Added in v.1.24.2.29

  ViewVC Help
Powered by ViewVC 1.1.3