Changeset 1999 for trunk/phpgwapi


Ignore:
Timestamp:
02/10/10 15:37:22 (14 years ago)
Author:
amuller
Message:

Ticket #490 - #690 - Merge branches Expresso 2.2 com Trunk

Location:
trunk/phpgwapi
Files:
7 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/phpgwapi/inc/class.common.inc.php

    r1576 r1999  
    12191219                        { 
    12201220                                echo parse_navbar(); 
    1221                         } 
     1221                        }  
     1222                        echo "<script type='text/javascript' src='../phpgwapi/expressoAjax/expressoAjax.js'></script>"; 
     1223 
    12221224                } 
    12231225 
  • trunk/phpgwapi/inc/class.preferences.inc.php

    r1295 r1999  
    222222                                $this->session = array(); 
    223223                        } 
     224                        $groups = $GLOBALS['phpgw']->accounts->membership(); 
     225                        foreach($groups as $group) 
     226                                $gids .= ",".$group['account_id']; 
     227                        $account_id = (int)$this->account_id; 
     228 
    224229                        $this->db->query("SELECT * FROM phpgw_preferences" 
    225                                 . " WHERE preference_owner IN (-1,-2," . (int)$this->account_id . ')',__LINE__,__FILE__); 
     230                                . " WHERE preference_owner IN (-1,-2," . $account_id . $gids . ')',__LINE__,__FILE__); 
    226231 
    227232                        $this->forced = $this->default = $this->user = array(); 
     
    244249                                                $this->default[$app] = $value; 
    245250                                                break; 
    246                                         default:        // user 
     251                                        case $account_id: //user 
    247252                                                $this->user[$app] = $value; 
     253                                                break; 
     254                                        default: // group 
     255                                                $this->group[$app] = $value; 
    248256                                                break; 
    249257                                } 
     
    273281                                } 
    274282                        } 
     283                        // now set/force forced values for groups 
     284                        // 
     285                        foreach($this->group as $app => $values) 
     286                        { 
     287                                foreach($values as $var => $value) 
     288                                { 
     289                                        $this->data[$app][$var] = $value; 
     290                                } 
     291                        } 
     292 
    275293                        // now set/force forced values 
    276294                        // 
     
    532550                @note the user prefs for saveing are in $this->user not in $this->data, which are the effectiv prefs only 
    533551                */ 
    534                 function save_repository($update_session_info = False,$type='user') 
     552                function save_repository($update_session_info = False,$type='user',$account_id = null) 
    535553                { 
    536554                        switch($type) 
    537555                        { 
    538556                                case 'forced': 
    539                                         $account_id = -1; 
     557                                        if ($account_id == null) 
     558                                                $account_id = -1; 
    540559                                        $prefs = &$this->forced; 
    541560                                        break; 
     
    554573                        { 
    555574                                $this->db->transaction_begin(); 
    556                                 //$this->db->query("DELETE FROM phpgw_preferences WHERE preference_owner='$account_id'", 
    557                                 $this->db->query("DELETE FROM phpgw_preferences WHERE preference_owner='$account_id' and preference_app <> 'jabberit_messenger'", 
    558                                         __LINE__,__FILE__ 
    559                                 ); 
    560  
    561575                                foreach($prefs as $app => $value) 
    562576                                { 
     
    566580                                        } 
    567581                                        $this->quote($value); 
    568                                         $value = $this->db->db_addslashes(serialize($value));   // this addslashes is for the database 
     582                                        $value = $this->db->db_addslashes(serialize($value));    // this addslashes is for the database 
    569583                                        $app = $this->db->db_addslashes($app); 
    570584 
    571                                         $this->db->query($sql = "INSERT INTO phpgw_preferences" 
    572                                                 . " (preference_owner,preference_app,preference_value)" 
    573                                                 . " VALUES ($account_id,'$app','$value')",__LINE__,__FILE__); 
     585                                        $query = "SELECT (preference_owner, preference_app) FROM phpgw_preferences WHERE preference_owner = '".$account_id."' AND preference_app = '".$app."'"; 
     586 
     587                                        $this->db->query($query, __LINE__, __FILE__); 
     588 
     589                                        if(!$this->db->next_record()) 
     590                                        { 
     591                                                // Insert Db 
     592                                                $query = "INSERT INTO phpgw_preferences(preference_owner,preference_app, preference_value) ". 
     593                                                        "VALUES('".$account_id."','".$app."','".$value."')"; 
     594                                        } 
     595                                        else 
     596                                        {       
     597                                                // Update Db 
     598                                                $query = "UPDATE phpgw_preferences SET preference_value = '".$value."' WHERE ". 
     599                                                        "preference_owner = '".$account_id."' AND preference_app = '".$app."'"; 
     600                                        } 
     601                                        $this->db->query($query, __LINE__, __FILE__);                 
    574602                                } 
    575603                                $this->db->transaction_commit(); 
  • trunk/phpgwapi/templates/default/css/azul.css

    r1719 r1999  
    1212    border-bottom: 1px solid #D3DCE3; 
    1313     
     14} 
     15 
     16.conteudo { 
     17    font-family: Verdana, Arial, Helvetica, sans-serif; 
     18    font-size: 10px; 
     19    font-weight: normal; 
     20    color: #000033; 
     21    padding: 1px; 
     22    border-left:1px solid #4A79B1; 
     23    width:99.5%; 
     24    overflow: none; 
     25    -moz-border-radius: 0px 0px 6px 6px; 
     26} 
     27 
     28.whiteSpace{ 
     29        width: 2px; 
     30} 
     31.menu 
     32{ 
     33    text-decoration: none; 
     34    text-align: center; 
     35/*    font: bold 13px Lucidatypewriter,monospace;*/ 
     36    height: 20px;     
     37    width:220px; 
     38        background-color:#c8d7ea; 
     39 
     40/*    background-color: #F7F7F7;*/ 
     41    margin-bottom: 0px; 
     42    border: 1px solid #f4f7fc; 
     43    border-bottom: 1px solid #4a79b1; 
     44    padding:0px 5px 0px 0px; 
     45    -moz-border-radius: 9px 9px 0px 0px; 
     46    -moz-user-select: none; 
     47    cursor: pointer; 
     48} 
     49 
     50.last_menu 
     51{ 
     52        border-bottom: 1px solid #4a79b1; 
     53        -moz-border-radius: 0px 0px 0px 0px; 
     54} 
     55 
     56.menu-sel 
     57{ 
     58    text-decoration: none; 
     59    text-align: center; 
     60    font: bold 13px Lucidatypewriter,monospace; 
     61    color:#0000FF; 
     62    height: 20px; 
     63    width:220px; 
     64    background-color:#F7F7F7; 
     65    margin-bottom: 0px; 
     66    border: 1px solid #4a79b1; 
     67    border-bottom: 0px; 
     68    padding:0px 5px 0px 0px; 
     69    -moz-border-radius: 9px 9px 0px 0px; 
     70    -moz-user-select: none; 
     71    cursor: pointer;     
    1472} 
    1573 
Note: See TracChangeset for help on using the changeset viewer.