Changeset 4241

Show
Ignore:
Timestamp:
06/27/07 08:32:46 (1 year ago)
Author:
diego_iastrubni
Message:

fix to ficket:1778 - add sqlite3 support to pinsets module

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/branches/2.3/pinsets/install.php

    r2146 r4241  
    11<?php 
    2 // There is no way to delete a file supplied with modules. 
    3 // This is overwriting the existing file 
     2 
     3global $db; 
     4global $amp_conf; 
     5 
     6$autoincrement = (($amp_conf["AMPDBENGINE"] == "sqlite") || ($amp_conf["AMPDBENGINE"] == "sqlite3")) ? "AUTOINCREMENT":"AUTO_INCREMENT"; 
     7 
     8$sql = "CREATE TABLE IF NOT EXISTS pinsets (  
     9        pinsets_id INTEGER NOT NULL  PRIMARY KEY $autoincrement,  
     10        passwords LONGTEXT,  
     11        description VARCHAR( 50 ) ,  
     12        addtocdr TINYINT( 1 ) ,  
     13        deptname VARCHAR( 50 ) ,  
     14        used_by VARCHAR( 255 ) 
     15)"; 
     16 
     17$check = $db->query($sql); 
     18if(DB::IsError($check)) { 
     19        die("Can not create `pinsets` table\n"); 
     20
     21 
    422?> 
  • modules/branches/2.3/pinsets/install.sql

    r1912 r4241  
    1 CREATE TABLE IF NOT EXISTS pinsets ( pinsets_id INT NOT NULL AUTO_INCREMENT PRIMARY KEY , passwords LONGTEXT, description VARCHAR( 50 ) , addtocdr TINYINT( 1 ) , deptname VARCHAR( 50 ) , used_by VARCHAR( 255 )); 
     1-- empty file, because of http://freepbx.org/trac/ticket/1277 
  • modules/branches/2.3/pinsets/module.xml

    r3511 r4241  
    22        <rawname>pinsets</rawname> 
    33        <name>PIN Sets</name> 
    4         <version>1.1</version> 
     4        <version>1.2</version> 
    55        <type>setup</type> 
    66        <category>Internal Options &amp; Configuration</category> 
    77        <description>Allow creation of lists of PINs (numbers for passwords) that can be used by other modules (eg, trunks).</description> 
    88        <changelog> 
     9                *1.2* Add SQLite3 support, fixes http://freepbx.org/trac/ticket/1778 
    910                *1.1* Add he_IL translation, add naftali5's fixes where pinsets were being lost when moved around. 
    1011                *1.0.11* Stop potential error where a random pinset is appearing when creating a new trunk 
  • modules/branches/2.3/pinsets/uninstall.php

    r1760 r4241  
    11<?php 
    22 
    3 sql('DROP TABLE pinsets'); 
     3sql('DROP TABLE IF EXISTS `pinsets`'); 
    44 
    55?> 
Donate



Support
Download
Develop
Forums
News
Documentation
Paid Support
About

Paid Ads