~fabiocbalbuquerque/sahana-agasti/web-services

« back to all changes in this revision

Viewing changes to apps/frontend/lib/util/agImportHelper.class.php

  • Committer: Chad Heuschober
  • Date: 2011-08-02 20:25:51 UTC
  • mto: (1.26.1 push-trunk)
  • mto: This revision was merged to the branch mainline in revision 25.
  • Revision ID: chad.heuschober@mail.cuny.edu-20110802202551-v669uyghs4si013m
Fixed integer string lengths.

Show diffs side-by-side

added added

removed removed

Lines of Context:
134
134
   */
135
135
  protected static function getSpecificationStrLen(array $columnDefinition) {
136
136
    // string length / type comparison auto-magic
137
 
    switch($value['type']) {
 
137
    switch($columnDefinition['type']) {
138
138
      case 'integer':
139
139
      case 'int':
140
 
        return strlen(256^$columnDefinition['length']);
 
140
        return strlen(pow(256, $columnDefinition['length']));
141
141
        break;
142
142
      default:
143
143
        return $columnDefinition['length'];