@@ -56,7 +56,7 @@ discard block |
||
| 56 | 56 | </columns> |
| 57 | 57 | <rows> |
| 58 | 58 | '; |
| 59 | -foreach($trs[2] as $n => $tr) |
|
| 59 | +foreach ($trs[2] as $n => $tr) |
|
| 60 | 60 | { |
| 61 | 61 | if (strpos($tr, '{title}') || strpos($tr, '<input type="submit"')) continue; |
| 62 | 62 | |
@@ -64,25 +64,25 @@ discard block |
||
| 64 | 64 | { |
| 65 | 65 | die("No td tags found in $n. tr: $tr"); |
| 66 | 66 | } |
| 67 | - if (($commented = !empty($trs[1][$n])? $trs[1][$n] : '')) |
|
| 67 | + if (($commented = !empty($trs[1][$n]) ? $trs[1][$n] : '')) |
|
| 68 | 68 | { |
| 69 | 69 | echo "\t\t\t\t$commented\n"; |
| 70 | 70 | } |
| 71 | 71 | echo "\t\t\t\t<row>\n"; |
| 72 | - foreach($tds[2] as $t => $td) |
|
| 72 | + foreach ($tds[2] as $t => $td) |
|
| 73 | 73 | { |
| 74 | 74 | if (preg_match('|^\s*<([^ >]+)\s*([^/>]+)/?>(.*)\s*$|sui', $td, $matches)) |
| 75 | 75 | { |
| 76 | 76 | $attrs = preg_match_all('|\s*([^=]+)="([^"]+)"|', $matches[2], $attrs) ? |
| 77 | 77 | array_combine($attrs[1], $attrs[2]) : array(); |
| 78 | 78 | |
| 79 | - switch($matches[1]) |
|
| 79 | + switch ($matches[1]) |
|
| 80 | 80 | { |
| 81 | 81 | case 'input': |
| 82 | 82 | case 'textarea': |
| 83 | 83 | echo "\t\t\t\t\t<textbox id=\"".$attrs['name'].'"'; |
| 84 | 84 | unset($attrs['value'], $attrs['name']); |
| 85 | - foreach($attrs as $name => $value) |
|
| 85 | + foreach ($attrs as $name => $value) |
|
| 86 | 86 | { |
| 87 | 87 | if ($name == 'type' && $value == 'password') $value = 'passwd'; |
| 88 | 88 | echo " $name=\"$value\""; |
@@ -103,14 +103,14 @@ discard block |
||
| 103 | 103 | case 'select': |
| 104 | 104 | echo "\t\t\t\t\t<select id=\"".$attrs['name'].'"'; |
| 105 | 105 | unset($attrs['name']); |
| 106 | - foreach($attrs as $name => $value) |
|
| 106 | + foreach ($attrs as $name => $value) |
|
| 107 | 107 | { |
| 108 | 108 | echo " $name=\"$value\""; |
| 109 | 109 | } |
| 110 | 110 | echo ">\n"; |
| 111 | 111 | if (preg_match_all('|<option\s+value="([^"]*)"\s*({selected_[^}]+})?>(.*)</option>|Usui', $matches[3], $options)) |
| 112 | 112 | { |
| 113 | - foreach($options[3] as $i => $label) |
|
| 113 | + foreach ($options[3] as $i => $label) |
|
| 114 | 114 | { |
| 115 | 115 | $label = preg_replace_callback('/{lang_([^}]+)}/', function($matches) |
| 116 | 116 | { |
@@ -153,7 +153,7 @@ discard block |
||
| 153 | 153 | echo "/>\n"; |
| 154 | 154 | if (!$commented && !empty($matches[3]) && trim($matches[3])) echo "\t\t\t\t\t<!-- ".trim($matches[3])." -->\n"; |
| 155 | 155 | } |
| 156 | - elseif(!$commented) |
|
| 156 | + elseif (!$commented) |
|
| 157 | 157 | { |
| 158 | 158 | echo "\t\t\t\t\t<!-- ".trim($td)." -->\n"; |
| 159 | 159 | } |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | // dummy setup file |
| 3 | -if (strpos($_SERVER['PHP_SELF'],'/setup/') === false) |
|
| 3 | +if (strpos($_SERVER['PHP_SELF'], '/setup/') === false) |
|
| 4 | 4 | { |
| 5 | 5 | header('Location: /egroupware/setup/'); |
| 6 | 6 | exit; |
@@ -21,8 +21,8 @@ discard block |
||
| 21 | 21 | * @version $Id: class.accounts.inc.php 22048 2006-07-08 21:41:42Z ralfbecker $ |
| 22 | 22 | */ |
| 23 | 23 | |
| 24 | -if ($argc <= 1 || in_array($argv[1],array('-v','--help')) || $argv[1] == '--accounts-dn' && $argc <= 3|| |
|
| 25 | - !is_readable($file = $argv[$argc-1])) |
|
| 24 | +if ($argc <= 1 || in_array($argv[1], array('-v', '--help')) || $argv[1] == '--accounts-dn' && $argc <= 3 || |
|
| 25 | + !is_readable($file = $argv[$argc - 1])) |
|
| 26 | 26 | { |
| 27 | 27 | if ($file) |
| 28 | 28 | { |
@@ -32,7 +32,7 @@ discard block |
||
| 32 | 32 | } |
| 33 | 33 | |
| 34 | 34 | $lines = file($file); |
| 35 | -foreach($lines as $l => $line) |
|
| 35 | +foreach ($lines as $l => $line) |
|
| 36 | 36 | { |
| 37 | 37 | $lines[$l] = rtrim($line); |
| 38 | 38 | } |
@@ -42,23 +42,23 @@ discard block |
||
| 42 | 42 | { |
| 43 | 43 | $group2account = $argv[2]; |
| 44 | 44 | } |
| 45 | -$parts = explode('/',$group2account); |
|
| 45 | +$parts = explode('/', $group2account); |
|
| 46 | 46 | if (count($parts) != 4) |
| 47 | 47 | { |
| 48 | 48 | die("Wrong format for --group2accounts-dn, use something like '/cn=[^,]+,ou=groups/ou=accounts/'\n"); |
| 49 | 49 | } |
| 50 | 50 | $replace_with = $parts[2]; unset($parts[2]); |
| 51 | -$replace = implode('/',$parts); |
|
| 51 | +$replace = implode('/', $parts); |
|
| 52 | 52 | |
| 53 | 53 | $block = array(); |
| 54 | 54 | $i = 0; |
| 55 | -$lines[] = ''; // extra empty line, if none is behind the last block |
|
| 56 | -foreach($lines as $l => $line) |
|
| 55 | +$lines[] = ''; // extra empty line, if none is behind the last block |
|
| 56 | +foreach ($lines as $l => $line) |
|
| 57 | 57 | { |
| 58 | 58 | if ($line) |
| 59 | 59 | { |
| 60 | - @list($attr,$value) = explode(': ',$line,2); |
|
| 61 | - switch($attr) |
|
| 60 | + @list($attr, $value) = explode(': ', $line, 2); |
|
| 61 | + switch ($attr) |
|
| 62 | 62 | { |
| 63 | 63 | case 'dn': |
| 64 | 64 | $dn = $value; |
@@ -70,8 +70,8 @@ discard block |
||
| 70 | 70 | $structural = $value; |
| 71 | 71 | break; |
| 72 | 72 | case 'memberUid': |
| 73 | - $member_dn = 'uid='.$value.','.preg_replace($replace,$replace_with,$dn); |
|
| 74 | - if (!in_array('dn: '.$member_dn,$lines)) continue; // member does not exist --> ignore him! |
|
| 73 | + $member_dn = 'uid='.$value.','.preg_replace($replace, $replace_with, $dn); |
|
| 74 | + if (!in_array('dn: '.$member_dn, $lines)) continue; // member does not exist --> ignore him! |
|
| 75 | 75 | $members[] = 'member: '.$member_dn; |
| 76 | 76 | // fall-through |
| 77 | 77 | default: |
@@ -84,17 +84,17 @@ discard block |
||
| 84 | 84 | if (!$block) continue; |
| 85 | 85 | |
| 86 | 86 | // got a complete block |
| 87 | - if (in_array('posixGroup',$objectclasses)) |
|
| 87 | + if (in_array('posixGroup', $objectclasses)) |
|
| 88 | 88 | { |
| 89 | - switch($structural) |
|
| 89 | + switch ($structural) |
|
| 90 | 90 | { |
| 91 | 91 | case 'namedObject': // regular SuSE |
| 92 | - unset($objectclasses[array_search('namedObject',$objectclasses)]); |
|
| 92 | + unset($objectclasses[array_search('namedObject', $objectclasses)]); |
|
| 93 | 93 | // fall-through |
| 94 | 94 | case 'posixGroup': // nis |
| 95 | 95 | $objectclasses[] = $structural = 'groupOfNames'; |
| 96 | - if (!$members) $members[] = 'member: '.$dn; // member is a required attribute! |
|
| 97 | - $data = array_merge($members,$data); |
|
| 96 | + if (!$members) $members[] = 'member: '.$dn; // member is a required attribute! |
|
| 97 | + $data = array_merge($members, $data); |
|
| 98 | 98 | break; |
| 99 | 99 | case 'groupOfNames': // ok, already what we want |
| 100 | 100 | break; |
@@ -102,14 +102,14 @@ discard block |
||
| 102 | 102 | die("\nposixGroup dn: $dn has as structrualObjectClass $structural, not posixGroup, namedObject or groupOfNames!\n"); |
| 103 | 103 | } |
| 104 | 104 | $block = array('dn: '.$dn,); |
| 105 | - foreach($objectclasses as $class) |
|
| 105 | + foreach ($objectclasses as $class) |
|
| 106 | 106 | { |
| 107 | 107 | $block[] = 'objectClass: '.$class; |
| 108 | 108 | } |
| 109 | 109 | $block[] = 'structuralObjectClass: '.$class; |
| 110 | - $block = array_merge($block,$data); |
|
| 110 | + $block = array_merge($block, $data); |
|
| 111 | 111 | } |
| 112 | - echo implode("\n",$block)."\n\n"; |
|
| 112 | + echo implode("\n", $block)."\n\n"; |
|
| 113 | 113 | |
| 114 | 114 | // process next block |
| 115 | 115 | $block = $objectclasses = $members = $data = array(); |
@@ -17,7 +17,7 @@ discard block |
||
| 17 | 17 | |
| 18 | 18 | // raw replacements |
| 19 | 19 | $add_use_api = array( |
| 20 | - "#use EGroupware\\\\Api;\n#" => '', // remove evtl. use EGroupware\Api, as we add it again below |
|
| 20 | + "#use EGroupware\\\\Api;\n#" => '', // remove evtl. use EGroupware\Api, as we add it again below |
|
| 21 | 21 | "#<\?php\n+\s*/\*+?(.*)\*/#msU" => "<?php\n/**$1*/\n\nuse EGroupware\\Api;", |
| 22 | 22 | ); |
| 23 | 23 | $replace = array( |
@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | // enclose class-names and static methods with some syntax check |
| 47 | 47 | $class_start = '#(?<!function)([\[\s,;().!=])'; |
| 48 | 48 | $class_end = '(::|\\(|\\)|;|\?|:|\\s|,|$)#'; |
| 49 | -foreach(array( |
|
| 49 | +foreach (array( |
|
| 50 | 50 | 'accounts' => 'Api\\Accounts', |
| 51 | 51 | 'acl' => 'Api\\Acl', |
| 52 | 52 | 'EGW_ACL_READ' => 'Api\\Acl::READ', |
@@ -189,10 +189,10 @@ discard block |
||
| 189 | 189 | * @param boolean $dry_run =false true: only echo fixed file, not fix it |
| 190 | 190 | * @return boolean false on error |
| 191 | 191 | */ |
| 192 | -function fix_api($file, $dry_run=false) |
|
| 192 | +function fix_api($file, $dry_run = false) |
|
| 193 | 193 | { |
| 194 | 194 | global $prog, $replace, $add_use_api; |
| 195 | - if (basename($file) == $prog) return true; // dont fix ourself ;-) |
|
| 195 | + if (basename($file) == $prog) return true; // dont fix ourself ;-) |
|
| 196 | 196 | |
| 197 | 197 | if (($content = $content_in = file_get_contents($file)) === false) return false; |
| 198 | 198 | |
@@ -203,12 +203,12 @@ discard block |
||
| 203 | 203 | } |
| 204 | 204 | $content2 = preg_replace(array_keys($replace), array_values($replace), $content); |
| 205 | 205 | |
| 206 | - if ($content2 == $content_in) return true; // nothing changed |
|
| 206 | + if ($content2 == $content_in) return true; // nothing changed |
|
| 207 | 207 | |
| 208 | 208 | $content = preg_replace(array_keys($add_use_api), array_values($add_use_api), $content2); |
| 209 | 209 | |
| 210 | 210 | // shorten some classes, if used, with further use declarations |
| 211 | - foreach(array('Api\\Etemplate', 'Api\\Vfs', 'Api\\Acl', 'Api\\Egw', 'Api\\Framework', 'Api\\Link') as $namespace) |
|
| 211 | + foreach (array('Api\\Etemplate', 'Api\\Vfs', 'Api\\Acl', 'Api\\Egw', 'Api\\Framework', 'Api\\Link') as $namespace) |
|
| 212 | 212 | { |
| 213 | 213 | if (strpos($content, $namespace) !== false && strpos($content, 'use EGroupware\\'.$namespace) === false) |
| 214 | 214 | { |
@@ -247,11 +247,11 @@ discard block |
||
| 247 | 247 | * @param boolean $dry_run =false true: only echo fixed file, not fix it |
| 248 | 248 | * @return boolean false on error |
| 249 | 249 | */ |
| 250 | -function fix_api_recursive($dir, $dry_run=false) |
|
| 250 | +function fix_api_recursive($dir, $dry_run = false) |
|
| 251 | 251 | { |
| 252 | 252 | if (!is_dir($dir)) return false; |
| 253 | 253 | |
| 254 | - foreach(scandir($dir) as $file) |
|
| 254 | + foreach (scandir($dir) as $file) |
|
| 255 | 255 | { |
| 256 | 256 | if ($file == '.' || $file == '..') continue; |
| 257 | 257 | |
@@ -259,13 +259,13 @@ discard block |
||
| 259 | 259 | { |
| 260 | 260 | fix_api_recursive($dir.'/'.$file, $dry_run); |
| 261 | 261 | } |
| 262 | - elseif(substr($file,-4) == '.php') |
|
| 262 | + elseif (substr($file, -4) == '.php') |
|
| 263 | 263 | { |
| 264 | - echo "\r".str_repeat(' ',100)."\r".$dir.'/'.$file.': '; |
|
| 264 | + echo "\r".str_repeat(' ', 100)."\r".$dir.'/'.$file.': '; |
|
| 265 | 265 | fix_api($dir.'/'.$file, $dry_run); |
| 266 | 266 | } |
| 267 | 267 | } |
| 268 | - echo "\r".str_repeat(' ',100)."\r"; |
|
| 268 | + echo "\r".str_repeat(' ', 100)."\r"; |
|
| 269 | 269 | return true; |
| 270 | 270 | } |
| 271 | 271 | |
@@ -274,7 +274,7 @@ discard block |
||
| 274 | 274 | * |
| 275 | 275 | * @param string $error =null |
| 276 | 276 | */ |
| 277 | -function usage($error=null) |
|
| 277 | +function usage($error = null) |
|
| 278 | 278 | { |
| 279 | 279 | global $prog; |
| 280 | 280 | echo "Usage: $prog [-h|--help] [-d|--dry-run] file(s) or dir(s)\n\n"; |
@@ -288,9 +288,9 @@ discard block |
||
| 288 | 288 | if (!$args) usage(); |
| 289 | 289 | |
| 290 | 290 | $dry_run = false; |
| 291 | -while(($arg = array_shift($args)) && $arg[0] == '-') |
|
| 291 | +while (($arg = array_shift($args)) && $arg[0] == '-') |
|
| 292 | 292 | { |
| 293 | - switch($arg) |
|
| 293 | + switch ($arg) |
|
| 294 | 294 | { |
| 295 | 295 | case '-h': |
| 296 | 296 | case '--help': |
@@ -323,4 +323,4 @@ discard block |
||
| 323 | 323 | fix_api_recursive($arg, $dry_run); |
| 324 | 324 | } |
| 325 | 325 | } |
| 326 | -while(($arg = array_shift($args))); |
|
| 326 | +while (($arg = array_shift($args))); |
|
@@ -41,13 +41,13 @@ discard block |
||
| 41 | 41 | // Previously all portlets were together in a sub-array, for defaults they |
| 42 | 42 | // need to be moved to top level |
| 43 | 43 | $preferences = array(); |
| 44 | - foreach($GLOBALS['egw_setup']->db->select('egw_preferences','preference_owner,preference_app,preference_value',array( |
|
| 44 | + foreach ($GLOBALS['egw_setup']->db->select('egw_preferences', 'preference_owner,preference_app,preference_value', array( |
|
| 45 | 45 | 'preference_app' => 'home', |
| 46 | - ),__LINE__,__FILE__) as $row) |
|
| 46 | + ), __LINE__, __FILE__) as $row) |
|
| 47 | 47 | { |
| 48 | 48 | $preferences[] = $row; |
| 49 | 49 | } |
| 50 | - foreach($preferences as $row) |
|
| 50 | + foreach ($preferences as $row) |
|
| 51 | 51 | { |
| 52 | 52 | // The following replacement is required for PostgreSQL to work |
| 53 | 53 | $app = trim($row['preference_app']); |
@@ -62,21 +62,21 @@ discard block |
||
| 62 | 62 | // Too old, skip it |
| 63 | 63 | continue; |
| 64 | 64 | } |
| 65 | - if($values['portlets'] && is_array($values['portlets'])) |
|
| 65 | + if ($values['portlets'] && is_array($values['portlets'])) |
|
| 66 | 66 | { |
| 67 | - foreach($values['portlets'] as $id => $settings) |
|
| 67 | + foreach ($values['portlets'] as $id => $settings) |
|
| 68 | 68 | { |
| 69 | 69 | $values["portlet_$id"] = $settings; |
| 70 | 70 | } |
| 71 | 71 | unset($values['portlets']); |
| 72 | 72 | } |
| 73 | 73 | $GLOBALS['egw_setup']->db->insert( |
| 74 | - 'egw_preferences',array( |
|
| 74 | + 'egw_preferences', array( |
|
| 75 | 75 | 'preference_value' => json_encode($values), |
| 76 | - ),array( |
|
| 76 | + ), array( |
|
| 77 | 77 | 'preference_owner' => $row['preference_owner'], |
| 78 | 78 | 'preference_app' => $app, |
| 79 | - ),__LINE__,__FILE__ |
|
| 79 | + ), __LINE__, __FILE__ |
|
| 80 | 80 | ); |
| 81 | 81 | } |
| 82 | 82 | |
@@ -91,7 +91,7 @@ discard block |
||
| 91 | 91 | function home_upgrade14_1_001() |
| 92 | 92 | { |
| 93 | 93 | // rename "home-accounts" to "api-accounts" |
| 94 | - foreach(array('link_app1', 'link_app2') as $col) |
|
| 94 | + foreach (array('link_app1', 'link_app2') as $col) |
|
| 95 | 95 | { |
| 96 | 96 | $GLOBALS['egw_setup']->db->update('egw_links', array( |
| 97 | 97 | $col => 'api-accounts', |
@@ -19,7 +19,7 @@ |
||
| 19 | 19 | ); |
| 20 | 20 | |
| 21 | 21 | include('../header.inc.php'); |
| 22 | -$GLOBALS['egw_info']['flags']['nonavbar']=false; |
|
| 22 | +$GLOBALS['egw_info']['flags']['nonavbar'] = false; |
|
| 23 | 23 | |
| 24 | 24 | // Home is treated specially, so a redirect won't work. |
| 25 | 25 | $home = new home_ui(); |
@@ -15,96 +15,96 @@ discard block |
||
| 15 | 15 | $phpgw_baseline = array( |
| 16 | 16 | 'egw_emailadmin' => array( |
| 17 | 17 | 'fd' => array( |
| 18 | - 'ea_profile_id' => array('type' => 'auto','nullable' => False,'comment' => 'the id of the profile; in programm its used as its negative counterpart'), |
|
| 19 | - 'ea_smtp_server' => array('type' => 'varchar','precision' => '80','comment' => 'smtp server name or ip-address'), |
|
| 20 | - 'ea_smtp_type' => array('type' => 'varchar','precision' => '56','comment' => 'smtp server type; designed to specify the corresponding php class to be used/loaded'), |
|
| 21 | - 'ea_smtp_port' => array('type' => 'int','precision' => '4','comment' => 'port to be used'), |
|
| 22 | - 'ea_smtp_auth' => array('type' => 'varchar','precision' => '3','comment' => 'multistate flag to indicate authentication required'), |
|
| 23 | - 'ea_editforwardingaddress' => array('type' => 'varchar','precision' => '3','comment' => 'yes/no flag to indicate if a user is allowed to edit its own forwardingaddresses; server side restrictions must be met, and a suitable smtp server type selected'), |
|
| 24 | - 'ea_smtp_ldap_server' => array('type' => 'varchar','precision' => '80','comment' => 'unused'), |
|
| 25 | - 'ea_smtp_ldap_basedn' => array('type' => 'varchar','precision' => '200','comment' => 'unused'), |
|
| 26 | - 'ea_smtp_ldap_admindn' => array('type' => 'varchar','precision' => '200','comment' => 'unused'), |
|
| 27 | - 'ea_smtp_ldap_adminpw' => array('type' => 'varchar','precision' => '30','comment' => 'unused'), |
|
| 28 | - 'ea_smtp_ldap_use_default' => array('type' => 'varchar','precision' => '3','comment' => 'unused'), |
|
| 29 | - 'ea_imap_server' => array('type' => 'varchar','precision' => '80','comment' => 'imap server name or ip address'), |
|
| 30 | - 'ea_imap_type' => array('type' => 'varchar','precision' => '56','comment' => 'imap server type, designed to specify the corresponding mail class to be loaded/used'), |
|
| 31 | - 'ea_imap_port' => array('type' => 'int','precision' => '4','comment' => 'imap server port'), |
|
| 32 | - 'ea_imap_login_type' => array('type' => 'varchar','precision' => '20','comment' => 'logintype to be used for authentication vs. the imap server, for this profile'), |
|
| 33 | - 'ea_imap_tsl_auth' => array('type' => 'varchar','precision' => '3','comment' => 'flag to indicate wether to use certificate validation; only affects secure connections'), |
|
| 34 | - 'ea_imap_tsl_encryption' => array('type' => 'varchar','precision' => '3','comment' => 'wether to use encryption 0=none, 1=STARTTLS, 2=TLS, 3=SSL'), |
|
| 35 | - 'ea_imap_enable_cyrus' => array('type' => 'varchar','precision' => '3','comment' => 'flag to indicate if we have some server/system integration for account/email management'), |
|
| 36 | - 'ea_imap_admin_user' => array('type' => 'varchar','precision' => '40','comment' => 'use this username for authentication on administrative purposes; or timed actions (sieve) for a user'), |
|
| 37 | - 'ea_imap_admin_pw' => array('type' => 'varchar','precision' => '40','comment' => 'use this password for authentication on administrative purposes; or timed actions (sieve) for a user'), |
|
| 38 | - 'ea_imap_enable_sieve' => array('type' => 'varchar','precision' => '3','comment' => 'flag to indicate that sieve support is assumed, and may be allowed to be utilized by the users affected by this profile'), |
|
| 39 | - 'ea_imap_sieve_server' => array('type' => 'varchar','precision' => '80','comment' => 'sieve server name or ip-address'), |
|
| 40 | - 'ea_imap_sieve_port' => array('type' => 'int','precision' => '4','comment' => 'sieve server port'), |
|
| 41 | - 'ea_description' => array('type' => 'varchar','precision' => '200','comment' => 'textual descriptor used for readable distinction of profiles'), |
|
| 42 | - 'ea_default_domain' => array('type' => 'varchar','precision' => '100','comment' => 'default domain string, used when vmailmanager is used as auth type for imap (also for smtp if auth is required)'), |
|
| 43 | - 'ea_organisation_name' => array('type' => 'varchar','precision' => '100','comment' => 'textual organization string, may be used in mail header'), |
|
| 44 | - 'ea_user_defined_identities' => array('type' => 'varchar','precision' => '3','comment' => 'yes/no flag to indicate if this profile is allowing the utiliszation of user defined identities'), |
|
| 45 | - 'ea_user_defined_accounts' => array('type' => 'varchar','precision' => '3','comment' => 'yes/no flag to indicate if this profile is allowing the utilization of user defined mail accounts'), |
|
| 46 | - 'ea_order' => array('type' => 'int','precision' => '4','comment' => 'helper to define the order of the profiles'), |
|
| 47 | - 'ea_appname' => array('type' => 'varchar','precision' => '80','comment' => 'appname the profile is to be used for; of no practical use, as of my knowledge, was designed to allow notification to use a specific profile'), |
|
| 48 | - 'ea_group' => array('type' => 'varchar','precision' => '80','comment' => 'the usergroup (primary) the given profile should be applied to','meta' => 'group'), |
|
| 49 | - 'ea_user' => array('type' => 'varchar','precision' => '80','comment' => 'the user the given profile should be applied to','meta' => 'user'), |
|
| 50 | - 'ea_active' => array('type' => 'int','precision' => '4','comment' => 'flag to indicate that a profile is active'), |
|
| 51 | - 'ea_smtp_auth_username' => array('type' => 'varchar','precision' => '128','comment' => 'depending on smtp auth type, use this username for authentication; may hold a semicolon separated emailaddress, to specify the emailaddress to be used on sending e.g.:username;[email protected]'), |
|
| 52 | - 'ea_smtp_auth_password' => array('type' => 'varchar','precision' => '80','comment' => 'depending on smtp auth type, the password to be used for authentication'), |
|
| 53 | - 'ea_user_defined_signatures' => array('type' => 'varchar','precision' => '3','comment' => 'flag to indicate, that this profile allows its users to edit and use own signatures (rights to preferences-app needed)'), |
|
| 54 | - 'ea_default_signature' => array('type' => 'text','comment' => 'the default signature (text or html)'), |
|
| 55 | - 'ea_imap_auth_username' => array('type' => 'varchar','precision' => '80','comment' => 'depending on the imap auth type use this username for authentication purposes'), |
|
| 56 | - 'ea_imap_auth_password' => array('type' => 'varchar','precision' => '80','comment' => 'depending on the imap auth type use this password for authentication purposes'), |
|
| 57 | - 'ea_stationery_active_templates' => array('type' => 'text','comment' => 'stationery templates available for the profile') |
|
| 18 | + 'ea_profile_id' => array('type' => 'auto', 'nullable' => False, 'comment' => 'the id of the profile; in programm its used as its negative counterpart'), |
|
| 19 | + 'ea_smtp_server' => array('type' => 'varchar', 'precision' => '80', 'comment' => 'smtp server name or ip-address'), |
|
| 20 | + 'ea_smtp_type' => array('type' => 'varchar', 'precision' => '56', 'comment' => 'smtp server type; designed to specify the corresponding php class to be used/loaded'), |
|
| 21 | + 'ea_smtp_port' => array('type' => 'int', 'precision' => '4', 'comment' => 'port to be used'), |
|
| 22 | + 'ea_smtp_auth' => array('type' => 'varchar', 'precision' => '3', 'comment' => 'multistate flag to indicate authentication required'), |
|
| 23 | + 'ea_editforwardingaddress' => array('type' => 'varchar', 'precision' => '3', 'comment' => 'yes/no flag to indicate if a user is allowed to edit its own forwardingaddresses; server side restrictions must be met, and a suitable smtp server type selected'), |
|
| 24 | + 'ea_smtp_ldap_server' => array('type' => 'varchar', 'precision' => '80', 'comment' => 'unused'), |
|
| 25 | + 'ea_smtp_ldap_basedn' => array('type' => 'varchar', 'precision' => '200', 'comment' => 'unused'), |
|
| 26 | + 'ea_smtp_ldap_admindn' => array('type' => 'varchar', 'precision' => '200', 'comment' => 'unused'), |
|
| 27 | + 'ea_smtp_ldap_adminpw' => array('type' => 'varchar', 'precision' => '30', 'comment' => 'unused'), |
|
| 28 | + 'ea_smtp_ldap_use_default' => array('type' => 'varchar', 'precision' => '3', 'comment' => 'unused'), |
|
| 29 | + 'ea_imap_server' => array('type' => 'varchar', 'precision' => '80', 'comment' => 'imap server name or ip address'), |
|
| 30 | + 'ea_imap_type' => array('type' => 'varchar', 'precision' => '56', 'comment' => 'imap server type, designed to specify the corresponding mail class to be loaded/used'), |
|
| 31 | + 'ea_imap_port' => array('type' => 'int', 'precision' => '4', 'comment' => 'imap server port'), |
|
| 32 | + 'ea_imap_login_type' => array('type' => 'varchar', 'precision' => '20', 'comment' => 'logintype to be used for authentication vs. the imap server, for this profile'), |
|
| 33 | + 'ea_imap_tsl_auth' => array('type' => 'varchar', 'precision' => '3', 'comment' => 'flag to indicate wether to use certificate validation; only affects secure connections'), |
|
| 34 | + 'ea_imap_tsl_encryption' => array('type' => 'varchar', 'precision' => '3', 'comment' => 'wether to use encryption 0=none, 1=STARTTLS, 2=TLS, 3=SSL'), |
|
| 35 | + 'ea_imap_enable_cyrus' => array('type' => 'varchar', 'precision' => '3', 'comment' => 'flag to indicate if we have some server/system integration for account/email management'), |
|
| 36 | + 'ea_imap_admin_user' => array('type' => 'varchar', 'precision' => '40', 'comment' => 'use this username for authentication on administrative purposes; or timed actions (sieve) for a user'), |
|
| 37 | + 'ea_imap_admin_pw' => array('type' => 'varchar', 'precision' => '40', 'comment' => 'use this password for authentication on administrative purposes; or timed actions (sieve) for a user'), |
|
| 38 | + 'ea_imap_enable_sieve' => array('type' => 'varchar', 'precision' => '3', 'comment' => 'flag to indicate that sieve support is assumed, and may be allowed to be utilized by the users affected by this profile'), |
|
| 39 | + 'ea_imap_sieve_server' => array('type' => 'varchar', 'precision' => '80', 'comment' => 'sieve server name or ip-address'), |
|
| 40 | + 'ea_imap_sieve_port' => array('type' => 'int', 'precision' => '4', 'comment' => 'sieve server port'), |
|
| 41 | + 'ea_description' => array('type' => 'varchar', 'precision' => '200', 'comment' => 'textual descriptor used for readable distinction of profiles'), |
|
| 42 | + 'ea_default_domain' => array('type' => 'varchar', 'precision' => '100', 'comment' => 'default domain string, used when vmailmanager is used as auth type for imap (also for smtp if auth is required)'), |
|
| 43 | + 'ea_organisation_name' => array('type' => 'varchar', 'precision' => '100', 'comment' => 'textual organization string, may be used in mail header'), |
|
| 44 | + 'ea_user_defined_identities' => array('type' => 'varchar', 'precision' => '3', 'comment' => 'yes/no flag to indicate if this profile is allowing the utiliszation of user defined identities'), |
|
| 45 | + 'ea_user_defined_accounts' => array('type' => 'varchar', 'precision' => '3', 'comment' => 'yes/no flag to indicate if this profile is allowing the utilization of user defined mail accounts'), |
|
| 46 | + 'ea_order' => array('type' => 'int', 'precision' => '4', 'comment' => 'helper to define the order of the profiles'), |
|
| 47 | + 'ea_appname' => array('type' => 'varchar', 'precision' => '80', 'comment' => 'appname the profile is to be used for; of no practical use, as of my knowledge, was designed to allow notification to use a specific profile'), |
|
| 48 | + 'ea_group' => array('type' => 'varchar', 'precision' => '80', 'comment' => 'the usergroup (primary) the given profile should be applied to', 'meta' => 'group'), |
|
| 49 | + 'ea_user' => array('type' => 'varchar', 'precision' => '80', 'comment' => 'the user the given profile should be applied to', 'meta' => 'user'), |
|
| 50 | + 'ea_active' => array('type' => 'int', 'precision' => '4', 'comment' => 'flag to indicate that a profile is active'), |
|
| 51 | + 'ea_smtp_auth_username' => array('type' => 'varchar', 'precision' => '128', 'comment' => 'depending on smtp auth type, use this username for authentication; may hold a semicolon separated emailaddress, to specify the emailaddress to be used on sending e.g.:username;[email protected]'), |
|
| 52 | + 'ea_smtp_auth_password' => array('type' => 'varchar', 'precision' => '80', 'comment' => 'depending on smtp auth type, the password to be used for authentication'), |
|
| 53 | + 'ea_user_defined_signatures' => array('type' => 'varchar', 'precision' => '3', 'comment' => 'flag to indicate, that this profile allows its users to edit and use own signatures (rights to preferences-app needed)'), |
|
| 54 | + 'ea_default_signature' => array('type' => 'text', 'comment' => 'the default signature (text or html)'), |
|
| 55 | + 'ea_imap_auth_username' => array('type' => 'varchar', 'precision' => '80', 'comment' => 'depending on the imap auth type use this username for authentication purposes'), |
|
| 56 | + 'ea_imap_auth_password' => array('type' => 'varchar', 'precision' => '80', 'comment' => 'depending on the imap auth type use this password for authentication purposes'), |
|
| 57 | + 'ea_stationery_active_templates' => array('type' => 'text', 'comment' => 'stationery templates available for the profile') |
|
| 58 | 58 | ), |
| 59 | 59 | 'pk' => array('ea_profile_id'), |
| 60 | 60 | 'fk' => array(), |
| 61 | - 'ix' => array('ea_appname','ea_group'), |
|
| 61 | + 'ix' => array('ea_appname', 'ea_group'), |
|
| 62 | 62 | 'uc' => array() |
| 63 | 63 | ), |
| 64 | 64 | 'egw_mailaccounts' => array( |
| 65 | 65 | 'fd' => array( |
| 66 | - 'mail_id' => array('type' => 'auto','nullable' => False,'comment' => 'the id'), |
|
| 67 | - 'account_id' => array('type' => 'int','meta' => 'account','precision' => '4','nullable' => False,'comment' => 'account id of the owner, can be user AND group'), |
|
| 68 | - 'mail_type' => array('type' => 'int','precision' => '1','nullable' => False,'comment' => '0=active, 1=alias, 2=forward, 3=forwardOnly, 4=quota'), |
|
| 69 | - 'mail_value' => array('type' => 'ascii','precision' => '128','nullable' => False,'comment' => 'the value (that should be) corresponding to the mail_type') |
|
| 66 | + 'mail_id' => array('type' => 'auto', 'nullable' => False, 'comment' => 'the id'), |
|
| 67 | + 'account_id' => array('type' => 'int', 'meta' => 'account', 'precision' => '4', 'nullable' => False, 'comment' => 'account id of the owner, can be user AND group'), |
|
| 68 | + 'mail_type' => array('type' => 'int', 'precision' => '1', 'nullable' => False, 'comment' => '0=active, 1=alias, 2=forward, 3=forwardOnly, 4=quota'), |
|
| 69 | + 'mail_value' => array('type' => 'ascii', 'precision' => '128', 'nullable' => False, 'comment' => 'the value (that should be) corresponding to the mail_type') |
|
| 70 | 70 | ), |
| 71 | 71 | 'pk' => array('mail_id'), |
| 72 | 72 | 'fk' => array(), |
| 73 | - 'ix' => array('mail_value',array('account_id','mail_type')), |
|
| 73 | + 'ix' => array('mail_value', array('account_id', 'mail_type')), |
|
| 74 | 74 | 'uc' => array() |
| 75 | 75 | ), |
| 76 | 76 | 'egw_ea_accounts' => array( |
| 77 | 77 | 'fd' => array( |
| 78 | - 'acc_id' => array('type' => 'auto','nullable' => False), |
|
| 79 | - 'acc_name' => array('type' => 'varchar','precision' => '80','comment' => 'description'), |
|
| 80 | - 'ident_id' => array('type' => 'int','precision' => '4','nullable' => False,'comment' => 'standard identity'), |
|
| 81 | - 'acc_imap_host' => array('type' => 'ascii','precision' => '128','nullable' => False,'comment' => 'imap hostname'), |
|
| 82 | - 'acc_imap_ssl' => array('type' => 'int','precision' => '1','nullable' => False,'default' => '0','comment' => '0=none, 1=starttls, 2=tls, 3=ssl, &8=validate certificate'), |
|
| 83 | - 'acc_imap_port' => array('type' => 'int','precision' => '4','nullable' => False,'default' => '143','comment' => 'imap port'), |
|
| 84 | - 'acc_sieve_enabled' => array('type' => 'bool','default' => '0','comment' => 'sieve enabled'), |
|
| 85 | - 'acc_sieve_host' => array('type' => 'ascii','precision' => '128','comment' => 'sieve host, default imap_host'), |
|
| 86 | - 'acc_sieve_port' => array('type' => 'int','precision' => '4','default' => '4190'), |
|
| 87 | - 'acc_folder_sent' => array('type' => 'varchar','precision' => '128','comment' => 'sent folder'), |
|
| 88 | - 'acc_folder_trash' => array('type' => 'varchar','precision' => '128','comment' => 'trash folder'), |
|
| 89 | - 'acc_folder_draft' => array('type' => 'varchar','precision' => '128','comment' => 'draft folder'), |
|
| 90 | - 'acc_folder_template' => array('type' => 'varchar','precision' => '128','comment' => 'template folder'), |
|
| 91 | - 'acc_smtp_host' => array('type' => 'varchar','precision' => '128','comment' => 'smtp hostname'), |
|
| 92 | - 'acc_smtp_ssl' => array('type' => 'int','precision' => '1','nullable' => False,'default' => '0','comment' => '0=none, 1=starttls, 2=tls, 3=ssl, &8=validate certificate'), |
|
| 93 | - 'acc_smtp_port' => array('type' => 'int','precision' => '4','nullable' => False,'default' => '25','comment' => 'smtp port'), |
|
| 94 | - 'acc_smtp_type' => array('type' => 'ascii','precision' => '32','default' => 'emailadmin_smtp','comment' => 'smtp class to use'), |
|
| 95 | - 'acc_imap_type' => array('type' => 'ascii','precision' => '32','default' => 'emailadmin_imap','comment' => 'imap class to use'), |
|
| 96 | - 'acc_imap_logintype' => array('type' => 'ascii','precision' => '20','comment' => 'standard, vmailmgr, admin, uidNumber'), |
|
| 97 | - 'acc_domain' => array('type' => 'varchar','precision' => '100','comment' => 'domain name'), |
|
| 98 | - 'acc_further_identities' => array('type' => 'bool','nullable' => False,'default' => '1','comment' => '0=no, 1=yes'), |
|
| 99 | - 'acc_user_editable' => array('type' => 'bool','nullable' => False,'default' => '1','comment' => '0=no, 1=yes'), |
|
| 100 | - 'acc_sieve_ssl' => array('type' => 'int','precision' => '1','default' => '1','comment' => '0=none, 1=starttls, 2=tls, 3=ssl, &8=validate certificate'), |
|
| 101 | - 'acc_modified' => array('type' => 'timestamp','nullable' => False,'default' => 'current_timestamp'), |
|
| 102 | - 'acc_modifier' => array('type' => 'int','meta' => 'user','precision' => '4'), |
|
| 103 | - 'acc_smtp_auth_session' => array('type' => 'bool','comment' => '0=no, 1=yes, use username/pw from current user'), |
|
| 104 | - 'acc_folder_junk' => array('type' => 'varchar','precision' => '128','comment' => 'junk folder'), |
|
| 105 | - 'acc_imap_default_quota' => array('type' => 'int','precision' => '4','comment' => 'default quota, if no user specific one set'), |
|
| 106 | - 'acc_imap_timeout' => array('type' => 'int','precision' => '2','comment' => 'timeout for imap connection'), |
|
| 107 | - 'acc_user_forward' => array('type' => 'bool','default' => '0','comment' => 'allow user to define forwards') |
|
| 78 | + 'acc_id' => array('type' => 'auto', 'nullable' => False), |
|
| 79 | + 'acc_name' => array('type' => 'varchar', 'precision' => '80', 'comment' => 'description'), |
|
| 80 | + 'ident_id' => array('type' => 'int', 'precision' => '4', 'nullable' => False, 'comment' => 'standard identity'), |
|
| 81 | + 'acc_imap_host' => array('type' => 'ascii', 'precision' => '128', 'nullable' => False, 'comment' => 'imap hostname'), |
|
| 82 | + 'acc_imap_ssl' => array('type' => 'int', 'precision' => '1', 'nullable' => False, 'default' => '0', 'comment' => '0=none, 1=starttls, 2=tls, 3=ssl, &8=validate certificate'), |
|
| 83 | + 'acc_imap_port' => array('type' => 'int', 'precision' => '4', 'nullable' => False, 'default' => '143', 'comment' => 'imap port'), |
|
| 84 | + 'acc_sieve_enabled' => array('type' => 'bool', 'default' => '0', 'comment' => 'sieve enabled'), |
|
| 85 | + 'acc_sieve_host' => array('type' => 'ascii', 'precision' => '128', 'comment' => 'sieve host, default imap_host'), |
|
| 86 | + 'acc_sieve_port' => array('type' => 'int', 'precision' => '4', 'default' => '4190'), |
|
| 87 | + 'acc_folder_sent' => array('type' => 'varchar', 'precision' => '128', 'comment' => 'sent folder'), |
|
| 88 | + 'acc_folder_trash' => array('type' => 'varchar', 'precision' => '128', 'comment' => 'trash folder'), |
|
| 89 | + 'acc_folder_draft' => array('type' => 'varchar', 'precision' => '128', 'comment' => 'draft folder'), |
|
| 90 | + 'acc_folder_template' => array('type' => 'varchar', 'precision' => '128', 'comment' => 'template folder'), |
|
| 91 | + 'acc_smtp_host' => array('type' => 'varchar', 'precision' => '128', 'comment' => 'smtp hostname'), |
|
| 92 | + 'acc_smtp_ssl' => array('type' => 'int', 'precision' => '1', 'nullable' => False, 'default' => '0', 'comment' => '0=none, 1=starttls, 2=tls, 3=ssl, &8=validate certificate'), |
|
| 93 | + 'acc_smtp_port' => array('type' => 'int', 'precision' => '4', 'nullable' => False, 'default' => '25', 'comment' => 'smtp port'), |
|
| 94 | + 'acc_smtp_type' => array('type' => 'ascii', 'precision' => '32', 'default' => 'emailadmin_smtp', 'comment' => 'smtp class to use'), |
|
| 95 | + 'acc_imap_type' => array('type' => 'ascii', 'precision' => '32', 'default' => 'emailadmin_imap', 'comment' => 'imap class to use'), |
|
| 96 | + 'acc_imap_logintype' => array('type' => 'ascii', 'precision' => '20', 'comment' => 'standard, vmailmgr, admin, uidNumber'), |
|
| 97 | + 'acc_domain' => array('type' => 'varchar', 'precision' => '100', 'comment' => 'domain name'), |
|
| 98 | + 'acc_further_identities' => array('type' => 'bool', 'nullable' => False, 'default' => '1', 'comment' => '0=no, 1=yes'), |
|
| 99 | + 'acc_user_editable' => array('type' => 'bool', 'nullable' => False, 'default' => '1', 'comment' => '0=no, 1=yes'), |
|
| 100 | + 'acc_sieve_ssl' => array('type' => 'int', 'precision' => '1', 'default' => '1', 'comment' => '0=none, 1=starttls, 2=tls, 3=ssl, &8=validate certificate'), |
|
| 101 | + 'acc_modified' => array('type' => 'timestamp', 'nullable' => False, 'default' => 'current_timestamp'), |
|
| 102 | + 'acc_modifier' => array('type' => 'int', 'meta' => 'user', 'precision' => '4'), |
|
| 103 | + 'acc_smtp_auth_session' => array('type' => 'bool', 'comment' => '0=no, 1=yes, use username/pw from current user'), |
|
| 104 | + 'acc_folder_junk' => array('type' => 'varchar', 'precision' => '128', 'comment' => 'junk folder'), |
|
| 105 | + 'acc_imap_default_quota' => array('type' => 'int', 'precision' => '4', 'comment' => 'default quota, if no user specific one set'), |
|
| 106 | + 'acc_imap_timeout' => array('type' => 'int', 'precision' => '2', 'comment' => 'timeout for imap connection'), |
|
| 107 | + 'acc_user_forward' => array('type' => 'bool', 'default' => '0', 'comment' => 'allow user to define forwards') |
|
| 108 | 108 | ), |
| 109 | 109 | 'pk' => array('acc_id'), |
| 110 | 110 | 'fk' => array(), |
@@ -113,29 +113,29 @@ discard block |
||
| 113 | 113 | ), |
| 114 | 114 | 'egw_ea_credentials' => array( |
| 115 | 115 | 'fd' => array( |
| 116 | - 'cred_id' => array('type' => 'auto','nullable' => False), |
|
| 117 | - 'acc_id' => array('type' => 'int','precision' => '4','nullable' => False,'comment' => 'into egw_ea_accounts'), |
|
| 118 | - 'cred_type' => array('type' => 'int','precision' => '1','nullable' => False,'comment' => '&1=imap, &2=smtp, &4=admin'), |
|
| 119 | - 'account_id' => array('type' => 'int','meta' => 'user','precision' => '4','nullable' => False,'comment' => 'account_id or 0=all'), |
|
| 120 | - 'cred_username' => array('type' => 'varchar','precision' => '80','nullable' => False,'comment' => 'username'), |
|
| 121 | - 'cred_password' => array('type' => 'varchar','precision' => '80','comment' => 'password encrypted'), |
|
| 122 | - 'cred_pw_enc' => array('type' => 'int','precision' => '1','default' => '0','comment' => '0=not, 1=user pw, 2=system') |
|
| 116 | + 'cred_id' => array('type' => 'auto', 'nullable' => False), |
|
| 117 | + 'acc_id' => array('type' => 'int', 'precision' => '4', 'nullable' => False, 'comment' => 'into egw_ea_accounts'), |
|
| 118 | + 'cred_type' => array('type' => 'int', 'precision' => '1', 'nullable' => False, 'comment' => '&1=imap, &2=smtp, &4=admin'), |
|
| 119 | + 'account_id' => array('type' => 'int', 'meta' => 'user', 'precision' => '4', 'nullable' => False, 'comment' => 'account_id or 0=all'), |
|
| 120 | + 'cred_username' => array('type' => 'varchar', 'precision' => '80', 'nullable' => False, 'comment' => 'username'), |
|
| 121 | + 'cred_password' => array('type' => 'varchar', 'precision' => '80', 'comment' => 'password encrypted'), |
|
| 122 | + 'cred_pw_enc' => array('type' => 'int', 'precision' => '1', 'default' => '0', 'comment' => '0=not, 1=user pw, 2=system') |
|
| 123 | 123 | ), |
| 124 | 124 | 'pk' => array('cred_id'), |
| 125 | 125 | 'fk' => array(), |
| 126 | 126 | 'ix' => array(), |
| 127 | - 'uc' => array(array('acc_id','account_id','cred_type')) |
|
| 127 | + 'uc' => array(array('acc_id', 'account_id', 'cred_type')) |
|
| 128 | 128 | ), |
| 129 | 129 | 'egw_ea_identities' => array( |
| 130 | 130 | 'fd' => array( |
| 131 | - 'ident_id' => array('type' => 'auto','nullable' => False), |
|
| 132 | - 'acc_id' => array('type' => 'int','precision' => '4','nullable' => False,'comment' => 'for which account'), |
|
| 133 | - 'ident_realname' => array('type' => 'varchar','precision' => '128','nullable' => False,'comment' => 'real name'), |
|
| 134 | - 'ident_email' => array('type' => 'varchar','precision' => '128','comment' => 'email address'), |
|
| 135 | - 'ident_org' => array('type' => 'varchar','precision' => '128','comment' => 'organisation'), |
|
| 136 | - 'ident_signature' => array('type' => 'text','comment' => 'signature text'), |
|
| 137 | - 'account_id' => array('type' => 'int','meta' => 'account','precision' => '4','nullable' => False,'default' => '0','comment' => '0=all users of give mail account'), |
|
| 138 | - 'ident_name' => array('type' => 'varchar','precision' => '128','comment' => 'name of identity to display') |
|
| 131 | + 'ident_id' => array('type' => 'auto', 'nullable' => False), |
|
| 132 | + 'acc_id' => array('type' => 'int', 'precision' => '4', 'nullable' => False, 'comment' => 'for which account'), |
|
| 133 | + 'ident_realname' => array('type' => 'varchar', 'precision' => '128', 'nullable' => False, 'comment' => 'real name'), |
|
| 134 | + 'ident_email' => array('type' => 'varchar', 'precision' => '128', 'comment' => 'email address'), |
|
| 135 | + 'ident_org' => array('type' => 'varchar', 'precision' => '128', 'comment' => 'organisation'), |
|
| 136 | + 'ident_signature' => array('type' => 'text', 'comment' => 'signature text'), |
|
| 137 | + 'account_id' => array('type' => 'int', 'meta' => 'account', 'precision' => '4', 'nullable' => False, 'default' => '0', 'comment' => '0=all users of give mail account'), |
|
| 138 | + 'ident_name' => array('type' => 'varchar', 'precision' => '128', 'comment' => 'name of identity to display') |
|
| 139 | 139 | ), |
| 140 | 140 | 'pk' => array('ident_id'), |
| 141 | 141 | 'fk' => array(), |
@@ -144,24 +144,24 @@ discard block |
||
| 144 | 144 | ), |
| 145 | 145 | 'egw_ea_valid' => array( |
| 146 | 146 | 'fd' => array( |
| 147 | - 'acc_id' => array('type' => 'int','precision' => '4','nullable' => False), |
|
| 148 | - 'account_id' => array('type' => 'int','meta' => 'account','precision' => '4','nullable' => False) |
|
| 147 | + 'acc_id' => array('type' => 'int', 'precision' => '4', 'nullable' => False), |
|
| 148 | + 'account_id' => array('type' => 'int', 'meta' => 'account', 'precision' => '4', 'nullable' => False) |
|
| 149 | 149 | ), |
| 150 | 150 | 'pk' => array(), |
| 151 | 151 | 'fk' => array(), |
| 152 | - 'ix' => array(array('account_id','acc_id')), |
|
| 153 | - 'uc' => array(array('acc_id','account_id')) |
|
| 152 | + 'ix' => array(array('account_id', 'acc_id')), |
|
| 153 | + 'uc' => array(array('acc_id', 'account_id')) |
|
| 154 | 154 | ), |
| 155 | 155 | 'egw_ea_notifications' => array( |
| 156 | 156 | 'fd' => array( |
| 157 | - 'notif_id' => array('type' => 'auto','nullable' => False), |
|
| 158 | - 'acc_id' => array('type' => 'int','precision' => '4','nullable' => False,'comment' => 'mail account'), |
|
| 159 | - 'account_id' => array('type' => 'int','meta' => 'user','precision' => '4','nullable' => False,'comment' => 'user account'), |
|
| 160 | - 'notif_folder' => array('type' => 'varchar','precision' => '255','nullable' => False,'comment' => 'folder name') |
|
| 157 | + 'notif_id' => array('type' => 'auto', 'nullable' => False), |
|
| 158 | + 'acc_id' => array('type' => 'int', 'precision' => '4', 'nullable' => False, 'comment' => 'mail account'), |
|
| 159 | + 'account_id' => array('type' => 'int', 'meta' => 'user', 'precision' => '4', 'nullable' => False, 'comment' => 'user account'), |
|
| 160 | + 'notif_folder' => array('type' => 'varchar', 'precision' => '255', 'nullable' => False, 'comment' => 'folder name') |
|
| 161 | 161 | ), |
| 162 | 162 | 'pk' => array('notif_id'), |
| 163 | 163 | 'fk' => array(), |
| 164 | - 'ix' => array(array('account_id','acc_id')), |
|
| 164 | + 'ix' => array(array('account_id', 'acc_id')), |
|
| 165 | 165 | 'uc' => array() |
| 166 | 166 | ) |
| 167 | 167 | ); |
@@ -14,7 +14,7 @@ discard block |
||
| 14 | 14 | |
| 15 | 15 | function emailadmin_upgrade0_0_3() |
| 16 | 16 | { |
| 17 | - $GLOBALS['egw_setup']->oProc->AddColumn('phpgw_emailadmin','smtpType', array('type' => 'int', 'precision' => 4)); |
|
| 17 | + $GLOBALS['egw_setup']->oProc->AddColumn('phpgw_emailadmin', 'smtpType', array('type' => 'int', 'precision' => 4)); |
|
| 18 | 18 | |
| 19 | 19 | return $setup_info['emailadmin']['currentver'] = '0.0.4'; |
| 20 | 20 | } |
@@ -22,7 +22,7 @@ discard block |
||
| 22 | 22 | |
| 23 | 23 | function emailadmin_upgrade0_0_4() |
| 24 | 24 | { |
| 25 | - $GLOBALS['egw_setup']->oProc->AddColumn('phpgw_emailadmin','defaultDomain', array('type' => 'varchar', 'precision' => 100)); |
|
| 25 | + $GLOBALS['egw_setup']->oProc->AddColumn('phpgw_emailadmin', 'defaultDomain', array('type' => 'varchar', 'precision' => 100)); |
|
| 26 | 26 | |
| 27 | 27 | return $setup_info['emailadmin']['currentver'] = '0.0.5'; |
| 28 | 28 | } |
@@ -30,8 +30,8 @@ discard block |
||
| 30 | 30 | |
| 31 | 31 | function emailadmin_upgrade0_0_5() |
| 32 | 32 | { |
| 33 | - $GLOBALS['egw_setup']->oProc->AddColumn('phpgw_emailadmin','organisationName', array('type' => 'varchar', 'precision' => 100)); |
|
| 34 | - $GLOBALS['egw_setup']->oProc->AddColumn('phpgw_emailadmin','userDefinedAccounts', array('type' => 'varchar', 'precision' => 3)); |
|
| 33 | + $GLOBALS['egw_setup']->oProc->AddColumn('phpgw_emailadmin', 'organisationName', array('type' => 'varchar', 'precision' => 100)); |
|
| 34 | + $GLOBALS['egw_setup']->oProc->AddColumn('phpgw_emailadmin', 'userDefinedAccounts', array('type' => 'varchar', 'precision' => 3)); |
|
| 35 | 35 | |
| 36 | 36 | return $setup_info['emailadmin']['currentver'] = '0.0.6'; |
| 37 | 37 | } |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | |
| 40 | 40 | function emailadmin_upgrade0_0_6() |
| 41 | 41 | { |
| 42 | - $GLOBALS['egw_setup']->oProc->AddColumn('phpgw_emailadmin','oldimapcclient',array( |
|
| 42 | + $GLOBALS['egw_setup']->oProc->AddColumn('phpgw_emailadmin', 'oldimapcclient', array( |
|
| 43 | 43 | 'type' => 'varchar', |
| 44 | 44 | 'precision' => '3' |
| 45 | 45 | )); |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | |
| 51 | 51 | function emailadmin_upgrade0_0_007() |
| 52 | 52 | { |
| 53 | - $GLOBALS['egw_setup']->oProc->RenameColumn('phpgw_emailadmin','oldimapcclient','imapoldcclient'); |
|
| 53 | + $GLOBALS['egw_setup']->oProc->RenameColumn('phpgw_emailadmin', 'oldimapcclient', 'imapoldcclient'); |
|
| 54 | 54 | |
| 55 | 55 | return $GLOBALS['setup_info']['emailadmin']['currentver'] = '0.0.008'; |
| 56 | 56 | } |
@@ -64,7 +64,7 @@ discard block |
||
| 64 | 64 | |
| 65 | 65 | function emailadmin_upgrade1_0_0() |
| 66 | 66 | { |
| 67 | - $GLOBALS['egw_setup']->oProc->AddColumn('phpgw_emailadmin','editforwardingaddress',array( |
|
| 67 | + $GLOBALS['egw_setup']->oProc->AddColumn('phpgw_emailadmin', 'editforwardingaddress', array( |
|
| 68 | 68 | 'type' => 'varchar', |
| 69 | 69 | 'precision' => '3' |
| 70 | 70 | )); |
@@ -75,7 +75,7 @@ discard block |
||
| 75 | 75 | |
| 76 | 76 | function emailadmin_upgrade1_0_1() |
| 77 | 77 | { |
| 78 | - $GLOBALS['egw_setup']->oProc->AddColumn('phpgw_emailadmin','ea_order', array('type' => 'int', 'precision' => 4)); |
|
| 78 | + $GLOBALS['egw_setup']->oProc->AddColumn('phpgw_emailadmin', 'ea_order', array('type' => 'int', 'precision' => 4)); |
|
| 79 | 79 | |
| 80 | 80 | return $GLOBALS['setup_info']['emailadmin']['currentver'] = '1.0.2'; |
| 81 | 81 | } |
@@ -83,8 +83,8 @@ discard block |
||
| 83 | 83 | |
| 84 | 84 | function emailadmin_upgrade1_0_2() |
| 85 | 85 | { |
| 86 | - $GLOBALS['egw_setup']->oProc->AddColumn('phpgw_emailadmin','ea_appname', array('type' => 'varchar','precision' => '80')); |
|
| 87 | - $GLOBALS['egw_setup']->oProc->AddColumn('phpgw_emailadmin','ea_group', array('type' => 'varchar','precision' => '80')); |
|
| 86 | + $GLOBALS['egw_setup']->oProc->AddColumn('phpgw_emailadmin', 'ea_appname', array('type' => 'varchar', 'precision' => '80')); |
|
| 87 | + $GLOBALS['egw_setup']->oProc->AddColumn('phpgw_emailadmin', 'ea_group', array('type' => 'varchar', 'precision' => '80')); |
|
| 88 | 88 | |
| 89 | 89 | return $GLOBALS['setup_info']['emailadmin']['currentver'] = '1.0.3'; |
| 90 | 90 | } |
@@ -92,7 +92,7 @@ discard block |
||
| 92 | 92 | |
| 93 | 93 | function emailadmin_upgrade1_0_3() |
| 94 | 94 | { |
| 95 | - $GLOBALS['egw_setup']->oProc->RenameTable('phpgw_emailadmin','egw_emailadmin'); |
|
| 95 | + $GLOBALS['egw_setup']->oProc->RenameTable('phpgw_emailadmin', 'egw_emailadmin'); |
|
| 96 | 96 | |
| 97 | 97 | return $GLOBALS['setup_info']['emailadmin']['currentver'] = '1.2'; |
| 98 | 98 | } |
@@ -100,34 +100,34 @@ discard block |
||
| 100 | 100 | |
| 101 | 101 | function emailadmin_upgrade1_2() |
| 102 | 102 | { |
| 103 | - $GLOBALS['egw_setup']->oProc->RenameColumn('egw_emailadmin','profileID','ea_profile_id'); |
|
| 104 | - $GLOBALS['egw_setup']->oProc->RenameColumn('egw_emailadmin','smtpServer','ea_smtp_server'); |
|
| 105 | - $GLOBALS['egw_setup']->oProc->RenameColumn('egw_emailadmin','smtpType','ea_smtp_type'); |
|
| 106 | - $GLOBALS['egw_setup']->oProc->RenameColumn('egw_emailadmin','smtpPort','ea_smtp_port'); |
|
| 107 | - $GLOBALS['egw_setup']->oProc->RenameColumn('egw_emailadmin','smtpAuth','ea_smtp_auth'); |
|
| 108 | - $GLOBALS['egw_setup']->oProc->RenameColumn('egw_emailadmin','editforwardingaddress','ea_editforwardingaddress'); |
|
| 109 | - $GLOBALS['egw_setup']->oProc->RenameColumn('egw_emailadmin','smtpLDAPServer','ea_smtp_ldap_server'); |
|
| 110 | - $GLOBALS['egw_setup']->oProc->RenameColumn('egw_emailadmin','smtpLDAPBaseDN','ea_smtp_ldap_basedn'); |
|
| 111 | - $GLOBALS['egw_setup']->oProc->RenameColumn('egw_emailadmin','smtpLDAPAdminDN','ea_smtp_ldap_admindn'); |
|
| 112 | - $GLOBALS['egw_setup']->oProc->RenameColumn('egw_emailadmin','smtpLDAPAdminPW','ea_smtp_ldap_adminpw'); |
|
| 113 | - $GLOBALS['egw_setup']->oProc->RenameColumn('egw_emailadmin','smtpLDAPUseDefault','ea_smtp_ldap_use_default'); |
|
| 114 | - $GLOBALS['egw_setup']->oProc->RenameColumn('egw_emailadmin','imapServer','ea_imap_server'); |
|
| 115 | - $GLOBALS['egw_setup']->oProc->RenameColumn('egw_emailadmin','imapType','ea_imap_type'); |
|
| 116 | - $GLOBALS['egw_setup']->oProc->RenameColumn('egw_emailadmin','imapPort','ea_imap_port'); |
|
| 117 | - $GLOBALS['egw_setup']->oProc->RenameColumn('egw_emailadmin','imapLoginType','ea_imap_login_type'); |
|
| 118 | - $GLOBALS['egw_setup']->oProc->RenameColumn('egw_emailadmin','imapTLSAuthentication','ea_imap_tsl_auth'); |
|
| 119 | - $GLOBALS['egw_setup']->oProc->RenameColumn('egw_emailadmin','imapTLSEncryption','ea_imap_tsl_encryption'); |
|
| 120 | - $GLOBALS['egw_setup']->oProc->RenameColumn('egw_emailadmin','imapEnableCyrusAdmin','ea_imap_enable_cyrus'); |
|
| 121 | - $GLOBALS['egw_setup']->oProc->RenameColumn('egw_emailadmin','imapAdminUsername','ea_imap_admin_user'); |
|
| 122 | - $GLOBALS['egw_setup']->oProc->RenameColumn('egw_emailadmin','imapAdminPW','ea_imap_admin_pw'); |
|
| 123 | - $GLOBALS['egw_setup']->oProc->RenameColumn('egw_emailadmin','imapEnableSieve','ea_imap_enable_sieve'); |
|
| 124 | - $GLOBALS['egw_setup']->oProc->RenameColumn('egw_emailadmin','imapSieveServer','ea_imap_sieve_server'); |
|
| 125 | - $GLOBALS['egw_setup']->oProc->RenameColumn('egw_emailadmin','imapSievePort','ea_imap_sieve_port'); |
|
| 126 | - $GLOBALS['egw_setup']->oProc->RenameColumn('egw_emailadmin','description','ea_description'); |
|
| 127 | - $GLOBALS['egw_setup']->oProc->RenameColumn('egw_emailadmin','defaultDomain','ea_default_domain'); |
|
| 128 | - $GLOBALS['egw_setup']->oProc->RenameColumn('egw_emailadmin','organisationName','ea_organisation_name'); |
|
| 129 | - $GLOBALS['egw_setup']->oProc->RenameColumn('egw_emailadmin','userDefinedAccounts','ea_user_defined_accounts'); |
|
| 130 | - $GLOBALS['egw_setup']->oProc->RenameColumn('egw_emailadmin','imapoldcclient','ea_imapoldcclient'); |
|
| 103 | + $GLOBALS['egw_setup']->oProc->RenameColumn('egw_emailadmin', 'profileID', 'ea_profile_id'); |
|
| 104 | + $GLOBALS['egw_setup']->oProc->RenameColumn('egw_emailadmin', 'smtpServer', 'ea_smtp_server'); |
|
| 105 | + $GLOBALS['egw_setup']->oProc->RenameColumn('egw_emailadmin', 'smtpType', 'ea_smtp_type'); |
|
| 106 | + $GLOBALS['egw_setup']->oProc->RenameColumn('egw_emailadmin', 'smtpPort', 'ea_smtp_port'); |
|
| 107 | + $GLOBALS['egw_setup']->oProc->RenameColumn('egw_emailadmin', 'smtpAuth', 'ea_smtp_auth'); |
|
| 108 | + $GLOBALS['egw_setup']->oProc->RenameColumn('egw_emailadmin', 'editforwardingaddress', 'ea_editforwardingaddress'); |
|
| 109 | + $GLOBALS['egw_setup']->oProc->RenameColumn('egw_emailadmin', 'smtpLDAPServer', 'ea_smtp_ldap_server'); |
|
| 110 | + $GLOBALS['egw_setup']->oProc->RenameColumn('egw_emailadmin', 'smtpLDAPBaseDN', 'ea_smtp_ldap_basedn'); |
|
| 111 | + $GLOBALS['egw_setup']->oProc->RenameColumn('egw_emailadmin', 'smtpLDAPAdminDN', 'ea_smtp_ldap_admindn'); |
|
| 112 | + $GLOBALS['egw_setup']->oProc->RenameColumn('egw_emailadmin', 'smtpLDAPAdminPW', 'ea_smtp_ldap_adminpw'); |
|
| 113 | + $GLOBALS['egw_setup']->oProc->RenameColumn('egw_emailadmin', 'smtpLDAPUseDefault', 'ea_smtp_ldap_use_default'); |
|
| 114 | + $GLOBALS['egw_setup']->oProc->RenameColumn('egw_emailadmin', 'imapServer', 'ea_imap_server'); |
|
| 115 | + $GLOBALS['egw_setup']->oProc->RenameColumn('egw_emailadmin', 'imapType', 'ea_imap_type'); |
|
| 116 | + $GLOBALS['egw_setup']->oProc->RenameColumn('egw_emailadmin', 'imapPort', 'ea_imap_port'); |
|
| 117 | + $GLOBALS['egw_setup']->oProc->RenameColumn('egw_emailadmin', 'imapLoginType', 'ea_imap_login_type'); |
|
| 118 | + $GLOBALS['egw_setup']->oProc->RenameColumn('egw_emailadmin', 'imapTLSAuthentication', 'ea_imap_tsl_auth'); |
|
| 119 | + $GLOBALS['egw_setup']->oProc->RenameColumn('egw_emailadmin', 'imapTLSEncryption', 'ea_imap_tsl_encryption'); |
|
| 120 | + $GLOBALS['egw_setup']->oProc->RenameColumn('egw_emailadmin', 'imapEnableCyrusAdmin', 'ea_imap_enable_cyrus'); |
|
| 121 | + $GLOBALS['egw_setup']->oProc->RenameColumn('egw_emailadmin', 'imapAdminUsername', 'ea_imap_admin_user'); |
|
| 122 | + $GLOBALS['egw_setup']->oProc->RenameColumn('egw_emailadmin', 'imapAdminPW', 'ea_imap_admin_pw'); |
|
| 123 | + $GLOBALS['egw_setup']->oProc->RenameColumn('egw_emailadmin', 'imapEnableSieve', 'ea_imap_enable_sieve'); |
|
| 124 | + $GLOBALS['egw_setup']->oProc->RenameColumn('egw_emailadmin', 'imapSieveServer', 'ea_imap_sieve_server'); |
|
| 125 | + $GLOBALS['egw_setup']->oProc->RenameColumn('egw_emailadmin', 'imapSievePort', 'ea_imap_sieve_port'); |
|
| 126 | + $GLOBALS['egw_setup']->oProc->RenameColumn('egw_emailadmin', 'description', 'ea_description'); |
|
| 127 | + $GLOBALS['egw_setup']->oProc->RenameColumn('egw_emailadmin', 'defaultDomain', 'ea_default_domain'); |
|
| 128 | + $GLOBALS['egw_setup']->oProc->RenameColumn('egw_emailadmin', 'organisationName', 'ea_organisation_name'); |
|
| 129 | + $GLOBALS['egw_setup']->oProc->RenameColumn('egw_emailadmin', 'userDefinedAccounts', 'ea_user_defined_accounts'); |
|
| 130 | + $GLOBALS['egw_setup']->oProc->RenameColumn('egw_emailadmin', 'imapoldcclient', 'ea_imapoldcclient'); |
|
| 131 | 131 | |
| 132 | 132 | return $GLOBALS['setup_info']['emailadmin']['currentver'] = '1.2.001'; |
| 133 | 133 | } |
@@ -145,45 +145,45 @@ discard block |
||
| 145 | 145 | 'type' => 'varchar', |
| 146 | 146 | 'precision' => '80' |
| 147 | 147 | ));*/ |
| 148 | - $GLOBALS['egw_setup']->oProc->RefreshTable('egw_emailadmin',array( |
|
| 148 | + $GLOBALS['egw_setup']->oProc->RefreshTable('egw_emailadmin', array( |
|
| 149 | 149 | 'fd' => array( |
| 150 | - 'ea_profile_id' => array('type' => 'auto','nullable' => False), |
|
| 151 | - 'ea_smtp_server' => array('type' => 'varchar','precision' => '80'), |
|
| 152 | - 'ea_smtp_type' => array('type' => 'int','precision' => '4'), |
|
| 153 | - 'ea_smtp_port' => array('type' => 'int','precision' => '4'), |
|
| 154 | - 'ea_smtp_auth' => array('type' => 'varchar','precision' => '3'), |
|
| 155 | - 'ea_editforwardingaddress' => array('type' => 'varchar','precision' => '3'), |
|
| 156 | - 'ea_smtp_ldap_server' => array('type' => 'varchar','precision' => '80'), |
|
| 157 | - 'ea_smtp_ldap_basedn' => array('type' => 'varchar','precision' => '200'), |
|
| 158 | - 'ea_smtp_ldap_admindn' => array('type' => 'varchar','precision' => '200'), |
|
| 159 | - 'ea_smtp_ldap_adminpw' => array('type' => 'varchar','precision' => '30'), |
|
| 160 | - 'ea_smtp_ldap_use_default' => array('type' => 'varchar','precision' => '3'), |
|
| 161 | - 'ea_imap_server' => array('type' => 'varchar','precision' => '80'), |
|
| 162 | - 'ea_imap_type' => array('type' => 'int','precision' => '4'), |
|
| 163 | - 'ea_imap_port' => array('type' => 'int','precision' => '4'), |
|
| 164 | - 'ea_imap_login_type' => array('type' => 'varchar','precision' => '20'), |
|
| 165 | - 'ea_imap_tsl_auth' => array('type' => 'varchar','precision' => '3'), |
|
| 166 | - 'ea_imap_tsl_encryption' => array('type' => 'varchar','precision' => '3'), |
|
| 167 | - 'ea_imap_enable_cyrus' => array('type' => 'varchar','precision' => '3'), |
|
| 168 | - 'ea_imap_admin_user' => array('type' => 'varchar','precision' => '40'), |
|
| 169 | - 'ea_imap_admin_pw' => array('type' => 'varchar','precision' => '40'), |
|
| 170 | - 'ea_imap_enable_sieve' => array('type' => 'varchar','precision' => '3'), |
|
| 171 | - 'ea_imap_sieve_server' => array('type' => 'varchar','precision' => '80'), |
|
| 172 | - 'ea_imap_sieve_port' => array('type' => 'int','precision' => '4'), |
|
| 173 | - 'ea_description' => array('type' => 'varchar','precision' => '200'), |
|
| 174 | - 'ea_default_domain' => array('type' => 'varchar','precision' => '100'), |
|
| 175 | - 'ea_organisation_name' => array('type' => 'varchar','precision' => '100'), |
|
| 176 | - 'ea_user_defined_accounts' => array('type' => 'varchar','precision' => '3'), |
|
| 177 | - 'ea_imapoldcclient' => array('type' => 'varchar','precision' => '3'), |
|
| 178 | - 'ea_order' => array('type' => 'int','precision' => '4'), |
|
| 179 | - 'ea_appname' => array('type' => 'varchar','precision' => '80'), |
|
| 180 | - 'ea_group' => array('type' => 'varchar','precision' => '80'), |
|
| 181 | - 'ea_smtp_auth_username' => array('type' => 'varchar','precision' => '80'), |
|
| 182 | - 'ea_smtp_auth_password' => array('type' => 'varchar','precision' => '80') |
|
| 150 | + 'ea_profile_id' => array('type' => 'auto', 'nullable' => False), |
|
| 151 | + 'ea_smtp_server' => array('type' => 'varchar', 'precision' => '80'), |
|
| 152 | + 'ea_smtp_type' => array('type' => 'int', 'precision' => '4'), |
|
| 153 | + 'ea_smtp_port' => array('type' => 'int', 'precision' => '4'), |
|
| 154 | + 'ea_smtp_auth' => array('type' => 'varchar', 'precision' => '3'), |
|
| 155 | + 'ea_editforwardingaddress' => array('type' => 'varchar', 'precision' => '3'), |
|
| 156 | + 'ea_smtp_ldap_server' => array('type' => 'varchar', 'precision' => '80'), |
|
| 157 | + 'ea_smtp_ldap_basedn' => array('type' => 'varchar', 'precision' => '200'), |
|
| 158 | + 'ea_smtp_ldap_admindn' => array('type' => 'varchar', 'precision' => '200'), |
|
| 159 | + 'ea_smtp_ldap_adminpw' => array('type' => 'varchar', 'precision' => '30'), |
|
| 160 | + 'ea_smtp_ldap_use_default' => array('type' => 'varchar', 'precision' => '3'), |
|
| 161 | + 'ea_imap_server' => array('type' => 'varchar', 'precision' => '80'), |
|
| 162 | + 'ea_imap_type' => array('type' => 'int', 'precision' => '4'), |
|
| 163 | + 'ea_imap_port' => array('type' => 'int', 'precision' => '4'), |
|
| 164 | + 'ea_imap_login_type' => array('type' => 'varchar', 'precision' => '20'), |
|
| 165 | + 'ea_imap_tsl_auth' => array('type' => 'varchar', 'precision' => '3'), |
|
| 166 | + 'ea_imap_tsl_encryption' => array('type' => 'varchar', 'precision' => '3'), |
|
| 167 | + 'ea_imap_enable_cyrus' => array('type' => 'varchar', 'precision' => '3'), |
|
| 168 | + 'ea_imap_admin_user' => array('type' => 'varchar', 'precision' => '40'), |
|
| 169 | + 'ea_imap_admin_pw' => array('type' => 'varchar', 'precision' => '40'), |
|
| 170 | + 'ea_imap_enable_sieve' => array('type' => 'varchar', 'precision' => '3'), |
|
| 171 | + 'ea_imap_sieve_server' => array('type' => 'varchar', 'precision' => '80'), |
|
| 172 | + 'ea_imap_sieve_port' => array('type' => 'int', 'precision' => '4'), |
|
| 173 | + 'ea_description' => array('type' => 'varchar', 'precision' => '200'), |
|
| 174 | + 'ea_default_domain' => array('type' => 'varchar', 'precision' => '100'), |
|
| 175 | + 'ea_organisation_name' => array('type' => 'varchar', 'precision' => '100'), |
|
| 176 | + 'ea_user_defined_accounts' => array('type' => 'varchar', 'precision' => '3'), |
|
| 177 | + 'ea_imapoldcclient' => array('type' => 'varchar', 'precision' => '3'), |
|
| 178 | + 'ea_order' => array('type' => 'int', 'precision' => '4'), |
|
| 179 | + 'ea_appname' => array('type' => 'varchar', 'precision' => '80'), |
|
| 180 | + 'ea_group' => array('type' => 'varchar', 'precision' => '80'), |
|
| 181 | + 'ea_smtp_auth_username' => array('type' => 'varchar', 'precision' => '80'), |
|
| 182 | + 'ea_smtp_auth_password' => array('type' => 'varchar', 'precision' => '80') |
|
| 183 | 183 | ), |
| 184 | 184 | 'pk' => array('ea_profile_id'), |
| 185 | 185 | 'fk' => array(), |
| 186 | - 'ix' => array('ea_appname','ea_group'), |
|
| 186 | + 'ix' => array('ea_appname', 'ea_group'), |
|
| 187 | 187 | 'uc' => array() |
| 188 | 188 | )); |
| 189 | 189 | |
@@ -199,11 +199,11 @@ discard block |
||
| 199 | 199 | |
| 200 | 200 | function emailadmin_upgrade1_4() |
| 201 | 201 | { |
| 202 | - $GLOBALS['egw_setup']->oProc->AddColumn('egw_emailadmin','ea_user_defined_signatures',array( |
|
| 202 | + $GLOBALS['egw_setup']->oProc->AddColumn('egw_emailadmin', 'ea_user_defined_signatures', array( |
|
| 203 | 203 | 'type' => 'varchar', |
| 204 | 204 | 'precision' => '3' |
| 205 | 205 | )); |
| 206 | - $GLOBALS['egw_setup']->oProc->AddColumn('egw_emailadmin','ea_default_signature',array( |
|
| 206 | + $GLOBALS['egw_setup']->oProc->AddColumn('egw_emailadmin', 'ea_default_signature', array( |
|
| 207 | 207 | 'type' => 'varchar', |
| 208 | 208 | 'precision' => '255' |
| 209 | 209 | )); |
@@ -214,7 +214,7 @@ discard block |
||
| 214 | 214 | |
| 215 | 215 | function emailadmin_upgrade1_4_001() |
| 216 | 216 | { |
| 217 | - $GLOBALS['egw_setup']->oProc->AddColumn('egw_emailadmin','ea_user_defined_identities',array( |
|
| 217 | + $GLOBALS['egw_setup']->oProc->AddColumn('egw_emailadmin', 'ea_user_defined_identities', array( |
|
| 218 | 218 | 'type' => 'varchar', |
| 219 | 219 | 'precision' => '3' |
| 220 | 220 | )); |
@@ -225,26 +225,26 @@ discard block |
||
| 225 | 225 | |
| 226 | 226 | function emailadmin_upgrade1_5_001() |
| 227 | 227 | { |
| 228 | - $GLOBALS['egw_setup']->oProc->AddColumn('egw_emailadmin','ea_user',array( |
|
| 228 | + $GLOBALS['egw_setup']->oProc->AddColumn('egw_emailadmin', 'ea_user', array( |
|
| 229 | 229 | 'type' => 'varchar', |
| 230 | 230 | 'precision' => '80' |
| 231 | 231 | )); |
| 232 | - $GLOBALS['egw_setup']->oProc->AddColumn('egw_emailadmin','ea_active',array( |
|
| 232 | + $GLOBALS['egw_setup']->oProc->AddColumn('egw_emailadmin', 'ea_active', array( |
|
| 233 | 233 | 'type' => 'int', |
| 234 | 234 | 'precision' => '4' |
| 235 | 235 | )); |
| 236 | - $GLOBALS['phpgw_setup']->oProc->query("UPDATE egw_emailadmin set ea_user='0', ea_active=1",__LINE__,__FILE__); |
|
| 236 | + $GLOBALS['phpgw_setup']->oProc->query("UPDATE egw_emailadmin set ea_user='0', ea_active=1", __LINE__, __FILE__); |
|
| 237 | 237 | return $GLOBALS['setup_info']['emailadmin']['currentver'] = '1.5.002'; |
| 238 | 238 | } |
| 239 | 239 | |
| 240 | 240 | |
| 241 | 241 | function emailadmin_upgrade1_5_002() |
| 242 | 242 | { |
| 243 | - $GLOBALS['egw_setup']->oProc->AddColumn('egw_emailadmin','ea_imap_auth_username',array( |
|
| 243 | + $GLOBALS['egw_setup']->oProc->AddColumn('egw_emailadmin', 'ea_imap_auth_username', array( |
|
| 244 | 244 | 'type' => 'varchar', |
| 245 | 245 | 'precision' => '80' |
| 246 | 246 | )); |
| 247 | - $GLOBALS['egw_setup']->oProc->AddColumn('egw_emailadmin','ea_imap_auth_password',array( |
|
| 247 | + $GLOBALS['egw_setup']->oProc->AddColumn('egw_emailadmin', 'ea_imap_auth_password', array( |
|
| 248 | 248 | 'type' => 'varchar', |
| 249 | 249 | 'precision' => '80' |
| 250 | 250 | )); |
@@ -266,7 +266,7 @@ discard block |
||
| 266 | 266 | |
| 267 | 267 | function emailadmin_upgrade1_6() |
| 268 | 268 | { |
| 269 | - $GLOBALS['egw_setup']->oProc->AlterColumn('egw_emailadmin','ea_default_signature',array( |
|
| 269 | + $GLOBALS['egw_setup']->oProc->AlterColumn('egw_emailadmin', 'ea_default_signature', array( |
|
| 270 | 270 | 'type' => 'text' |
| 271 | 271 | )); |
| 272 | 272 | |
@@ -275,32 +275,32 @@ discard block |
||
| 275 | 275 | |
| 276 | 276 | function emailadmin_upgrade1_6_001() |
| 277 | 277 | { |
| 278 | - $GLOBALS['egw_setup']->oProc->AddColumn('egw_emailadmin','ea_stationery_active_templates',array( |
|
| 278 | + $GLOBALS['egw_setup']->oProc->AddColumn('egw_emailadmin', 'ea_stationery_active_templates', array( |
|
| 279 | 279 | 'type' => 'text' |
| 280 | 280 | )); |
| 281 | 281 | |
| 282 | - return $GLOBALS['setup_info']['emailadmin']['currentver'] = '1.8'; // was '1.7.003'; |
|
| 282 | + return $GLOBALS['setup_info']['emailadmin']['currentver'] = '1.8'; // was '1.7.003'; |
|
| 283 | 283 | } |
| 284 | 284 | |
| 285 | 285 | function emailadmin_upgrade1_7_003() |
| 286 | 286 | { |
| 287 | - $GLOBALS['egw_setup']->oProc->AlterColumn('egw_emailadmin','ea_imap_type',array( |
|
| 287 | + $GLOBALS['egw_setup']->oProc->AlterColumn('egw_emailadmin', 'ea_imap_type', array( |
|
| 288 | 288 | 'type' => 'varchar', |
| 289 | 289 | 'precision' => 56, |
| 290 | 290 | )); |
| 291 | - $GLOBALS['egw_setup']->oProc->AlterColumn('egw_emailadmin','ea_smtp_type',array( |
|
| 291 | + $GLOBALS['egw_setup']->oProc->AlterColumn('egw_emailadmin', 'ea_smtp_type', array( |
|
| 292 | 292 | 'type' => 'varchar', |
| 293 | 293 | 'precision' => 56, |
| 294 | 294 | )); |
| 295 | 295 | foreach (array('1'=>'defaultsmtp', '2'=>'postfixldap', '3'=>'postfixinetorgperson', '4'=>'smtpplesk', '5' =>'postfixdbmailuser') as $id => $newtype) |
| 296 | 296 | { |
| 297 | - $GLOBALS['egw_setup']->oProc->query('update egw_emailadmin set ea_smtp_type=\''.$newtype.'\' where ea_smtp_type=\''.$id.'\'',__LINE__,__FILE__); |
|
| 297 | + $GLOBALS['egw_setup']->oProc->query('update egw_emailadmin set ea_smtp_type=\''.$newtype.'\' where ea_smtp_type=\''.$id.'\'', __LINE__, __FILE__); |
|
| 298 | 298 | } |
| 299 | 299 | foreach (array('2'=>'defaultimap', '3'=>'cyrusimap', '4'=>'dbmailqmailuser', '5'=>'pleskimap', '6' =>'dbmaildbmailuser') as $id => $newtype) |
| 300 | 300 | { |
| 301 | - $GLOBALS['egw_setup']->oProc->query('update egw_emailadmin set ea_imap_type=\''.$newtype.'\' where ea_imap_type=\''.$id.'\'',__LINE__,__FILE__); |
|
| 301 | + $GLOBALS['egw_setup']->oProc->query('update egw_emailadmin set ea_imap_type=\''.$newtype.'\' where ea_imap_type=\''.$id.'\'', __LINE__, __FILE__); |
|
| 302 | 302 | } |
| 303 | - return $GLOBALS['setup_info']['emailadmin']['currentver'] = '1.9.001'; // was '1.7.004'; |
|
| 303 | + return $GLOBALS['setup_info']['emailadmin']['currentver'] = '1.9.001'; // was '1.7.004'; |
|
| 304 | 304 | } |
| 305 | 305 | |
| 306 | 306 | function emailadmin_upgrade1_8() |
@@ -317,52 +317,52 @@ discard block |
||
| 317 | 317 | |
| 318 | 318 | function emailadmin_upgrade1_9_001() |
| 319 | 319 | { |
| 320 | - $GLOBALS['egw_setup']->oProc->RefreshTable('egw_emailadmin',array( |
|
| 320 | + $GLOBALS['egw_setup']->oProc->RefreshTable('egw_emailadmin', array( |
|
| 321 | 321 | 'fd' => array( |
| 322 | - 'ea_profile_id' => array('type' => 'auto','nullable' => False), |
|
| 323 | - 'ea_smtp_server' => array('type' => 'varchar','precision' => '80'), |
|
| 324 | - 'ea_smtp_type' => array('type' => 'varchar','precision' => '56'), |
|
| 325 | - 'ea_smtp_port' => array('type' => 'int','precision' => '4'), |
|
| 326 | - 'ea_smtp_auth' => array('type' => 'varchar','precision' => '3'), |
|
| 327 | - 'ea_editforwardingaddress' => array('type' => 'varchar','precision' => '3'), |
|
| 328 | - 'ea_smtp_ldap_server' => array('type' => 'varchar','precision' => '80'), |
|
| 329 | - 'ea_smtp_ldap_basedn' => array('type' => 'varchar','precision' => '200'), |
|
| 330 | - 'ea_smtp_ldap_admindn' => array('type' => 'varchar','precision' => '200'), |
|
| 331 | - 'ea_smtp_ldap_adminpw' => array('type' => 'varchar','precision' => '30'), |
|
| 332 | - 'ea_smtp_ldap_use_default' => array('type' => 'varchar','precision' => '3'), |
|
| 333 | - 'ea_imap_server' => array('type' => 'varchar','precision' => '80'), |
|
| 334 | - 'ea_imap_type' => array('type' => 'varchar','precision' => '56'), |
|
| 335 | - 'ea_imap_port' => array('type' => 'int','precision' => '4'), |
|
| 336 | - 'ea_imap_login_type' => array('type' => 'varchar','precision' => '20'), |
|
| 337 | - 'ea_imap_tsl_auth' => array('type' => 'varchar','precision' => '3'), |
|
| 338 | - 'ea_imap_tsl_encryption' => array('type' => 'varchar','precision' => '3'), |
|
| 339 | - 'ea_imap_enable_cyrus' => array('type' => 'varchar','precision' => '3'), |
|
| 340 | - 'ea_imap_admin_user' => array('type' => 'varchar','precision' => '40'), |
|
| 341 | - 'ea_imap_admin_pw' => array('type' => 'varchar','precision' => '40'), |
|
| 342 | - 'ea_imap_enable_sieve' => array('type' => 'varchar','precision' => '3'), |
|
| 343 | - 'ea_imap_sieve_server' => array('type' => 'varchar','precision' => '80'), |
|
| 344 | - 'ea_imap_sieve_port' => array('type' => 'int','precision' => '4'), |
|
| 345 | - 'ea_description' => array('type' => 'varchar','precision' => '200'), |
|
| 346 | - 'ea_default_domain' => array('type' => 'varchar','precision' => '100'), |
|
| 347 | - 'ea_organisation_name' => array('type' => 'varchar','precision' => '100'), |
|
| 348 | - 'ea_user_defined_identities' => array('type' => 'varchar','precision' => '3'), |
|
| 349 | - 'ea_user_defined_accounts' => array('type' => 'varchar','precision' => '3'), |
|
| 350 | - 'ea_order' => array('type' => 'int','precision' => '4'), |
|
| 351 | - 'ea_appname' => array('type' => 'varchar','precision' => '80'), |
|
| 352 | - 'ea_group' => array('type' => 'varchar','precision' => '80'), |
|
| 353 | - 'ea_user' => array('type' => 'varchar','precision' => '80'), |
|
| 354 | - 'ea_active' => array('type' => 'int','precision' => '4'), |
|
| 355 | - 'ea_smtp_auth_username' => array('type' => 'varchar','precision' => '80'), |
|
| 356 | - 'ea_smtp_auth_password' => array('type' => 'varchar','precision' => '80'), |
|
| 357 | - 'ea_user_defined_signatures' => array('type' => 'varchar','precision' => '3'), |
|
| 322 | + 'ea_profile_id' => array('type' => 'auto', 'nullable' => False), |
|
| 323 | + 'ea_smtp_server' => array('type' => 'varchar', 'precision' => '80'), |
|
| 324 | + 'ea_smtp_type' => array('type' => 'varchar', 'precision' => '56'), |
|
| 325 | + 'ea_smtp_port' => array('type' => 'int', 'precision' => '4'), |
|
| 326 | + 'ea_smtp_auth' => array('type' => 'varchar', 'precision' => '3'), |
|
| 327 | + 'ea_editforwardingaddress' => array('type' => 'varchar', 'precision' => '3'), |
|
| 328 | + 'ea_smtp_ldap_server' => array('type' => 'varchar', 'precision' => '80'), |
|
| 329 | + 'ea_smtp_ldap_basedn' => array('type' => 'varchar', 'precision' => '200'), |
|
| 330 | + 'ea_smtp_ldap_admindn' => array('type' => 'varchar', 'precision' => '200'), |
|
| 331 | + 'ea_smtp_ldap_adminpw' => array('type' => 'varchar', 'precision' => '30'), |
|
| 332 | + 'ea_smtp_ldap_use_default' => array('type' => 'varchar', 'precision' => '3'), |
|
| 333 | + 'ea_imap_server' => array('type' => 'varchar', 'precision' => '80'), |
|
| 334 | + 'ea_imap_type' => array('type' => 'varchar', 'precision' => '56'), |
|
| 335 | + 'ea_imap_port' => array('type' => 'int', 'precision' => '4'), |
|
| 336 | + 'ea_imap_login_type' => array('type' => 'varchar', 'precision' => '20'), |
|
| 337 | + 'ea_imap_tsl_auth' => array('type' => 'varchar', 'precision' => '3'), |
|
| 338 | + 'ea_imap_tsl_encryption' => array('type' => 'varchar', 'precision' => '3'), |
|
| 339 | + 'ea_imap_enable_cyrus' => array('type' => 'varchar', 'precision' => '3'), |
|
| 340 | + 'ea_imap_admin_user' => array('type' => 'varchar', 'precision' => '40'), |
|
| 341 | + 'ea_imap_admin_pw' => array('type' => 'varchar', 'precision' => '40'), |
|
| 342 | + 'ea_imap_enable_sieve' => array('type' => 'varchar', 'precision' => '3'), |
|
| 343 | + 'ea_imap_sieve_server' => array('type' => 'varchar', 'precision' => '80'), |
|
| 344 | + 'ea_imap_sieve_port' => array('type' => 'int', 'precision' => '4'), |
|
| 345 | + 'ea_description' => array('type' => 'varchar', 'precision' => '200'), |
|
| 346 | + 'ea_default_domain' => array('type' => 'varchar', 'precision' => '100'), |
|
| 347 | + 'ea_organisation_name' => array('type' => 'varchar', 'precision' => '100'), |
|
| 348 | + 'ea_user_defined_identities' => array('type' => 'varchar', 'precision' => '3'), |
|
| 349 | + 'ea_user_defined_accounts' => array('type' => 'varchar', 'precision' => '3'), |
|
| 350 | + 'ea_order' => array('type' => 'int', 'precision' => '4'), |
|
| 351 | + 'ea_appname' => array('type' => 'varchar', 'precision' => '80'), |
|
| 352 | + 'ea_group' => array('type' => 'varchar', 'precision' => '80'), |
|
| 353 | + 'ea_user' => array('type' => 'varchar', 'precision' => '80'), |
|
| 354 | + 'ea_active' => array('type' => 'int', 'precision' => '4'), |
|
| 355 | + 'ea_smtp_auth_username' => array('type' => 'varchar', 'precision' => '80'), |
|
| 356 | + 'ea_smtp_auth_password' => array('type' => 'varchar', 'precision' => '80'), |
|
| 357 | + 'ea_user_defined_signatures' => array('type' => 'varchar', 'precision' => '3'), |
|
| 358 | 358 | 'ea_default_signature' => array('type' => 'text'), |
| 359 | - 'ea_imap_auth_username' => array('type' => 'varchar','precision' => '80'), |
|
| 360 | - 'ea_imap_auth_password' => array('type' => 'varchar','precision' => '80'), |
|
| 359 | + 'ea_imap_auth_username' => array('type' => 'varchar', 'precision' => '80'), |
|
| 360 | + 'ea_imap_auth_password' => array('type' => 'varchar', 'precision' => '80'), |
|
| 361 | 361 | 'ea_stationery_active_templates' => array('type' => 'text') |
| 362 | 362 | ), |
| 363 | 363 | 'pk' => array('ea_profile_id'), |
| 364 | 364 | 'fk' => array(), |
| 365 | - 'ix' => array('ea_appname','ea_group'), |
|
| 365 | + 'ix' => array('ea_appname', 'ea_group'), |
|
| 366 | 366 | 'uc' => array() |
| 367 | 367 | )); |
| 368 | 368 | return $GLOBALS['setup_info']['emailadmin']['currentver'] = '1.9.002'; |
@@ -371,13 +371,13 @@ discard block |
||
| 371 | 371 | function emailadmin_upgrade1_9_002() |
| 372 | 372 | { |
| 373 | 373 | // convert serialized stationery templates setting to eTemplate store style |
| 374 | - foreach($GLOBALS['egw_setup']->db->query('SELECT ea_profile_id,ea_stationery_active_templates FROM egw_emailadmin |
|
| 375 | - WHERE ea_stationery_active_templates IS NOT NULL',__LINE__,__FILE__) as $row) |
|
| 374 | + foreach ($GLOBALS['egw_setup']->db->query('SELECT ea_profile_id,ea_stationery_active_templates FROM egw_emailadmin |
|
| 375 | + WHERE ea_stationery_active_templates IS NOT NULL',__LINE__, __FILE__) as $row) |
|
| 376 | 376 | { |
| 377 | - if(is_array(($templates=unserialize($row['ea_stationery_active_templates'])))) |
|
| 377 | + if (is_array(($templates = unserialize($row['ea_stationery_active_templates'])))) |
|
| 378 | 378 | { |
| 379 | - $GLOBALS['egw_setup']->db->query('UPDATE egw_emailadmin SET ea_stationery_active_templates="'.implode(',',$templates).'"' |
|
| 380 | - .' WHERE ea_profile_id='.(int)$row['ea_profile_id'],__LINE__,__FILE__); |
|
| 379 | + $GLOBALS['egw_setup']->db->query('UPDATE egw_emailadmin SET ea_stationery_active_templates="'.implode(',', $templates).'"' |
|
| 380 | + .' WHERE ea_profile_id='.(int)$row['ea_profile_id'], __LINE__, __FILE__); |
|
| 381 | 381 | } |
| 382 | 382 | unset($templates); |
| 383 | 383 | } |
@@ -387,7 +387,7 @@ discard block |
||
| 387 | 387 | |
| 388 | 388 | function emailadmin_upgrade1_9_003() |
| 389 | 389 | { |
| 390 | - $GLOBALS['egw_setup']->oProc->AlterColumn('egw_emailadmin','ea_smtp_auth_username',array( |
|
| 390 | + $GLOBALS['egw_setup']->oProc->AlterColumn('egw_emailadmin', 'ea_smtp_auth_username', array( |
|
| 391 | 391 | 'type' => 'varchar', |
| 392 | 392 | 'precision' => '128', |
| 393 | 393 | )); |
@@ -402,16 +402,16 @@ discard block |
||
| 402 | 402 | |
| 403 | 403 | function emailadmin_upgrade1_9_005() |
| 404 | 404 | { |
| 405 | - $GLOBALS['egw_setup']->oProc->CreateTable('egw_mailaccounts',array( |
|
| 405 | + $GLOBALS['egw_setup']->oProc->CreateTable('egw_mailaccounts', array( |
|
| 406 | 406 | 'fd' => array( |
| 407 | - 'mail_id' => array('type' => 'auto','nullable' => False), |
|
| 408 | - 'account_id' => array('type' => 'int','precision' => '4','nullable' => False), |
|
| 409 | - 'mail_type' => array('type' => 'int','precision' => '1','nullable' => False,'comment' => '0=active, 1=alias, 2=forward, 3=forwardOnly, 4=quota'), |
|
| 410 | - 'mail_value' => array('type' => 'varchar','precision' => '128','nullable' => False) |
|
| 407 | + 'mail_id' => array('type' => 'auto', 'nullable' => False), |
|
| 408 | + 'account_id' => array('type' => 'int', 'precision' => '4', 'nullable' => False), |
|
| 409 | + 'mail_type' => array('type' => 'int', 'precision' => '1', 'nullable' => False, 'comment' => '0=active, 1=alias, 2=forward, 3=forwardOnly, 4=quota'), |
|
| 410 | + 'mail_value' => array('type' => 'varchar', 'precision' => '128', 'nullable' => False) |
|
| 411 | 411 | ), |
| 412 | 412 | 'pk' => array('mail_id'), |
| 413 | 413 | 'fk' => array(), |
| 414 | - 'ix' => array('mail_value',array('account_id','mail_type')), |
|
| 414 | + 'ix' => array('mail_value', array('account_id', 'mail_type')), |
|
| 415 | 415 | 'uc' => array() |
| 416 | 416 | )); |
| 417 | 417 | |
@@ -421,34 +421,34 @@ discard block |
||
| 421 | 421 | |
| 422 | 422 | function emailadmin_upgrade1_9_006() |
| 423 | 423 | { |
| 424 | - $GLOBALS['egw_setup']->oProc->CreateTable('egw_ea_accounts',array( |
|
| 424 | + $GLOBALS['egw_setup']->oProc->CreateTable('egw_ea_accounts', array( |
|
| 425 | 425 | 'fd' => array( |
| 426 | - 'acc_id' => array('type' => 'auto','nullable' => False), |
|
| 427 | - 'acc_name' => array('type' => 'varchar','precision' => '80','comment' => 'description'), |
|
| 428 | - 'ident_id' => array('type' => 'int','precision' => '4','nullable' => False,'comment' => 'standard identity'), |
|
| 429 | - 'acc_imap_host' => array('type' => 'varchar','precision' => '128','nullable' => False,'comment' => 'imap hostname'), |
|
| 430 | - 'acc_imap_ssl' => array('type' => 'int','precision' => '1','nullable' => False,'default' => '0','comment' => '0=none, 1=starttls, 2=tls, 3=ssl, &8=validate certificate'), |
|
| 431 | - 'acc_imap_port' => array('type' => 'int','precision' => '4','nullable' => False,'default' => '143','comment' => 'imap port'), |
|
| 432 | - 'acc_sieve_enabled' => array('type' => 'bool','default' => '0','comment' => 'sieve enabled'), |
|
| 433 | - 'acc_sieve_host' => array('type' => 'varchar','precision' => '128','comment' => 'sieve host, default imap_host'), |
|
| 434 | - 'acc_sieve_port' => array('type' => 'int','precision' => '4','default' => '4190'), |
|
| 435 | - 'acc_folder_sent' => array('type' => 'varchar','precision' => '128','comment' => 'sent folder'), |
|
| 436 | - 'acc_folder_trash' => array('type' => 'varchar','precision' => '128','comment' => 'trash folder'), |
|
| 437 | - 'acc_folder_draft' => array('type' => 'varchar','precision' => '128','comment' => 'draft folder'), |
|
| 438 | - 'acc_folder_template' => array('type' => 'varchar','precision' => '128','comment' => 'template folder'), |
|
| 439 | - 'acc_smtp_host' => array('type' => 'varchar','precision' => '128','comment' => 'smtp hostname'), |
|
| 440 | - 'acc_smtp_ssl' => array('type' => 'int','precision' => '1','nullable' => False,'default' => '0','comment' => '0=none, 1=starttls, 2=tls, 3=ssl, &8=validate certificate'), |
|
| 441 | - 'acc_smtp_port' => array('type' => 'int','precision' => '4','nullable' => False,'default' => '25','comment' => 'smtp port'), |
|
| 442 | - 'acc_smtp_type' => array('type' => 'varchar','precision' => '32','default' => 'emailadmin_smtp','comment' => 'smtp class to use'), |
|
| 443 | - 'acc_imap_type' => array('type' => 'varchar','precision' => '32','default' => 'emailadmin_imap','comment' => 'imap class to use'), |
|
| 444 | - 'acc_imap_logintype' => array('type' => 'varchar','precision' => '20','comment' => 'standard, vmailmgr, admin, uidNumber'), |
|
| 445 | - 'acc_domain' => array('type' => 'varchar','precision' => '100','comment' => 'domain name'), |
|
| 446 | - 'acc_further_identities' => array('type' => 'bool','nullable' => False,'default' => '1','comment' => '0=no, 1=yes'), |
|
| 447 | - 'acc_user_editable' => array('type' => 'bool','nullable' => False,'default' => '1','comment' => '0=no, 1=yes'), |
|
| 448 | - 'acc_sieve_ssl' => array('type' => 'int','precision' => '1','default' => '1','comment' => '0=none, 1=starttls, 2=tls, 3=ssl, &8=validate certificate'), |
|
| 449 | - 'acc_modified' => array('type' => 'timestamp','nullable' => False,'default' => 'current_timestamp'), |
|
| 450 | - 'acc_modifier' => array('type' => 'int','meta' => 'user','precision' => '4'), |
|
| 451 | - 'acc_smtp_auth_session' => array('type' => 'bool','comment' => '0=no, 1=yes, use username/pw from current user') |
|
| 426 | + 'acc_id' => array('type' => 'auto', 'nullable' => False), |
|
| 427 | + 'acc_name' => array('type' => 'varchar', 'precision' => '80', 'comment' => 'description'), |
|
| 428 | + 'ident_id' => array('type' => 'int', 'precision' => '4', 'nullable' => False, 'comment' => 'standard identity'), |
|
| 429 | + 'acc_imap_host' => array('type' => 'varchar', 'precision' => '128', 'nullable' => False, 'comment' => 'imap hostname'), |
|
| 430 | + 'acc_imap_ssl' => array('type' => 'int', 'precision' => '1', 'nullable' => False, 'default' => '0', 'comment' => '0=none, 1=starttls, 2=tls, 3=ssl, &8=validate certificate'), |
|
| 431 | + 'acc_imap_port' => array('type' => 'int', 'precision' => '4', 'nullable' => False, 'default' => '143', 'comment' => 'imap port'), |
|
| 432 | + 'acc_sieve_enabled' => array('type' => 'bool', 'default' => '0', 'comment' => 'sieve enabled'), |
|
| 433 | + 'acc_sieve_host' => array('type' => 'varchar', 'precision' => '128', 'comment' => 'sieve host, default imap_host'), |
|
| 434 | + 'acc_sieve_port' => array('type' => 'int', 'precision' => '4', 'default' => '4190'), |
|
| 435 | + 'acc_folder_sent' => array('type' => 'varchar', 'precision' => '128', 'comment' => 'sent folder'), |
|
| 436 | + 'acc_folder_trash' => array('type' => 'varchar', 'precision' => '128', 'comment' => 'trash folder'), |
|
| 437 | + 'acc_folder_draft' => array('type' => 'varchar', 'precision' => '128', 'comment' => 'draft folder'), |
|
| 438 | + 'acc_folder_template' => array('type' => 'varchar', 'precision' => '128', 'comment' => 'template folder'), |
|
| 439 | + 'acc_smtp_host' => array('type' => 'varchar', 'precision' => '128', 'comment' => 'smtp hostname'), |
|
| 440 | + 'acc_smtp_ssl' => array('type' => 'int', 'precision' => '1', 'nullable' => False, 'default' => '0', 'comment' => '0=none, 1=starttls, 2=tls, 3=ssl, &8=validate certificate'), |
|
| 441 | + 'acc_smtp_port' => array('type' => 'int', 'precision' => '4', 'nullable' => False, 'default' => '25', 'comment' => 'smtp port'), |
|
| 442 | + 'acc_smtp_type' => array('type' => 'varchar', 'precision' => '32', 'default' => 'emailadmin_smtp', 'comment' => 'smtp class to use'), |
|
| 443 | + 'acc_imap_type' => array('type' => 'varchar', 'precision' => '32', 'default' => 'emailadmin_imap', 'comment' => 'imap class to use'), |
|
| 444 | + 'acc_imap_logintype' => array('type' => 'varchar', 'precision' => '20', 'comment' => 'standard, vmailmgr, admin, uidNumber'), |
|
| 445 | + 'acc_domain' => array('type' => 'varchar', 'precision' => '100', 'comment' => 'domain name'), |
|
| 446 | + 'acc_further_identities' => array('type' => 'bool', 'nullable' => False, 'default' => '1', 'comment' => '0=no, 1=yes'), |
|
| 447 | + 'acc_user_editable' => array('type' => 'bool', 'nullable' => False, 'default' => '1', 'comment' => '0=no, 1=yes'), |
|
| 448 | + 'acc_sieve_ssl' => array('type' => 'int', 'precision' => '1', 'default' => '1', 'comment' => '0=none, 1=starttls, 2=tls, 3=ssl, &8=validate certificate'), |
|
| 449 | + 'acc_modified' => array('type' => 'timestamp', 'nullable' => False, 'default' => 'current_timestamp'), |
|
| 450 | + 'acc_modifier' => array('type' => 'int', 'meta' => 'user', 'precision' => '4'), |
|
| 451 | + 'acc_smtp_auth_session' => array('type' => 'bool', 'comment' => '0=no, 1=yes, use username/pw from current user') |
|
| 452 | 452 | ), |
| 453 | 453 | 'pk' => array('acc_id'), |
| 454 | 454 | 'fk' => array(), |
@@ -462,20 +462,20 @@ discard block |
||
| 462 | 462 | |
| 463 | 463 | function emailadmin_upgrade1_9_007() |
| 464 | 464 | { |
| 465 | - $GLOBALS['egw_setup']->oProc->CreateTable('egw_ea_credentials',array( |
|
| 465 | + $GLOBALS['egw_setup']->oProc->CreateTable('egw_ea_credentials', array( |
|
| 466 | 466 | 'fd' => array( |
| 467 | - 'cred_id' => array('type' => 'auto','nullable' => False), |
|
| 468 | - 'acc_id' => array('type' => 'int','precision' => '4','nullable' => False,'comment' => 'into egw_ea_accounts'), |
|
| 469 | - 'cred_type' => array('type' => 'int','precision' => '1','nullable' => False,'comment' => '&1=imap, &2=smtp, &4=admin'), |
|
| 470 | - 'account_id' => array('type' => 'int','meta' => 'user','precision' => '4','nullable' => False,'comment' => 'account_id or 0=all'), |
|
| 471 | - 'cred_username' => array('type' => 'varchar','precision' => '80','nullable' => False,'comment' => 'username'), |
|
| 472 | - 'cred_password' => array('type' => 'varchar','precision' => '80','comment' => 'password encrypted'), |
|
| 473 | - 'cred_pw_enc' => array('type' => 'int','precision' => '1','default' => '0','comment' => '0=not, 1=user pw, 2=system') |
|
| 467 | + 'cred_id' => array('type' => 'auto', 'nullable' => False), |
|
| 468 | + 'acc_id' => array('type' => 'int', 'precision' => '4', 'nullable' => False, 'comment' => 'into egw_ea_accounts'), |
|
| 469 | + 'cred_type' => array('type' => 'int', 'precision' => '1', 'nullable' => False, 'comment' => '&1=imap, &2=smtp, &4=admin'), |
|
| 470 | + 'account_id' => array('type' => 'int', 'meta' => 'user', 'precision' => '4', 'nullable' => False, 'comment' => 'account_id or 0=all'), |
|
| 471 | + 'cred_username' => array('type' => 'varchar', 'precision' => '80', 'nullable' => False, 'comment' => 'username'), |
|
| 472 | + 'cred_password' => array('type' => 'varchar', 'precision' => '80', 'comment' => 'password encrypted'), |
|
| 473 | + 'cred_pw_enc' => array('type' => 'int', 'precision' => '1', 'default' => '0', 'comment' => '0=not, 1=user pw, 2=system') |
|
| 474 | 474 | ), |
| 475 | 475 | 'pk' => array('cred_id'), |
| 476 | 476 | 'fk' => array(), |
| 477 | 477 | 'ix' => array(), |
| 478 | - 'uc' => array(array('acc_id','account_id','cred_type')) |
|
| 478 | + 'uc' => array(array('acc_id', 'account_id', 'cred_type')) |
|
| 479 | 479 | )); |
| 480 | 480 | |
| 481 | 481 | return $GLOBALS['setup_info']['emailadmin']['currentver'] = '1.9.008'; |
@@ -484,15 +484,15 @@ discard block |
||
| 484 | 484 | |
| 485 | 485 | function emailadmin_upgrade1_9_008() |
| 486 | 486 | { |
| 487 | - $GLOBALS['egw_setup']->oProc->CreateTable('egw_ea_identities',array( |
|
| 487 | + $GLOBALS['egw_setup']->oProc->CreateTable('egw_ea_identities', array( |
|
| 488 | 488 | 'fd' => array( |
| 489 | - 'ident_id' => array('type' => 'auto','nullable' => False), |
|
| 490 | - 'acc_id' => array('type' => 'int','precision' => '4','nullable' => False,'comment' => 'for which account'), |
|
| 491 | - 'ident_realname' => array('type' => 'varchar','precision' => '128','nullable' => False,'comment' => 'real name'), |
|
| 492 | - 'ident_email' => array('type' => 'varchar','precision' => '128','comment' => 'email address'), |
|
| 493 | - 'ident_org' => array('type' => 'varchar','precision' => '128','comment' => 'organisation'), |
|
| 494 | - 'ident_signature' => array('type' => 'text','comment' => 'signature text'), |
|
| 495 | - 'account_id' => array('type' => 'int','meta' => 'account','precision' => '4','nullable' => False,'default' => '0','comment' => '0=all users of give mail account') |
|
| 489 | + 'ident_id' => array('type' => 'auto', 'nullable' => False), |
|
| 490 | + 'acc_id' => array('type' => 'int', 'precision' => '4', 'nullable' => False, 'comment' => 'for which account'), |
|
| 491 | + 'ident_realname' => array('type' => 'varchar', 'precision' => '128', 'nullable' => False, 'comment' => 'real name'), |
|
| 492 | + 'ident_email' => array('type' => 'varchar', 'precision' => '128', 'comment' => 'email address'), |
|
| 493 | + 'ident_org' => array('type' => 'varchar', 'precision' => '128', 'comment' => 'organisation'), |
|
| 494 | + 'ident_signature' => array('type' => 'text', 'comment' => 'signature text'), |
|
| 495 | + 'account_id' => array('type' => 'int', 'meta' => 'account', 'precision' => '4', 'nullable' => False, 'default' => '0', 'comment' => '0=all users of give mail account') |
|
| 496 | 496 | ), |
| 497 | 497 | 'pk' => array('ident_id'), |
| 498 | 498 | 'fk' => array(), |
@@ -506,15 +506,15 @@ discard block |
||
| 506 | 506 | |
| 507 | 507 | function emailadmin_upgrade1_9_009() |
| 508 | 508 | { |
| 509 | - $GLOBALS['egw_setup']->oProc->CreateTable('egw_ea_valid',array( |
|
| 509 | + $GLOBALS['egw_setup']->oProc->CreateTable('egw_ea_valid', array( |
|
| 510 | 510 | 'fd' => array( |
| 511 | - 'acc_id' => array('type' => 'int','precision' => '4','nullable' => False), |
|
| 512 | - 'account_id' => array('type' => 'int','meta' => 'account','precision' => '4','nullable' => False) |
|
| 511 | + 'acc_id' => array('type' => 'int', 'precision' => '4', 'nullable' => False), |
|
| 512 | + 'account_id' => array('type' => 'int', 'meta' => 'account', 'precision' => '4', 'nullable' => False) |
|
| 513 | 513 | ), |
| 514 | 514 | 'pk' => array(), |
| 515 | 515 | 'fk' => array(), |
| 516 | - 'ix' => array(array('account_id','acc_id')), |
|
| 517 | - 'uc' => array(array('acc_id','account_id')) |
|
| 516 | + 'ix' => array(array('account_id', 'acc_id')), |
|
| 517 | + 'uc' => array(array('acc_id', 'account_id')) |
|
| 518 | 518 | )); |
| 519 | 519 | |
| 520 | 520 | return $GLOBALS['setup_info']['emailadmin']['currentver'] = '1.9.010'; |
@@ -545,7 +545,7 @@ discard block |
||
| 545 | 545 | // migrate personal felamimail accounts, identities and signatures |
| 546 | 546 | try { |
| 547 | 547 | $db = $GLOBALS['egw_setup']->db; |
| 548 | - foreach($db->select('egw_emailadmin', '*', array('ea_active' => 1), __LINE__, __FILE__, false, |
|
| 548 | + foreach ($db->select('egw_emailadmin', '*', array('ea_active' => 1), __LINE__, __FILE__, false, |
|
| 549 | 549 | // order general profiles first, then group profiles and user specific ones last |
| 550 | 550 | 'ORDER BY ea_group IS NULL AND ea_user IS NULL DESC,ea_group IS NULL,ea_user', 'emailadmin') as $row) |
| 551 | 551 | { |
@@ -586,7 +586,7 @@ discard block |
||
| 586 | 586 | 'acc_imap_type' => emailadmin_account::getIcClass($row['ea_imap_type']), |
| 587 | 587 | 'acc_imap_logintype' => $row['ea_imap_login_type'], |
| 588 | 588 | 'acc_imap_host' => $row['ea_imap_server'], |
| 589 | - 'acc_imap_ssl' => $row['ea_imap_tsl_encryption'] | ($row['ea_imap_tsl_auth'] === 'yes' ? 8 : 0), |
|
| 589 | + 'acc_imap_ssl' => $row['ea_imap_tsl_encryption']|($row['ea_imap_tsl_auth'] === 'yes' ? 8 : 0), |
|
| 590 | 590 | 'acc_imap_port' => $row['ea_imap_port'], |
| 591 | 591 | 'acc_sieve_enabled' => $row['ea_imap_enable_sieve'] == 'yes', |
| 592 | 592 | 'acc_sieve_host' => $row['ea_imap_sieve_server'], |
@@ -602,7 +602,7 @@ discard block |
||
| 602 | 602 | 'acc_smtp_port' => $row['ea_smtp_port'], |
| 603 | 603 | 'acc_domain' => $row['ea_default_domain'], |
| 604 | 604 | 'acc_further_identities' => $row['ea_user_defined_identities'] == 'yes' || |
| 605 | - $row['ea_user_defined_signatures'] == 'yes', // both together are now called identities |
|
| 605 | + $row['ea_user_defined_signatures'] == 'yes', // both together are now called identities |
|
| 606 | 606 | 'acc_user_editable' => false, |
| 607 | 607 | 'acc_smtp_auth_session' => $row['ea_smtp_auth'] == 'ann' || |
| 608 | 608 | $row['ea_smtp_auth'] == 'yes' && empty($row['ea_smtp_auth_username']), |
@@ -645,7 +645,7 @@ discard block |
||
| 645 | 645 | } |
| 646 | 646 | // ToDo: migrate all not yet via personal fmail profiles migrated signatures |
| 647 | 647 | } |
| 648 | - catch(Exception $e) { |
|
| 648 | + catch (Exception $e) { |
|
| 649 | 649 | // ignore all errors, eg. because FMail is not installed |
| 650 | 650 | echo "<p>".$e->getMessage()."</p>\n"; |
| 651 | 651 | } |
@@ -665,7 +665,7 @@ discard block |
||
| 665 | 665 | * @param string $email optional email to be used to find matching account/identity with identical email or same domain |
| 666 | 666 | * @return array with ident_* and acc_id |
| 667 | 667 | */ |
| 668 | -function emailadmin_std_identity($account_id, $email=null) |
|
| 668 | +function emailadmin_std_identity($account_id, $email = null) |
|
| 669 | 669 | { |
| 670 | 670 | if ($email) list(, $domain) = explode('@', $email); |
| 671 | 671 | return $GLOBALS['egw_setup']->db->select('egw_ea_accounts', 'egw_ea_identities.*', |
@@ -692,7 +692,7 @@ discard block |
||
| 692 | 692 | { |
| 693 | 693 | try { |
| 694 | 694 | // migrate real fmail accounts, but not yet identities (fm_ic_hostname is NULL) |
| 695 | - foreach($db->select('egw_felamimail_accounts', '*', 'fm_ic_hostname IS NOT NULL', __LINE__, __FILE__, false, '', 'felamimail') as $row) |
|
| 695 | + foreach ($db->select('egw_felamimail_accounts', '*', 'fm_ic_hostname IS NOT NULL', __LINE__, __FILE__, false, '', 'felamimail') as $row) |
|
| 696 | 696 | { |
| 697 | 697 | $prefs = new preferences($row['fm_owner']); |
| 698 | 698 | $all_prefs = $prefs->read_repository(); |
@@ -722,7 +722,7 @@ discard block |
||
| 722 | 722 | 'acc_name' => $row['fm_emailaddress'], |
| 723 | 723 | 'ident_id' => $ident_id, |
| 724 | 724 | 'acc_imap_host' => $row['fm_ic_hostname'], |
| 725 | - 'acc_imap_ssl' => $row['fm_ic_encryption'] | ($row['fm_ic_validatecertificate'] ? 8 : 0), |
|
| 725 | + 'acc_imap_ssl' => $row['fm_ic_encryption']|($row['fm_ic_validatecertificate'] ? 8 : 0), |
|
| 726 | 726 | 'acc_imap_port' => $row['fm_ic_port'], |
| 727 | 727 | 'acc_sieve_enabled' => $row['fm_ic_enable_sieve'], |
| 728 | 728 | 'acc_sieve_host' => $row['fm_ic_sieve_server'], |
@@ -761,11 +761,11 @@ discard block |
||
| 761 | 761 | } |
| 762 | 762 | |
| 763 | 763 | // migrate fmail identities (fm_ic_hostname is NULL), not real fmail account done above |
| 764 | - foreach($db->select('egw_felamimail_accounts', '*', 'fm_ic_hostname IS NULL', __LINE__, __FILE__, false, '', 'felamimail') as $row) |
|
| 764 | + foreach ($db->select('egw_felamimail_accounts', '*', 'fm_ic_hostname IS NULL', __LINE__, __FILE__, false, '', 'felamimail') as $row) |
|
| 765 | 765 | { |
| 766 | 766 | if (!($std_identity = emailadmin_std_identity($row['fm_owner']))) |
| 767 | 767 | { |
| 768 | - continue; // no account found to add identity to |
|
| 768 | + continue; // no account found to add identity to |
|
| 769 | 769 | } |
| 770 | 770 | // create standard identity for account |
| 771 | 771 | $identity = array( |
@@ -783,13 +783,13 @@ discard block |
||
| 783 | 783 | |
| 784 | 784 | // migrate all not yet as standard-signatures migrated signatures to identities of first migrated fmail profile |
| 785 | 785 | // completing them with realname, email and org from standard-signature of given account |
| 786 | - foreach($db->select('egw_felamimail_signatures', '*', |
|
| 786 | + foreach ($db->select('egw_felamimail_signatures', '*', |
|
| 787 | 787 | "fm_signatureid NOT IN (SELECT fm_signatureid FROM egw_felamimail_accounts)", |
| 788 | 788 | __LINE__, __FILE__, false, '', 'felamimail') as $row) |
| 789 | 789 | { |
| 790 | 790 | if (!($std_identity = emailadmin_std_identity($row['fm_accountid']))) |
| 791 | 791 | { |
| 792 | - continue; // ignore signatures for whos owner (fm_accountid!) we have no personal profile |
|
| 792 | + continue; // ignore signatures for whos owner (fm_accountid!) we have no personal profile |
|
| 793 | 793 | } |
| 794 | 794 | $identity = $std_identity; unset($identity['ident_id']); |
| 795 | 795 | $identity['ident_realname'] = $std_identity['ident_realname'].' ('.$row['fm_description'].')'; |
@@ -798,7 +798,7 @@ discard block |
||
| 798 | 798 | $db->insert('egw_ea_identities', $identity, false, __LINE__, __FILE__, 'emailadmin'); |
| 799 | 799 | } |
| 800 | 800 | } |
| 801 | - catch(Exception $e) { |
|
| 801 | + catch (Exception $e) { |
|
| 802 | 802 | // ignore all errors, eg. because FMail is not installed |
| 803 | 803 | echo "<p>".$e->getMessage()."</p>\n"; |
| 804 | 804 | } |
@@ -808,17 +808,17 @@ discard block |
||
| 808 | 808 | |
| 809 | 809 | function emailadmin_upgrade1_9_015() |
| 810 | 810 | { |
| 811 | - $GLOBALS['egw_setup']->oProc->AddColumn('egw_ea_accounts','acc_folder_junk',array( |
|
| 811 | + $GLOBALS['egw_setup']->oProc->AddColumn('egw_ea_accounts', 'acc_folder_junk', array( |
|
| 812 | 812 | 'type' => 'varchar', |
| 813 | 813 | 'precision' => '128', |
| 814 | 814 | 'comment' => 'junk folder' |
| 815 | 815 | )); |
| 816 | - $GLOBALS['egw_setup']->oProc->AddColumn('egw_ea_accounts','acc_imap_default_quota',array( |
|
| 816 | + $GLOBALS['egw_setup']->oProc->AddColumn('egw_ea_accounts', 'acc_imap_default_quota', array( |
|
| 817 | 817 | 'type' => 'int', |
| 818 | 818 | 'precision' => '4', |
| 819 | 819 | 'comment' => 'default quota, if no user specific one set' |
| 820 | 820 | )); |
| 821 | - $GLOBALS['egw_setup']->oProc->AddColumn('egw_ea_accounts','acc_imap_timeout',array( |
|
| 821 | + $GLOBALS['egw_setup']->oProc->AddColumn('egw_ea_accounts', 'acc_imap_timeout', array( |
|
| 822 | 822 | 'type' => 'int', |
| 823 | 823 | 'precision' => '2', |
| 824 | 824 | 'comment' => 'timeout for imap connection' |
@@ -830,7 +830,7 @@ discard block |
||
| 830 | 830 | |
| 831 | 831 | function emailadmin_upgrade1_9_016() |
| 832 | 832 | { |
| 833 | - $GLOBALS['egw_setup']->oProc->AddColumn('egw_ea_identities','ident_name',array( |
|
| 833 | + $GLOBALS['egw_setup']->oProc->AddColumn('egw_ea_identities', 'ident_name', array( |
|
| 834 | 834 | 'type' => 'varchar', |
| 835 | 835 | 'precision' => '128', |
| 836 | 836 | 'comment' => 'name of identity to display' |
@@ -842,16 +842,16 @@ discard block |
||
| 842 | 842 | |
| 843 | 843 | function emailadmin_upgrade1_9_017() |
| 844 | 844 | { |
| 845 | - $GLOBALS['egw_setup']->oProc->CreateTable('egw_ea_notifications',array( |
|
| 845 | + $GLOBALS['egw_setup']->oProc->CreateTable('egw_ea_notifications', array( |
|
| 846 | 846 | 'fd' => array( |
| 847 | - 'notif_id' => array('type' => 'auto','nullable' => False), |
|
| 848 | - 'acc_id' => array('type' => 'int','precision' => '4','nullable' => False,'comment' => 'mail account'), |
|
| 849 | - 'account_id' => array('type' => 'int','meta' => 'user','precision' => '4','nullable' => False,'comment' => 'user account'), |
|
| 850 | - 'notif_folder' => array('type' => 'varchar','precision' => '255','nullable' => False,'comment' => 'folder name') |
|
| 847 | + 'notif_id' => array('type' => 'auto', 'nullable' => False), |
|
| 848 | + 'acc_id' => array('type' => 'int', 'precision' => '4', 'nullable' => False, 'comment' => 'mail account'), |
|
| 849 | + 'account_id' => array('type' => 'int', 'meta' => 'user', 'precision' => '4', 'nullable' => False, 'comment' => 'user account'), |
|
| 850 | + 'notif_folder' => array('type' => 'varchar', 'precision' => '255', 'nullable' => False, 'comment' => 'folder name') |
|
| 851 | 851 | ), |
| 852 | 852 | 'pk' => array('notif_id'), |
| 853 | 853 | 'fk' => array(), |
| 854 | - 'ix' => array(array('account_id','acc_id')), |
|
| 854 | + 'ix' => array(array('account_id', 'acc_id')), |
|
| 855 | 855 | 'uc' => array() |
| 856 | 856 | )); |
| 857 | 857 | |
@@ -861,13 +861,13 @@ discard block |
||
| 861 | 861 | |
| 862 | 862 | function emailadmin_upgrade1_9_018() |
| 863 | 863 | { |
| 864 | - $GLOBALS['egw_setup']->oProc->AlterColumn('egw_ea_accounts','acc_smtp_type',array( |
|
| 864 | + $GLOBALS['egw_setup']->oProc->AlterColumn('egw_ea_accounts', 'acc_smtp_type', array( |
|
| 865 | 865 | 'type' => 'varchar', |
| 866 | 866 | 'precision' => '32', |
| 867 | 867 | 'default' => 'emailadmin_smtp', |
| 868 | 868 | 'comment' => 'smtp class to use' |
| 869 | 869 | )); |
| 870 | - $GLOBALS['egw_setup']->oProc->AlterColumn('egw_ea_accounts','acc_imap_type',array( |
|
| 870 | + $GLOBALS['egw_setup']->oProc->AlterColumn('egw_ea_accounts', 'acc_imap_type', array( |
|
| 871 | 871 | 'type' => 'varchar', |
| 872 | 872 | 'precision' => '32', |
| 873 | 873 | 'default' => 'emailadmin_imap', |
@@ -886,15 +886,15 @@ discard block |
||
| 886 | 886 | |
| 887 | 887 | function emailadmin_upgrade14_1() |
| 888 | 888 | { |
| 889 | - $GLOBALS['egw_setup']->oProc->RefreshTable('egw_ea_valid',array( |
|
| 889 | + $GLOBALS['egw_setup']->oProc->RefreshTable('egw_ea_valid', array( |
|
| 890 | 890 | 'fd' => array( |
| 891 | - 'acc_id' => array('type' => 'int','precision' => '4','nullable' => False), |
|
| 892 | - 'account_id' => array('type' => 'int','meta' => 'account','precision' => '4','nullable' => False) |
|
| 891 | + 'acc_id' => array('type' => 'int', 'precision' => '4', 'nullable' => False), |
|
| 892 | + 'account_id' => array('type' => 'int', 'meta' => 'account', 'precision' => '4', 'nullable' => False) |
|
| 893 | 893 | ), |
| 894 | 894 | 'pk' => array(), |
| 895 | 895 | 'fk' => array(), |
| 896 | - 'ix' => array(array('account_id','acc_id')), |
|
| 897 | - 'uc' => array(array('acc_id','account_id')) |
|
| 896 | + 'ix' => array(array('account_id', 'acc_id')), |
|
| 897 | + 'uc' => array(array('acc_id', 'account_id')) |
|
| 898 | 898 | )); |
| 899 | 899 | |
| 900 | 900 | return $GLOBALS['setup_info']['emailadmin']['currentver'] = '14.2'; |
@@ -902,7 +902,7 @@ discard block |
||
| 902 | 902 | |
| 903 | 903 | function emailadmin_upgrade14_2() |
| 904 | 904 | { |
| 905 | - $GLOBALS['egw_setup']->oProc->AlterColumn('egw_mailaccounts','mail_value',array( |
|
| 905 | + $GLOBALS['egw_setup']->oProc->AlterColumn('egw_mailaccounts', 'mail_value', array( |
|
| 906 | 906 | 'type' => 'ascii', |
| 907 | 907 | 'precision' => '128', |
| 908 | 908 | 'nullable' => False, |
@@ -915,30 +915,30 @@ discard block |
||
| 915 | 915 | |
| 916 | 916 | function emailadmin_upgrade14_2_001() |
| 917 | 917 | { |
| 918 | - $GLOBALS['egw_setup']->oProc->AlterColumn('egw_ea_accounts','acc_imap_host',array( |
|
| 918 | + $GLOBALS['egw_setup']->oProc->AlterColumn('egw_ea_accounts', 'acc_imap_host', array( |
|
| 919 | 919 | 'type' => 'ascii', |
| 920 | 920 | 'precision' => '128', |
| 921 | 921 | 'nullable' => False, |
| 922 | 922 | 'comment' => 'imap hostname' |
| 923 | 923 | )); |
| 924 | - $GLOBALS['egw_setup']->oProc->AlterColumn('egw_ea_accounts','acc_sieve_host',array( |
|
| 924 | + $GLOBALS['egw_setup']->oProc->AlterColumn('egw_ea_accounts', 'acc_sieve_host', array( |
|
| 925 | 925 | 'type' => 'ascii', |
| 926 | 926 | 'precision' => '128', |
| 927 | 927 | 'comment' => 'sieve host, default imap_host' |
| 928 | 928 | )); |
| 929 | - $GLOBALS['egw_setup']->oProc->AlterColumn('egw_ea_accounts','acc_smtp_type',array( |
|
| 929 | + $GLOBALS['egw_setup']->oProc->AlterColumn('egw_ea_accounts', 'acc_smtp_type', array( |
|
| 930 | 930 | 'type' => 'ascii', |
| 931 | 931 | 'precision' => '32', |
| 932 | 932 | 'default' => 'emailadmin_smtp', |
| 933 | 933 | 'comment' => 'smtp class to use' |
| 934 | 934 | )); |
| 935 | - $GLOBALS['egw_setup']->oProc->AlterColumn('egw_ea_accounts','acc_imap_type',array( |
|
| 935 | + $GLOBALS['egw_setup']->oProc->AlterColumn('egw_ea_accounts', 'acc_imap_type', array( |
|
| 936 | 936 | 'type' => 'ascii', |
| 937 | 937 | 'precision' => '32', |
| 938 | 938 | 'default' => 'emailadmin_imap', |
| 939 | 939 | 'comment' => 'imap class to use' |
| 940 | 940 | )); |
| 941 | - $GLOBALS['egw_setup']->oProc->AlterColumn('egw_ea_accounts','acc_imap_logintype',array( |
|
| 941 | + $GLOBALS['egw_setup']->oProc->AlterColumn('egw_ea_accounts', 'acc_imap_logintype', array( |
|
| 942 | 942 | 'type' => 'ascii', |
| 943 | 943 | 'precision' => '20', |
| 944 | 944 | 'comment' => 'standard, vmailmgr, admin, uidNumber' |
@@ -954,7 +954,7 @@ discard block |
||
| 954 | 954 | */ |
| 955 | 955 | function emailadmin_upgrade14_3() |
| 956 | 956 | { |
| 957 | - $GLOBALS['egw_setup']->oProc->AddColumn('egw_ea_accounts','acc_user_forward',array( |
|
| 957 | + $GLOBALS['egw_setup']->oProc->AddColumn('egw_ea_accounts', 'acc_user_forward', array( |
|
| 958 | 958 | 'type' => 'bool', |
| 959 | 959 | 'default' => '0', |
| 960 | 960 | 'comment' => 'allow user to define forwards' |
@@ -27,12 +27,12 @@ discard block |
||
| 27 | 27 | { |
| 28 | 28 | $setup_info = array(); |
| 29 | 29 | $d = dir(EGW_SERVER_ROOT); |
| 30 | - while($entry=$d->read()) |
|
| 30 | + while ($entry = $d->read()) |
|
| 31 | 31 | { |
| 32 | - if($entry != ".." && $entry != 'setup' && is_dir(EGW_SERVER_ROOT . '/' . $entry)) |
|
| 32 | + if ($entry != ".." && $entry != 'setup' && is_dir(EGW_SERVER_ROOT.'/'.$entry)) |
|
| 33 | 33 | { |
| 34 | - $f = EGW_SERVER_ROOT . '/' . $entry . '/setup/setup.inc.php'; |
|
| 35 | - if (@file_exists ($f)) |
|
| 34 | + $f = EGW_SERVER_ROOT.'/'.$entry.'/setup/setup.inc.php'; |
|
| 35 | + if (@file_exists($f)) |
|
| 36 | 36 | { |
| 37 | 37 | include($f); |
| 38 | 38 | $setup_info[$entry]['filename'] = $f; |
@@ -52,17 +52,17 @@ discard block |
||
| 52 | 52 | * @param array $setup_info |
| 53 | 53 | * @return array $setup_info |
| 54 | 54 | */ |
| 55 | - function get_db_versions($setup_info=null) |
|
| 55 | + function get_db_versions($setup_info = null) |
|
| 56 | 56 | { |
| 57 | 57 | try { // catch DB errors |
| 58 | 58 | $GLOBALS['egw_setup']->set_table_names(); |
| 59 | 59 | |
| 60 | - if($GLOBALS['egw_setup']->table_exist(array($GLOBALS['egw_setup']->applications_table),true)) |
|
| 60 | + if ($GLOBALS['egw_setup']->table_exist(array($GLOBALS['egw_setup']->applications_table), true)) |
|
| 61 | 61 | { |
| 62 | 62 | /* one of these tables exists. checking for post/pre beta version */ |
| 63 | - if($GLOBALS['egw_setup']->applications_table != 'applications') |
|
| 63 | + if ($GLOBALS['egw_setup']->applications_table != 'applications') |
|
| 64 | 64 | { |
| 65 | - foreach($GLOBALS['egw_setup']->db->select($GLOBALS['egw_setup']->applications_table,'*',false,__LINE__,__FILE__) as $row) |
|
| 65 | + foreach ($GLOBALS['egw_setup']->db->select($GLOBALS['egw_setup']->applications_table, '*', false, __LINE__, __FILE__) as $row) |
|
| 66 | 66 | { |
| 67 | 67 | $app = $row['app_name']; |
| 68 | 68 | if (!isset($setup_info[$app])) // app source no longer there |
@@ -82,7 +82,7 @@ discard block |
||
| 82 | 82 | { |
| 83 | 83 | // new api, dont care about old pre egroupware stuff |
| 84 | 84 | } |
| 85 | - elseif(!@$setup_info['phpgwapi']['currentver']) |
|
| 85 | + elseif (!@$setup_info['phpgwapi']['currentver']) |
|
| 86 | 86 | { |
| 87 | 87 | $setup_info['phpgwapi']['currentver'] = $setup_info['admin']['currentver']; |
| 88 | 88 | $setup_info['phpgwapi']['version'] = $setup_info['admin']['currentver']; |
@@ -101,9 +101,9 @@ discard block |
||
| 101 | 101 | } |
| 102 | 102 | else |
| 103 | 103 | { |
| 104 | - foreach($GLOBALS['egw_setup']->db->query('select * from applications') as $row) |
|
| 104 | + foreach ($GLOBALS['egw_setup']->db->query('select * from applications') as $row) |
|
| 105 | 105 | { |
| 106 | - if($row['app_name'] == 'admin') |
|
| 106 | + if ($row['app_name'] == 'admin') |
|
| 107 | 107 | { |
| 108 | 108 | $setup_info['phpgwapi']['currentver'] = $row['app_version']; |
| 109 | 109 | } |
@@ -136,25 +136,25 @@ discard block |
||
| 136 | 136 | * V Version mismatch at end of upgrade (Not used, proposed only) |
| 137 | 137 | * M Missing files at start of upgrade (Not used, proposed only) |
| 138 | 138 | */ |
| 139 | - function compare_versions($setup_info,$try_downgrade=false) |
|
| 139 | + function compare_versions($setup_info, $try_downgrade = false) |
|
| 140 | 140 | { |
| 141 | - foreach($setup_info as $key => $value) |
|
| 141 | + foreach ($setup_info as $key => $value) |
|
| 142 | 142 | { |
| 143 | 143 | //echo '<br>'.$value['name'].'STATUS: '.$value['status']; |
| 144 | 144 | /* Only set this if it has not already failed to upgrade - Milosch */ |
| 145 | - if(!( (@$value['status'] == 'F') || (@$value['status'] == 'C') )) |
|
| 145 | + if (!((@$value['status'] == 'F') || (@$value['status'] == 'C'))) |
|
| 146 | 146 | { |
| 147 | 147 | //if ($setup_info[$key]['currentver'] > $setup_info[$key]['version']) |
| 148 | - if(!$try_downgrade && $GLOBALS['egw_setup']->amorethanb($value['currentver'],@$value['version']) || |
|
| 148 | + if (!$try_downgrade && $GLOBALS['egw_setup']->amorethanb($value['currentver'], @$value['version']) || |
|
| 149 | 149 | $value['version'] == 'deleted') |
| 150 | 150 | { |
| 151 | 151 | $setup_info[$key]['status'] = 'V'; |
| 152 | 152 | } |
| 153 | - elseif(@$value['currentver'] == @$value['version']) |
|
| 153 | + elseif (@$value['currentver'] == @$value['version']) |
|
| 154 | 154 | { |
| 155 | 155 | $setup_info[$key]['status'] = 'C'; |
| 156 | 156 | } |
| 157 | - elseif($GLOBALS['egw_setup']->alessthanb(@$value['currentver'],@$value['version'])) |
|
| 157 | + elseif ($GLOBALS['egw_setup']->alessthanb(@$value['currentver'], @$value['version'])) |
|
| 158 | 158 | { |
| 159 | 159 | $setup_info[$key]['status'] = 'U'; |
| 160 | 160 | } |
@@ -171,35 +171,35 @@ discard block |
||
| 171 | 171 | function check_depends($setup_info) |
| 172 | 172 | { |
| 173 | 173 | /* Run the list of apps */ |
| 174 | - foreach($setup_info as $key => $value) |
|
| 174 | + foreach ($setup_info as $key => $value) |
|
| 175 | 175 | { |
| 176 | 176 | /* Does this app have any depends */ |
| 177 | - if(isset($value['depends'])) |
|
| 177 | + if (isset($value['depends'])) |
|
| 178 | 178 | { |
| 179 | 179 | /* If so find out which apps it depends on */ |
| 180 | - foreach($value['depends'] as $depkey => $depvalue) |
|
| 180 | + foreach ($value['depends'] as $depkey => $depvalue) |
|
| 181 | 181 | { |
| 182 | 182 | /* I set this to False until we find a compatible version of this app */ |
| 183 | 183 | $setup_info['depends'][$depkey]['status'] = False; |
| 184 | 184 | /* Now we loop thru the versions looking for a compatible version */ |
| 185 | 185 | |
| 186 | - foreach($depvalue['versions'] as $depsvalue) |
|
| 186 | + foreach ($depvalue['versions'] as $depsvalue) |
|
| 187 | 187 | { |
| 188 | 188 | $currentver = $setup_info[$depvalue['appname']]['currentver']; |
| 189 | - if ($depvalue['appname'] == 'phpgwapi' && substr($currentver,0,6) == '0.9.99') |
|
| 189 | + if ($depvalue['appname'] == 'phpgwapi' && substr($currentver, 0, 6) == '0.9.99') |
|
| 190 | 190 | { |
| 191 | 191 | $currentver = '0.9.14.508'; |
| 192 | 192 | } |
| 193 | 193 | $major = $GLOBALS['egw_setup']->get_major($currentver); |
| 194 | - if ($major >= $depsvalue || $major == $depsvalue && substr($major,0,strlen($depsvalue)+1) == $depsvalue.'.') |
|
| 194 | + if ($major >= $depsvalue || $major == $depsvalue && substr($major, 0, strlen($depsvalue) + 1) == $depsvalue.'.') |
|
| 195 | 195 | { |
| 196 | 196 | $setup_info['depends'][$depkey]['status'] = True; |
| 197 | 197 | } |
| 198 | 198 | else // check if majors are equal and minors greater or equal |
| 199 | 199 | { |
| 200 | 200 | $major_depsvalue = $GLOBALS['egw_setup']->get_major($depsvalue); |
| 201 | - $tmp = explode('.',$depsvalue); $minor_depsvalue = array_pop($tmp); |
|
| 202 | - $tmp2 = explode('.',$currentver); $minor = array_pop($tmp2); |
|
| 201 | + $tmp = explode('.', $depsvalue); $minor_depsvalue = array_pop($tmp); |
|
| 202 | + $tmp2 = explode('.', $currentver); $minor = array_pop($tmp2); |
|
| 203 | 203 | if ($major == $major_depsvalue && $minor <= $minor_depsvalue) |
| 204 | 204 | { |
| 205 | 205 | $setup_info['depends'][$depkey]['status'] = True; |
@@ -212,17 +212,17 @@ discard block |
||
| 212 | 212 | Finally, we loop through the dependencies again to look for apps that still have a failure status |
| 213 | 213 | If we find one, we set the apps overall status as a dependency failure. |
| 214 | 214 | */ |
| 215 | - foreach($value['depends'] as $depkey => $depvalue) |
|
| 215 | + foreach ($value['depends'] as $depkey => $depvalue) |
|
| 216 | 216 | { |
| 217 | 217 | if ($setup_info['depends'][$depkey]['status'] == False) |
| 218 | 218 | { |
| 219 | 219 | /* Only set this if it has not already failed to upgrade - Milosch */ |
| 220 | - if($setup_info[$key]['status'] != 'F')//&& $setup_info[$key]['status'] != 'C') |
|
| 220 | + if ($setup_info[$key]['status'] != 'F')//&& $setup_info[$key]['status'] != 'C') |
|
| 221 | 221 | { |
| 222 | 222 | /* Added check for status U - uninstalled apps carry this flag (upgrade from nothing == install). |
| 223 | 223 | * This should fix apps showing post-install dep failure when they are not yet installed. |
| 224 | 224 | */ |
| 225 | - if($setup_info[$key]['status'] == 'C' || $setup_info[$key]['status'] == 'U') |
|
| 225 | + if ($setup_info[$key]['status'] == 'C' || $setup_info[$key]['status'] == 'U') |
|
| 226 | 226 | { |
| 227 | 227 | $setup_info[$key]['status'] = 'D'; |
| 228 | 228 | } |
@@ -244,9 +244,9 @@ discard block |
||
| 244 | 244 | */ |
| 245 | 245 | function upgrade_exclude($setup_info) |
| 246 | 246 | { |
| 247 | - foreach($setup_info as $key => $value) |
|
| 247 | + foreach ($setup_info as $key => $value) |
|
| 248 | 248 | { |
| 249 | - if(isset($value['no_mass_update'])) |
|
| 249 | + if (isset($value['no_mass_update'])) |
|
| 250 | 250 | { |
| 251 | 251 | unset($setup_info[$key]); |
| 252 | 252 | } |
@@ -261,24 +261,24 @@ discard block |
||
| 261 | 261 | */ |
| 262 | 262 | function check_header() |
| 263 | 263 | { |
| 264 | - if(!file_exists(EGW_SERVER_ROOT.'/header.inc.php') || filesize(EGW_SERVER_ROOT.'/header.inc.php') < 200) |
|
| 264 | + if (!file_exists(EGW_SERVER_ROOT.'/header.inc.php') || filesize(EGW_SERVER_ROOT.'/header.inc.php') < 200) |
|
| 265 | 265 | { |
| 266 | 266 | $GLOBALS['egw_info']['setup']['header_msg'] = 'Stage One'; |
| 267 | 267 | return '1'; |
| 268 | 268 | } |
| 269 | 269 | else |
| 270 | 270 | { |
| 271 | - if(!@isset($GLOBALS['egw_info']['server']['header_admin_password'])) |
|
| 271 | + if (!@isset($GLOBALS['egw_info']['server']['header_admin_password'])) |
|
| 272 | 272 | { |
| 273 | 273 | $GLOBALS['egw_info']['setup']['header_msg'] = 'Stage One (No header admin password set)'; |
| 274 | 274 | return '2'; |
| 275 | 275 | } |
| 276 | - elseif(!@isset($GLOBALS['egw_domain'])) |
|
| 276 | + elseif (!@isset($GLOBALS['egw_domain'])) |
|
| 277 | 277 | { |
| 278 | 278 | $GLOBALS['egw_info']['setup']['header_msg'] = 'Stage One (Add domains to your header.inc.php)'; |
| 279 | 279 | return '3'; |
| 280 | 280 | } |
| 281 | - elseif(@$GLOBALS['egw_info']['server']['versions']['header'] != @$GLOBALS['egw_info']['server']['versions']['current_header']) |
|
| 281 | + elseif (@$GLOBALS['egw_info']['server']['versions']['header'] != @$GLOBALS['egw_info']['server']['versions']['current_header']) |
|
| 282 | 282 | { |
| 283 | 283 | $GLOBALS['egw_info']['setup']['header_msg'] = 'Stage One (Upgrade your header.inc.php)'; |
| 284 | 284 | return '4'; |
@@ -295,7 +295,7 @@ discard block |
||
| 295 | 295 | * @param array $setup_info =null default use $GLOBALS['setup_info'] |
| 296 | 296 | * @return int 1=no database, 3=empty, 4=need upgrade, 10=complete |
| 297 | 297 | */ |
| 298 | - function check_db($setup_info=null) |
|
| 298 | + function check_db($setup_info = null) |
|
| 299 | 299 | { |
| 300 | 300 | if (!$setup_info) $setup_info = $GLOBALS['setup_info']; |
| 301 | 301 | |
@@ -303,14 +303,14 @@ discard block |
||
| 303 | 303 | if (!$GLOBALS['egw_setup']->db->Link_ID) |
| 304 | 304 | { |
| 305 | 305 | $old = error_reporting(); |
| 306 | - error_reporting($old & ~E_WARNING); // no warnings |
|
| 306 | + error_reporting($old&~E_WARNING); // no warnings |
|
| 307 | 307 | $GLOBALS['egw_setup']->db->connect(); |
| 308 | 308 | error_reporting($old); |
| 309 | 309 | |
| 310 | 310 | $GLOBALS['egw_setup']->set_table_names(); |
| 311 | 311 | } |
| 312 | 312 | } |
| 313 | - catch(Api\Db\Exception $e) { |
|
| 313 | + catch (Api\Db\Exception $e) { |
|
| 314 | 314 | // ignore error |
| 315 | 315 | } |
| 316 | 316 | |
@@ -319,14 +319,14 @@ discard block |
||
| 319 | 319 | $GLOBALS['egw_info']['setup']['header_msg'] = 'Stage 1 (Create Database)'; |
| 320 | 320 | return 1; |
| 321 | 321 | } |
| 322 | - if(!isset($setup_info['api']['currentver'])) |
|
| 322 | + if (!isset($setup_info['api']['currentver'])) |
|
| 323 | 323 | { |
| 324 | 324 | $setup_info = $this->get_db_versions($setup_info); |
| 325 | 325 | } |
| 326 | 326 | // first check new api installed and up to date |
| 327 | 327 | if (isset($setup_info['api']['currentver'])) |
| 328 | 328 | { |
| 329 | - if($setup_info['api']['currentver'] == $setup_info['api']['version']) |
|
| 329 | + if ($setup_info['api']['currentver'] == $setup_info['api']['version']) |
|
| 330 | 330 | { |
| 331 | 331 | $GLOBALS['egw_info']['setup']['header_msg'] = 'Stage 1 (Tables Complete)'; |
| 332 | 332 | return 10; |
@@ -340,7 +340,7 @@ discard block |
||
| 340 | 340 | // then check old phpgwapi |
| 341 | 341 | elseif (isset($setup_info['phpgwapi']['currentver'])) |
| 342 | 342 | { |
| 343 | - if($setup_info['phpgwapi']['currentver'] == $setup_info['phpgwapi']['version']) |
|
| 343 | + if ($setup_info['phpgwapi']['currentver'] == $setup_info['phpgwapi']['version']) |
|
| 344 | 344 | { |
| 345 | 345 | $GLOBALS['egw_info']['setup']['header_msg'] = 'Stage 1 (Tables Complete)'; |
| 346 | 346 | return 10; |
@@ -375,14 +375,14 @@ discard block |
||
| 375 | 375 | */ |
| 376 | 376 | function check_config() |
| 377 | 377 | { |
| 378 | - if(@$GLOBALS['egw_info']['setup']['stage']['db'] != 10) |
|
| 378 | + if (@$GLOBALS['egw_info']['setup']['stage']['db'] != 10) |
|
| 379 | 379 | { |
| 380 | 380 | return ''; |
| 381 | 381 | } |
| 382 | 382 | |
| 383 | 383 | try { // catch db errors |
| 384 | - foreach($GLOBALS['egw_setup']->db->select($GLOBALS['egw_setup']->config_table, |
|
| 385 | - 'config_name,config_value',array('config_app' => 'phpgwapi'),__LINE__,__FILE__) as $row) |
|
| 384 | + foreach ($GLOBALS['egw_setup']->db->select($GLOBALS['egw_setup']->config_table, |
|
| 385 | + 'config_name,config_value', array('config_app' => 'phpgwapi'), __LINE__, __FILE__) as $row) |
|
| 386 | 386 | { |
| 387 | 387 | $config[$row['config_name']] = $row['config_value']; |
| 388 | 388 | } |
@@ -392,21 +392,21 @@ discard block |
||
| 392 | 392 | // ignore db errors |
| 393 | 393 | } |
| 394 | 394 | $GLOBALS['egw_info']['setup']['header_msg'] = 'Stage 2 (Needs Configuration)'; |
| 395 | - if(!count($config)) |
|
| 395 | + if (!count($config)) |
|
| 396 | 396 | { |
| 397 | 397 | return 1; |
| 398 | 398 | } |
| 399 | - $config_errors =& $GLOBALS['egw_info']['setup']['config_errors']; |
|
| 399 | + $config_errors = & $GLOBALS['egw_info']['setup']['config_errors']; |
|
| 400 | 400 | $GLOBALS['egw_info']['setup']['config_errors'] = array(); |
| 401 | 401 | $error_msg = null; |
| 402 | - if (!$this->check_dir($config['temp_dir'],$error_msg)) |
|
| 402 | + if (!$this->check_dir($config['temp_dir'], $error_msg)) |
|
| 403 | 403 | { |
| 404 | - $config_errors[] = lang("Your temporary directory '%1' %2",$config['temp_dir'],$error_msg); |
|
| 404 | + $config_errors[] = lang("Your temporary directory '%1' %2", $config['temp_dir'], $error_msg); |
|
| 405 | 405 | } |
| 406 | 406 | |
| 407 | - if (!$this->check_dir($config['files_dir'],$error_msg,true)) |
|
| 407 | + if (!$this->check_dir($config['files_dir'], $error_msg, true)) |
|
| 408 | 408 | { |
| 409 | - $config_errors[] = lang("Your files directory '%1' %2",$config['files_dir'],$error_msg); |
|
| 409 | + $config_errors[] = lang("Your files directory '%1' %2", $config['files_dir'], $error_msg); |
|
| 410 | 410 | } |
| 411 | 411 | // set and create the default backup_dir |
| 412 | 412 | if (@is_writeable($config['files_dir']) && empty($config['backup_dir'])) |
@@ -414,35 +414,35 @@ discard block |
||
| 414 | 414 | $config['backup_dir'] = $config['files_dir'].'/db_backup'; |
| 415 | 415 | if (!is_dir($config['backup_dir']) && mkdir($config['backup_dir'])) |
| 416 | 416 | { |
| 417 | - $GLOBALS['egw_setup']->db->insert($GLOBALS['egw_setup']->config_table,array( |
|
| 417 | + $GLOBALS['egw_setup']->db->insert($GLOBALS['egw_setup']->config_table, array( |
|
| 418 | 418 | 'config_value' => $config['backup_dir'], |
| 419 | - ),array( |
|
| 419 | + ), array( |
|
| 420 | 420 | 'config_app' => 'phpgwapi', |
| 421 | 421 | 'config_name' => 'backup_dir', |
| 422 | - ),__LINE__,__FILE__); |
|
| 422 | + ), __LINE__, __FILE__); |
|
| 423 | 423 | } |
| 424 | 424 | } |
| 425 | 425 | if (isset($config['backup_mincount'])) |
| 426 | 426 | { |
| 427 | - $GLOBALS['egw_setup']->db->insert($GLOBALS['egw_setup']->config_table,array( |
|
| 427 | + $GLOBALS['egw_setup']->db->insert($GLOBALS['egw_setup']->config_table, array( |
|
| 428 | 428 | 'config_value' => $config['backup_mincount'], |
| 429 | - ),array( |
|
| 429 | + ), array( |
|
| 430 | 430 | 'config_app' => 'phpgwapi', |
| 431 | 431 | 'config_name' => 'backup_mincount', |
| 432 | - ),__LINE__,__FILE__); |
|
| 432 | + ), __LINE__, __FILE__); |
|
| 433 | 433 | } |
| 434 | 434 | if (isset($config['backup_files'])) |
| 435 | 435 | { |
| 436 | - $GLOBALS['egw_setup']->db->insert($GLOBALS['egw_setup']->config_table,array( |
|
| 436 | + $GLOBALS['egw_setup']->db->insert($GLOBALS['egw_setup']->config_table, array( |
|
| 437 | 437 | 'config_value' => (int)$config['backup_files'], |
| 438 | - ),array( |
|
| 438 | + ), array( |
|
| 439 | 439 | 'config_app' => 'phpgwapi', |
| 440 | 440 | 'config_name' => 'backup_files', |
| 441 | - ),__LINE__,__FILE__); |
|
| 441 | + ), __LINE__, __FILE__); |
|
| 442 | 442 | } |
| 443 | - if (!$this->check_dir($config['backup_dir'],$error_msg,true)) |
|
| 443 | + if (!$this->check_dir($config['backup_dir'], $error_msg, true)) |
|
| 444 | 444 | { |
| 445 | - $config_errors[] = lang("Your backup directory '%1' %2",$config['backup_dir'],$error_msg); |
|
| 445 | + $config_errors[] = lang("Your backup directory '%1' %2", $config['backup_dir'], $error_msg); |
|
| 446 | 446 | } |
| 447 | 447 | if ($config_errors) |
| 448 | 448 | { |
@@ -458,19 +458,19 @@ discard block |
||
| 458 | 458 | * @param $appname |
| 459 | 459 | * @param $any optional, set to True to see if any of the apps tables are installed |
| 460 | 460 | */ |
| 461 | - function check_app_tables($appname,$any=False) |
|
| 461 | + function check_app_tables($appname, $any = False) |
|
| 462 | 462 | { |
| 463 | 463 | $none = 0; |
| 464 | 464 | $setup_info = $GLOBALS['setup_info']; |
| 465 | 465 | |
| 466 | - if(@$setup_info[$appname]['tables']) |
|
| 466 | + if (@$setup_info[$appname]['tables']) |
|
| 467 | 467 | { |
| 468 | 468 | /* Make a copy, else we send some callers into an infinite loop */ |
| 469 | 469 | $copy = $setup_info; |
| 470 | 470 | $tables = Array(); |
| 471 | 471 | try { |
| 472 | 472 | $table_names = $GLOBALS['egw_setup']->db->table_names(); |
| 473 | - foreach($table_names as $key => $val) |
|
| 473 | + foreach ($table_names as $key => $val) |
|
| 474 | 474 | { |
| 475 | 475 | $tables[] = $val['table_name']; |
| 476 | 476 | } |
@@ -479,19 +479,19 @@ discard block |
||
| 479 | 479 | unset($e); |
| 480 | 480 | // ignore db error |
| 481 | 481 | } |
| 482 | - foreach($copy[$appname]['tables'] as $key => $val) |
|
| 482 | + foreach ($copy[$appname]['tables'] as $key => $val) |
|
| 483 | 483 | { |
| 484 | - if($GLOBALS['DEBUG']) |
|
| 484 | + if ($GLOBALS['DEBUG']) |
|
| 485 | 485 | { |
| 486 | - echo '<br>check_app_tables(): Checking: ' . $appname . ',table: ' . $val; |
|
| 486 | + echo '<br>check_app_tables(): Checking: '.$appname.',table: '.$val; |
|
| 487 | 487 | } |
| 488 | - if(!in_array($val,$tables) && !in_array(strtolower($val),$tables)) // names in tables might be lowercase |
|
| 488 | + if (!in_array($val, $tables) && !in_array(strtolower($val), $tables)) // names in tables might be lowercase |
|
| 489 | 489 | { |
| 490 | - if($GLOBALS['DEBUG']) |
|
| 490 | + if ($GLOBALS['DEBUG']) |
|
| 491 | 491 | { |
| 492 | - echo '<br>check_app_tables(): ' . $val . ' missing!'; |
|
| 492 | + echo '<br>check_app_tables(): '.$val.' missing!'; |
|
| 493 | 493 | } |
| 494 | - if(!$any) |
|
| 494 | + if (!$any) |
|
| 495 | 495 | { |
| 496 | 496 | return False; |
| 497 | 497 | } |
@@ -502,9 +502,9 @@ discard block |
||
| 502 | 502 | } |
| 503 | 503 | else |
| 504 | 504 | { |
| 505 | - if($any) |
|
| 505 | + if ($any) |
|
| 506 | 506 | { |
| 507 | - if($GLOBALS['DEBUG']) |
|
| 507 | + if ($GLOBALS['DEBUG']) |
|
| 508 | 508 | { |
| 509 | 509 | echo '<br>check_app_tables(): Some tables installed'; |
| 510 | 510 | } |
@@ -513,9 +513,9 @@ discard block |
||
| 513 | 513 | } |
| 514 | 514 | } |
| 515 | 515 | } |
| 516 | - if($none && $any) |
|
| 516 | + if ($none && $any) |
|
| 517 | 517 | { |
| 518 | - if($GLOBALS['DEBUG']) |
|
| 518 | + if ($GLOBALS['DEBUG']) |
|
| 519 | 519 | { |
| 520 | 520 | echo '<br>check_app_tables(): No tables installed'; |
| 521 | 521 | } |
@@ -523,7 +523,7 @@ discard block |
||
| 523 | 523 | } |
| 524 | 524 | else |
| 525 | 525 | { |
| 526 | - if($GLOBALS['DEBUG']) |
|
| 526 | + if ($GLOBALS['DEBUG']) |
|
| 527 | 527 | { |
| 528 | 528 | echo '<br>check_app_tables(): All tables installed'; |
| 529 | 529 | } |
@@ -539,9 +539,9 @@ discard block |
||
| 539 | 539 | * @param boolean $check_in_docroot =false run an optional in docroot check |
| 540 | 540 | * @return boolean |
| 541 | 541 | */ |
| 542 | - static function check_dir($dir,&$msg,$check_in_docroot=false) |
|
| 542 | + static function check_dir($dir, &$msg, $check_in_docroot = false) |
|
| 543 | 543 | { |
| 544 | - if (!@is_dir($dir) && !@mkdir($dir,0700,true)) |
|
| 544 | + if (!@is_dir($dir) && !@mkdir($dir, 0700, true)) |
|
| 545 | 545 | { |
| 546 | 546 | $msg = lang('does not exist'); |
| 547 | 547 | return false; |
@@ -553,16 +553,16 @@ discard block |
||
| 553 | 553 | } |
| 554 | 554 | if ($check_in_docroot) |
| 555 | 555 | { |
| 556 | - $docroots = array(realpath(EGW_SERVER_ROOT),realpath($_SERVER['DOCUMENT_ROOT'])); |
|
| 556 | + $docroots = array(realpath(EGW_SERVER_ROOT), realpath($_SERVER['DOCUMENT_ROOT'])); |
|
| 557 | 557 | $dir = realpath($dir); |
| 558 | 558 | |
| 559 | 559 | foreach ($docroots as $docroot) |
| 560 | 560 | { |
| 561 | 561 | $len = strlen($docroot); |
| 562 | 562 | |
| 563 | - if ($docroot == substr($dir,0,$len) && $len>0) |
|
| 563 | + if ($docroot == substr($dir, 0, $len) && $len > 0) |
|
| 564 | 564 | { |
| 565 | - $rest = substr($dir,$len); |
|
| 565 | + $rest = substr($dir, $len); |
|
| 566 | 566 | |
| 567 | 567 | if (!strlen($rest) || $rest[0] == DIRECTORY_SEPARATOR) |
| 568 | 568 | { |