Ignore:
Timestamp:
02/22/06 00:17:43 (8 years ago)
Author:
anarcat
Message:

[project @ alternc: changeset 2004-10-24 19:57:50 by anonymous]

  • Quota automagique : Step 3
  • suppression des appels à inc et dec (pas supprimés dans quota au cas où certains modules externes l'appelaient !)
  • suppression de alternc_quota_check

Original author: anonymous
Date: 2004-10-24 19:57:50

File:
1 edited

Legend:

Unmodified
Added
Removed
  • bureau/class/m_mysql.php

    r428 r429  
    11<?php 
    22/* 
    3  $Id: m_mysql.php,v 1.19 2004/10/24 19:52:00 anonymous Exp $ 
     3 $Id: m_mysql.php,v 1.20 2004/10/24 19:57:50 anonymous Exp $ 
    44 ---------------------------------------------------------------------- 
    55 AlternC - Web Hosting System 
     
    189189    $db->query("DELETE FROM mysql.db WHERE db='$dbname';"); 
    190190    $db->query("DROP DATABASE $dbname;"); 
    191     $quota->dec("mysql"); 
    192191    $db->query("SELECT COUNT(*) AS cnt FROM db WHERE uid='$cuid';"); 
    193192    $db->next_record(); 
     
    295294    exec("/usr/lib/alternc/db_create $cuid /var/alternc/db/".$mem->user["login"]); 
    296295    $db->query("FLUSH PRIVILEGES;"); 
    297     $quota->inc("mysql"); 
    298296    return true; 
    299297  } 
     
    329327  } 
    330328   
    331   /* ----------------------------------------------------------------- */ 
    332   /** 
    333    * AlternC's standard function that check a user's qutoa 
    334    * TODO : remove this function 
    335    */ 
    336   function alternc_quota_check() { 
    337     global $err,$quota; 
    338     $err->log("mysql","alternc_quota_check"); 
    339     $c=$this->get_dblist(); 
    340     if (is_array($c)) { 
    341       $quota->setquota("mysql",count($c),1); 
    342     } else { 
    343       $quota->setquota("mysql",0,1); 
    344     } 
    345     return true; 
    346   } 
    347  
    348329  /* ----------------------------------------------------------------- */ 
    349330  /** 
Note: See TracChangeset for help on using the changeset viewer.