Changeset 95


Ignore:
Timestamp:
02/21/06 23:36:53 (7 years ago)
Author:
anarcat
Message:

[project @ alternc: changeset 2003-06-09 20:13:40 by root]
GROS patch, mysql fonctionne maintenant TRES BIEN ;) y compris les
recalculs de quota ;)

Original author: root
Date: 2003-06-09 20:13:40

Location:
bureau/class
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • bureau/class/m_mysql.php

    r94 r95  
    11<?php 
    22/* 
    3  $Id: m_mysql.php,v 1.8 2003/06/09 20:01:40 root Exp $ 
     3 $Id: m_mysql.php,v 1.9 2003/06/09 20:13:40 root Exp $ 
    44 ---------------------------------------------------------------------- 
    55 AlternC - Web Hosting System 
     
    266266  *****************************************************************************/ 
    267267  function new_mysql($password) { 
    268     global $db,$err,$mem; 
     268    global $db,$err,$mem,$quota; 
    269269    $err->log("mysql","new_mysql"); 
    270270    if (strlen($password)>16) { 
     
    285285    exec("/usr/lib/alternc/db_create ".$this->uid." /var/alternc/db/".$mem->user["login"]); 
    286286    $db->query("FLUSH PRIVILEGES;"); 
     287    $quota->inc("mysql"); 
    287288    return true; 
    288289  } 
     
    307308  } 
    308309 
     310  function alternc_quota_check($id) { 
     311    global $err,$quota; 
     312    $err->log("mysql","alternc_quota_check"); 
     313    $c=$this->get_dblist($id); 
     314    if (is_array($c)) { 
     315      $quota->setquota("mysql",count($c),1,$id); 
     316    } else { 
     317      $quota->setquota("mysql",0,1,$id); 
     318    } 
     319    return true; 
     320  } 
     321 
    309322  function alternc_del_member($id) { 
    310323    global $db,$err; 
    311     $err->log("mysql","del_member"); 
     324    $err->log("mysql","alternc_del_member"); 
    312325    $c=$this->get_dblist($id); 
    313326    if (is_array($c)) { 
  • bureau/class/m_quota.php

    r94 r95  
    11<?php 
    22/* 
    3  $Id: m_quota.php,v 1.3 2003/06/09 20:01:40 root Exp $ 
     3 $Id: m_quota.php,v 1.4 2003/06/09 20:13:40 root Exp $ 
    44 ---------------------------------------------------------------------- 
    55 AlternC - Web Hosting System 
     
    175175  /*****************************************************************************/ 
    176176  function checkquota($id=-1) { 
    177     global $err; 
     177    global $err,$classes; 
    178178    $err->log("quota","checkquota",$id); 
    179179    if ($id==-1) $id=$this->uid; 
     
    181181    for($i=0;$i<count($classes);$i++) { 
    182182      if (method_exists($GLOBALS[$classes[$i]],"alternc_quota_check")) { 
    183         $GLOBALS[$classes[$i]]->alternc_quota_check($uid); 
     183        $GLOBALS[$classes[$i]]->alternc_quota_check($id); 
    184184        } 
    185185      } 
Note: See TracChangeset for help on using the changeset viewer.