@@ -249,12 +249,12 @@ |
||
249 | 249 | |
250 | 250 | $this->component = Horde_Icalendar::newComponent($type, $this); |
251 | 251 | //error_log(__METHOD__."() this->component = Horde_Icalendar::newComponent('$type', \$this) = ".array2string($this->component)); |
252 | - if ($this->component === false) |
|
253 | - { |
|
254 | - error_log(__METHOD__."() Horde_Icalendar::newComponent('$type', \$this) returned FALSE"); |
|
255 | - return; |
|
256 | - //return PEAR::raiseError("Unable to create object for type $type"); |
|
257 | - } |
|
252 | + if ($this->component === false) |
|
253 | + { |
|
254 | + error_log(__METHOD__."() Horde_Icalendar::newComponent('$type', \$this) returned FALSE"); |
|
255 | + return; |
|
256 | + //return PEAR::raiseError("Unable to create object for type $type"); |
|
257 | + } |
|
258 | 258 | if ($this->charset && $this->charset != 'utf-8') |
259 | 259 | { |
260 | 260 | $data = Api\Translation::convert($data, $this->charset, 'utf-8'); |
@@ -738,12 +738,12 @@ discard block |
||
738 | 738 | } |
739 | 739 | |
740 | 740 | /** |
741 | - * provides centralization and compatibility to locate the lang files |
|
742 | - * |
|
743 | - * @param string $app application name |
|
744 | - * @param string $lang language code |
|
745 | - * @return the full path of the filename for the requested app and language |
|
746 | - */ |
|
741 | + * provides centralization and compatibility to locate the lang files |
|
742 | + * |
|
743 | + * @param string $app application name |
|
744 | + * @param string $lang language code |
|
745 | + * @return the full path of the filename for the requested app and language |
|
746 | + */ |
|
747 | 747 | static function get_lang_file($app,$lang) |
748 | 748 | { |
749 | 749 | if ($app == 'common') $app = 'phpgwapi'; |
@@ -1074,13 +1074,13 @@ discard block |
||
1074 | 1074 | } |
1075 | 1075 | |
1076 | 1076 | /** |
1077 | - * detect_encoding - try to detect the encoding |
|
1078 | - * only to be used if the string in question has no structure that determines his encoding |
|
1079 | - * |
|
1080 | - * @param string - to be evaluated |
|
1081 | - * @param string $verify =null encoding to verify, get checked first and have a match for only ascii or no detection available |
|
1082 | - * @return string - encoding |
|
1083 | - */ |
|
1077 | + * detect_encoding - try to detect the encoding |
|
1078 | + * only to be used if the string in question has no structure that determines his encoding |
|
1079 | + * |
|
1080 | + * @param string - to be evaluated |
|
1081 | + * @param string $verify =null encoding to verify, get checked first and have a match for only ascii or no detection available |
|
1082 | + * @return string - encoding |
|
1083 | + */ |
|
1084 | 1084 | static function detect_encoding($string, $verify=null) |
1085 | 1085 | { |
1086 | 1086 | if (function_exists('iconv')) |
@@ -80,60 +80,60 @@ discard block |
||
80 | 80 | const MCRYPT_MODE = MCRYPT_MODE_ECB; |
81 | 81 | |
82 | 82 | /** |
83 | - * current user login (account_lid@domain) |
|
84 | - * |
|
85 | - * @var string |
|
86 | - */ |
|
83 | + * current user login (account_lid@domain) |
|
84 | + * |
|
85 | + * @var string |
|
86 | + */ |
|
87 | 87 | var $login; |
88 | 88 | |
89 | 89 | /** |
90 | - * current user password |
|
91 | - * |
|
92 | - * @var string |
|
93 | - */ |
|
90 | + * current user password |
|
91 | + * |
|
92 | + * @var string |
|
93 | + */ |
|
94 | 94 | var $passwd; |
95 | 95 | |
96 | 96 | /** |
97 | - * current user db/ldap account id |
|
98 | - * |
|
99 | - * @var int |
|
100 | - */ |
|
97 | + * current user db/ldap account id |
|
98 | + * |
|
99 | + * @var int |
|
100 | + */ |
|
101 | 101 | var $account_id; |
102 | 102 | |
103 | 103 | /** |
104 | - * current user account login id (without the eGW-domain/-instance part |
|
105 | - * |
|
106 | - * @var string |
|
107 | - */ |
|
104 | + * current user account login id (without the eGW-domain/-instance part |
|
105 | + * |
|
106 | + * @var string |
|
107 | + */ |
|
108 | 108 | var $account_lid; |
109 | 109 | |
110 | 110 | /** |
111 | - * domain for current user |
|
112 | - * |
|
113 | - * @var string |
|
114 | - */ |
|
111 | + * domain for current user |
|
112 | + * |
|
113 | + * @var string |
|
114 | + */ |
|
115 | 115 | var $account_domain; |
116 | 116 | |
117 | 117 | /** |
118 | - * type flag, A - anonymous session, N - None, normal session |
|
119 | - * |
|
120 | - * @var string |
|
121 | - */ |
|
118 | + * type flag, A - anonymous session, N - None, normal session |
|
119 | + * |
|
120 | + * @var string |
|
121 | + */ |
|
122 | 122 | var $session_flags; |
123 | 123 | |
124 | 124 | /** |
125 | - * current user session id |
|
126 | - * |
|
127 | - * @var string |
|
128 | - */ |
|
125 | + * current user session id |
|
126 | + * |
|
127 | + * @var string |
|
128 | + */ |
|
129 | 129 | var $sessionid; |
130 | 130 | |
131 | 131 | /** |
132 | - * an other session specific id (md5 from a random string), |
|
133 | - * used together with the sessionid for xmlrpc basic auth and the encryption of session-data (if that's enabled) |
|
134 | - * |
|
135 | - * @var string |
|
136 | - */ |
|
132 | + * an other session specific id (md5 from a random string), |
|
133 | + * used together with the sessionid for xmlrpc basic auth and the encryption of session-data (if that's enabled) |
|
134 | + * |
|
135 | + * @var string |
|
136 | + */ |
|
137 | 137 | var $kp3; |
138 | 138 | |
139 | 139 | /** |
@@ -144,17 +144,17 @@ discard block |
||
144 | 144 | var $sessionid_access_log; |
145 | 145 | |
146 | 146 | /** |
147 | - * name of XML-RPC/SOAP method called |
|
148 | - * |
|
149 | - * @var string |
|
150 | - */ |
|
147 | + * name of XML-RPC/SOAP method called |
|
148 | + * |
|
149 | + * @var string |
|
150 | + */ |
|
151 | 151 | var $xmlrpc_method_called; |
152 | 152 | |
153 | 153 | /** |
154 | - * Array with the name of the system domains |
|
155 | - * |
|
156 | - * @var array |
|
157 | - */ |
|
154 | + * Array with the name of the system domains |
|
155 | + * |
|
156 | + * @var array |
|
157 | + */ |
|
158 | 158 | private $egw_domains; |
159 | 159 | |
160 | 160 | /** |
@@ -248,9 +248,9 @@ discard block |
||
248 | 248 | |
249 | 249 | // set session_timeout from global php.ini and default to 14400=4h, if not set |
250 | 250 | if (!($GLOBALS['egw_info']['server']['sessions_timeout'] = ini_get('session.gc_maxlifetime'))) |
251 | - { |
|
252 | - ini_set('session.gc_maxlifetime', $GLOBALS['egw_info']['server']['sessions_timeout']=14400); |
|
253 | - } |
|
251 | + { |
|
252 | + ini_set('session.gc_maxlifetime', $GLOBALS['egw_info']['server']['sessions_timeout']=14400); |
|
253 | + } |
|
254 | 254 | } |
255 | 255 | |
256 | 256 | /** |
@@ -661,14 +661,14 @@ discard block |
||
661 | 661 | const ACCESS_LOG_TABLE = 'egw_access_log'; |
662 | 662 | |
663 | 663 | /** |
664 | - * Write or update (for logout) the access_log |
|
665 | - * |
|
666 | - * @param string|int $sessionid nummeric or PHP session id or 0 for unsuccessful logins |
|
667 | - * @param string $login ='' account_lid (evtl. with domain) or '' for setting the logout-time |
|
668 | - * @param string $user_ip ='' ip to log |
|
669 | - * @param int $account_id =0 numerical account_id |
|
670 | - * @return int $sessionid primary key of egw_access_log for login, null otherwise |
|
671 | - */ |
|
664 | + * Write or update (for logout) the access_log |
|
665 | + * |
|
666 | + * @param string|int $sessionid nummeric or PHP session id or 0 for unsuccessful logins |
|
667 | + * @param string $login ='' account_lid (evtl. with domain) or '' for setting the logout-time |
|
668 | + * @param string $user_ip ='' ip to log |
|
669 | + * @param int $account_id =0 numerical account_id |
|
670 | + * @return int $sessionid primary key of egw_access_log for login, null otherwise |
|
671 | + */ |
|
672 | 672 | private function log_access($sessionid,$login='',$user_ip='',$account_id=0) |
673 | 673 | { |
674 | 674 | $now = time(); |
@@ -716,7 +716,7 @@ discard block |
||
716 | 716 | |
717 | 717 | /** |
718 | 718 | * Protect against brute force attacks, block login if too many unsuccessful login attmepts |
719 | - * |
|
719 | + * |
|
720 | 720 | * @param string $login account_lid (evtl. with domain) |
721 | 721 | * @param string $ip ip of the user |
722 | 722 | * @returns bool login blocked? |
@@ -1044,13 +1044,13 @@ |
||
1044 | 1044 | } |
1045 | 1045 | |
1046 | 1046 | /** |
1047 | - * Get the color of a category |
|
1048 | - * |
|
1049 | - * For multiple cats, the first with a color is used |
|
1050 | - * |
|
1051 | - * @param int|string $_cats multiple comma-separated cat_id's |
|
1052 | - * @return string |
|
1053 | - */ |
|
1047 | + * Get the color of a category |
|
1048 | + * |
|
1049 | + * For multiple cats, the first with a color is used |
|
1050 | + * |
|
1051 | + * @param int|string $_cats multiple comma-separated cat_id's |
|
1052 | + * @return string |
|
1053 | + */ |
|
1054 | 1054 | static function cats2color($_cats) |
1055 | 1055 | { |
1056 | 1056 | static $cat2color = array(); |
@@ -672,7 +672,7 @@ discard block |
||
672 | 672 | return; // not found, should not happen |
673 | 673 | } |
674 | 674 | if ($type && (($type == 'd') == !($stat['mode'] & Vfs\Sqlfs\StreamWrapper::MODE_DIR) || // != is_dir() which can be true for symlinks |
675 | - $type == 'F' && is_dir($path))) // symlink to a directory |
|
675 | + $type == 'F' && is_dir($path))) // symlink to a directory |
|
676 | 676 | { |
677 | 677 | return; // wrong type |
678 | 678 | } |
@@ -1621,13 +1621,13 @@ discard block |
||
1621 | 1621 | { |
1622 | 1622 | return false; |
1623 | 1623 | } |
1624 | - // remove the lock info evtl. set in the cache |
|
1625 | - unset(self::$lock_cache[$path]); |
|
1624 | + // remove the lock info evtl. set in the cache |
|
1625 | + unset(self::$lock_cache[$path]); |
|
1626 | 1626 | |
1627 | - if ($timeout < 1000000) // < 1000000 is a relative timestamp, so we add the current time |
|
1628 | - { |
|
1629 | - $timeout += time(); |
|
1630 | - } |
|
1627 | + if ($timeout < 1000000) // < 1000000 is a relative timestamp, so we add the current time |
|
1628 | + { |
|
1629 | + $timeout += time(); |
|
1630 | + } |
|
1631 | 1631 | |
1632 | 1632 | if ($update) // Lock Update |
1633 | 1633 | { |
@@ -1688,32 +1688,32 @@ discard block |
||
1688 | 1688 | return $ret; |
1689 | 1689 | } |
1690 | 1690 | |
1691 | - /** |
|
1692 | - * unlock a ressource/path |
|
1693 | - * |
|
1694 | - * @param string $path path to unlock |
|
1695 | - * @param string $token locktoken |
|
1691 | + /** |
|
1692 | + * unlock a ressource/path |
|
1693 | + * |
|
1694 | + * @param string $path path to unlock |
|
1695 | + * @param string $token locktoken |
|
1696 | 1696 | * @param boolean $check_writable =true should we check if the ressource is writable, before granting locks, default yes |
1697 | - * @return boolean true on success |
|
1698 | - */ |
|
1699 | - static function unlock($path,$token,$check_writable=true) |
|
1700 | - { |
|
1697 | + * @return boolean true on success |
|
1698 | + */ |
|
1699 | + static function unlock($path,$token,$check_writable=true) |
|
1700 | + { |
|
1701 | 1701 | // we require write rights to lock/unlock a resource |
1702 | 1702 | if ($check_writable && !self::is_writable($path)) |
1703 | 1703 | { |
1704 | 1704 | return false; |
1705 | 1705 | } |
1706 | - if (($ret = self::$db->delete(self::LOCK_TABLE,array( |
|
1707 | - 'lock_path' => $path, |
|
1708 | - 'lock_token' => $token, |
|
1709 | - ),__LINE__,__FILE__) && self::$db->affected_rows())) |
|
1710 | - { |
|
1711 | - // remove the lock from the cache too |
|
1712 | - unset(self::$lock_cache[$path]); |
|
1713 | - } |
|
1706 | + if (($ret = self::$db->delete(self::LOCK_TABLE,array( |
|
1707 | + 'lock_path' => $path, |
|
1708 | + 'lock_token' => $token, |
|
1709 | + ),__LINE__,__FILE__) && self::$db->affected_rows())) |
|
1710 | + { |
|
1711 | + // remove the lock from the cache too |
|
1712 | + unset(self::$lock_cache[$path]); |
|
1713 | + } |
|
1714 | 1714 | if (self::LOCK_DEBUG) error_log(__METHOD__."($path,$token,$check_writable) returns ".($ret ? 'true' : 'false')); |
1715 | 1715 | return $ret; |
1716 | - } |
|
1716 | + } |
|
1717 | 1717 | |
1718 | 1718 | /** |
1719 | 1719 | * checkLock() helper |
@@ -1741,13 +1741,13 @@ discard block |
||
1741 | 1741 | } |
1742 | 1742 | if ($result && $result['expires'] < time()) // lock is expired --> remove it |
1743 | 1743 | { |
1744 | - self::$db->delete(self::LOCK_TABLE,array( |
|
1745 | - 'lock_path' => $result['path'], |
|
1746 | - 'lock_token' => $result['token'], |
|
1747 | - ),__LINE__,__FILE__); |
|
1744 | + self::$db->delete(self::LOCK_TABLE,array( |
|
1745 | + 'lock_path' => $result['path'], |
|
1746 | + 'lock_token' => $result['token'], |
|
1747 | + ),__LINE__,__FILE__); |
|
1748 | 1748 | |
1749 | 1749 | if (self::LOCK_DEBUG) error_log(__METHOD__."($path) lock is expired at ".date('Y-m-d H:i:s',$result['expires'])." --> removed"); |
1750 | - $result = false; |
|
1750 | + $result = false; |
|
1751 | 1751 | } |
1752 | 1752 | if (self::LOCK_DEBUG) error_log(__METHOD__."($path) returns ".($result?array2string($result):'false')); |
1753 | 1753 | return self::$lock_cache[$path] = $result; |
@@ -1887,9 +1887,9 @@ discard block |
||
1887 | 1887 | $image = Image::find($mime_sub, 'navbar'); |
1888 | 1888 | } |
1889 | 1889 | else if ($file && $mime_main == 'image' && in_array($mime_sub, array('png','jpeg','jpg','gif','bmp')) && |
1890 | - (string)$GLOBALS['egw_info']['server']['link_list_thumbnail'] != '0' && |
|
1891 | - (string)$GLOBALS['egw_info']['user']['preferences']['common']['link_list_thumbnail'] != '0' && |
|
1892 | - ($stat = self::stat($file)) && $stat['size'] < 1500000) |
|
1890 | + (string)$GLOBALS['egw_info']['server']['link_list_thumbnail'] != '0' && |
|
1891 | + (string)$GLOBALS['egw_info']['user']['preferences']['common']['link_list_thumbnail'] != '0' && |
|
1892 | + ($stat = self::stat($file)) && $stat['size'] < 1500000) |
|
1893 | 1893 | { |
1894 | 1894 | if (substr($file, 0, 6) == '/apps/') |
1895 | 1895 | { |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | echo "<p>solink.link('$app1',$id1,'$app2',$id2,'$remark',$owner)</p>\n"; |
67 | 67 | } |
68 | 68 | if ($app1 == $app2 && $id1 == $id2 || |
69 | - $id1 == '' || $id2 == '' || $app1 == '' || $app2 == '') |
|
69 | + $id1 == '' || $id2 == '' || $app1 == '' || $app2 == '') |
|
70 | 70 | { |
71 | 71 | return False; // dont link to self or other nosense |
72 | 72 | } |
@@ -412,26 +412,26 @@ discard block |
||
412 | 412 | array('table'=>self::TABLE, |
413 | 413 | 'cols'=>'c.*,b.link_app1 AS app3,b.link_id1 AS id3,b.link_id AS link3', |
414 | 414 | 'where'=>'a.link_app1='.self::$db->quote($app).' AND c.link_app2='.self::$db->quote($target_app). |
415 | - (!$target_id ? '' : self::$db->expression(self::TABLE,' AND c.',array('link_id2' => $target_id))), |
|
416 | - 'join'=>" a |
|
415 | + (!$target_id ? '' : self::$db->expression(self::TABLE,' AND c.',array('link_id2' => $target_id))), |
|
416 | + 'join'=>" a |
|
417 | 417 | JOIN $table b ON a.link_id2=b.link_id1 AND a.link_app2=b.link_app1 |
418 | 418 | JOIN $table c ON a.link_id1=c.link_id1 AND a.link_app1=c.link_app1 AND a.link_id!=c.link_id AND c.link_app2=b.link_app2 AND c.link_id2=b.link_id2", |
419 | 419 | ), |
420 | 420 | // retrieve the type of links, where the relation is realized as timesheet->infolog/tracker and projectmanager->timesheet |
421 | 421 | array('table'=>self::TABLE, |
422 | 422 | 'cols'=>'b.link_id, b.link_app2 as app1, b.link_id2 as id1, b.link_app1 as app2, b.link_id1 as id2, b.link_remark,b.link_lastmod,b.link_owner,b.deleted,c.link_app1 AS app3,c.link_id1 AS id3,c.link_id AS link3', |
423 | - 'where'=>'a.link_app1='.self::$db->quote($app).' AND b.link_app1='.self::$db->quote($target_app). |
|
424 | - (!$target_id ? '' : self::$db->expression(self::TABLE,' AND b.',array('link_id1' => $target_id))), |
|
425 | - 'join'=>" a |
|
423 | + 'where'=>'a.link_app1='.self::$db->quote($app).' AND b.link_app1='.self::$db->quote($target_app). |
|
424 | + (!$target_id ? '' : self::$db->expression(self::TABLE,' AND b.',array('link_id1' => $target_id))), |
|
425 | + 'join'=>" a |
|
426 | 426 | JOIN $table b ON a.link_id1=b.link_id2 AND a.link_app1=b.link_app2 |
427 | 427 | JOIN $table c ON a.link_id2=c.link_id1 AND a.link_app2=c.link_app1 AND a.link_id!=c.link_id AND c.link_app2=b.link_app1 AND c.link_id2=b.link_id1", |
428 | 428 | ), |
429 | 429 | // retrieve the type of links, where the relation is realized as timesheet->projectmanager and infolog->timesheet |
430 | 430 | array('table'=>self::TABLE, |
431 | 431 | 'cols'=>'a.*,c.link_app1 AS app3,c.link_id1 AS id3,c.link_id AS link3', |
432 | - 'where'=>'a.link_app1='.self::$db->quote($app).' AND a.link_app2='.self::$db->quote($target_app). |
|
433 | - (!$target_id ? '' : self::$db->expression(self::TABLE,' AND a.',array('link_id2' => $target_id))), |
|
434 | - 'join'=>" a |
|
432 | + 'where'=>'a.link_app1='.self::$db->quote($app).' AND a.link_app2='.self::$db->quote($target_app). |
|
433 | + (!$target_id ? '' : self::$db->expression(self::TABLE,' AND a.',array('link_id2' => $target_id))), |
|
434 | + 'join'=>" a |
|
435 | 435 | JOIN $table b ON a.link_id1=b.link_id2 AND a.link_app1=b.link_app2 |
436 | 436 | JOIN $table c ON a.link_id2=c.link_id2 AND a.link_app2=c.link_app2 AND a.link_id!=c.link_id AND c.link_app1=b.link_app1 AND c.link_id1=b.link_id1", |
437 | 437 | ), |
@@ -62,16 +62,16 @@ discard block |
||
62 | 62 | var $template_dirs = array(); |
63 | 63 | |
64 | 64 | /** |
65 | - * true if $this->header() was called |
|
66 | - * |
|
67 | - * @var boolean |
|
68 | - */ |
|
65 | + * true if $this->header() was called |
|
66 | + * |
|
67 | + * @var boolean |
|
68 | + */ |
|
69 | 69 | static $header_done = false; |
70 | 70 | /** |
71 | - * true if $this->navbar() was called |
|
72 | - * |
|
73 | - * @var boolean |
|
74 | - */ |
|
71 | + * true if $this->navbar() was called |
|
72 | + * |
|
73 | + * @var boolean |
|
74 | + */ |
|
75 | 75 | static $navbar_done = false; |
76 | 76 | |
77 | 77 | /** |
@@ -1044,13 +1044,13 @@ discard block |
||
1044 | 1044 | } |
1045 | 1045 | |
1046 | 1046 | /** |
1047 | - * Compile entries for topmenu: |
|
1048 | - * - regular items: links |
|
1049 | - * - info items |
|
1050 | - * |
|
1051 | - * @param array $vars |
|
1052 | - * @param array $apps |
|
1053 | - */ |
|
1047 | + * Compile entries for topmenu: |
|
1048 | + * - regular items: links |
|
1049 | + * - info items |
|
1050 | + * |
|
1051 | + * @param array $vars |
|
1052 | + * @param array $apps |
|
1053 | + */ |
|
1054 | 1054 | function topmenu(array $vars,array $apps) |
1055 | 1055 | { |
1056 | 1056 | if($GLOBALS['egw_info']['user']['apps']['home'] && isset($apps['home'])) |
@@ -1154,39 +1154,39 @@ discard block |
||
1154 | 1154 | } |
1155 | 1155 | |
1156 | 1156 | /** |
1157 | - * Add menu items to the topmenu template class to be displayed |
|
1158 | - * |
|
1159 | - * @param array $app application data |
|
1160 | - * @param mixed $alt_label string with alternative menu item label default value = null |
|
1161 | - * @param string $urlextra string with alternate additional code inside <a>-tag |
|
1162 | - * @access protected |
|
1163 | - * @return void |
|
1164 | - */ |
|
1157 | + * Add menu items to the topmenu template class to be displayed |
|
1158 | + * |
|
1159 | + * @param array $app application data |
|
1160 | + * @param mixed $alt_label string with alternative menu item label default value = null |
|
1161 | + * @param string $urlextra string with alternate additional code inside <a>-tag |
|
1162 | + * @access protected |
|
1163 | + * @return void |
|
1164 | + */ |
|
1165 | 1165 | abstract function _add_topmenu_item(array $app_data,$alt_label=null); |
1166 | 1166 | |
1167 | 1167 | /** |
1168 | - * Add info items to the topmenu template class to be displayed |
|
1169 | - * |
|
1170 | - * @param string $content Html of item |
|
1171 | - * @param string $id =null |
|
1172 | - * @access protected |
|
1173 | - * @return void |
|
1174 | - */ |
|
1168 | + * Add info items to the topmenu template class to be displayed |
|
1169 | + * |
|
1170 | + * @param string $content Html of item |
|
1171 | + * @param string $id =null |
|
1172 | + * @access protected |
|
1173 | + * @return void |
|
1174 | + */ |
|
1175 | 1175 | abstract function _add_topmenu_info_item($content, $id=null); |
1176 | 1176 | |
1177 | 1177 | static $top_menu_extra = array(); |
1178 | 1178 | |
1179 | 1179 | /** |
1180 | - * Called by hooks to add an entry in the topmenu location. |
|
1181 | - * Extra entries will be added just before Logout. |
|
1182 | - * |
|
1183 | - * @param string $id unique element id |
|
1184 | - * @param string $url Address for the entry to link to |
|
1185 | - * @param string $title Text displayed for the entry |
|
1186 | - * @param string $target Optional, so the entry can open in a new page or popup |
|
1187 | - * @access public |
|
1188 | - * @return void |
|
1189 | - */ |
|
1180 | + * Called by hooks to add an entry in the topmenu location. |
|
1181 | + * Extra entries will be added just before Logout. |
|
1182 | + * |
|
1183 | + * @param string $id unique element id |
|
1184 | + * @param string $url Address for the entry to link to |
|
1185 | + * @param string $title Text displayed for the entry |
|
1186 | + * @param string $target Optional, so the entry can open in a new page or popup |
|
1187 | + * @access public |
|
1188 | + * @return void |
|
1189 | + */ |
|
1190 | 1190 | public static function add_topmenu_item($id,$url,$title,$target = '') |
1191 | 1191 | { |
1192 | 1192 | $entry['name'] = $id; |
@@ -1198,16 +1198,16 @@ discard block |
||
1198 | 1198 | } |
1199 | 1199 | |
1200 | 1200 | /** |
1201 | - * called by hooks to add an icon in the topmenu info location |
|
1202 | - * |
|
1203 | - * @param string $id unique element id |
|
1204 | - * @param string $icon_src src of the icon image. Make sure this nog height then 18pixels |
|
1205 | - * @param string $iconlink where the icon links to |
|
1206 | - * @param booleon $blink set true to make the icon blink |
|
1207 | - * @param mixed $tooltip string containing the tooltip html, or null of no tooltip |
|
1208 | - * @access public |
|
1209 | - * @return void |
|
1210 | - */ |
|
1201 | + * called by hooks to add an icon in the topmenu info location |
|
1202 | + * |
|
1203 | + * @param string $id unique element id |
|
1204 | + * @param string $icon_src src of the icon image. Make sure this nog height then 18pixels |
|
1205 | + * @param string $iconlink where the icon links to |
|
1206 | + * @param booleon $blink set true to make the icon blink |
|
1207 | + * @param mixed $tooltip string containing the tooltip html, or null of no tooltip |
|
1208 | + * @access public |
|
1209 | + * @return void |
|
1210 | + */ |
|
1211 | 1211 | abstract function topmenu_info_icon($id,$icon_src,$iconlink,$blink=false,$tooltip=null); |
1212 | 1212 | |
1213 | 1213 | /** |
@@ -1242,19 +1242,19 @@ discard block |
||
1242 | 1242 | protected static $js_include_mgr; |
1243 | 1243 | |
1244 | 1244 | /** |
1245 | - * Checks to make sure a valid package and file name is provided |
|
1246 | - * |
|
1247 | - * Example call syntax: |
|
1248 | - * a) Api\Framework::includeJS('jscalendar','calendar') |
|
1249 | - * --> /phpgwapi/js/jscalendar/calendar.js |
|
1250 | - * b) Api\Framework::includeJS('/phpgwapi/inc/calendar-setup.js',array('lang'=>'de')) |
|
1251 | - * --> /phpgwapi/inc/calendar-setup.js?lang=de |
|
1252 | - * |
|
1253 | - * @param string $package package or complete path (relative to EGW_SERVER_ROOT) to be included |
|
1254 | - * @param string|array $file =null file to be included - no ".js" on the end or array with get params |
|
1255 | - * @param string $app ='phpgwapi' application directory to search - default = phpgwapi |
|
1256 | - * @param boolean $append =true should the file be added |
|
1257 | - */ |
|
1245 | + * Checks to make sure a valid package and file name is provided |
|
1246 | + * |
|
1247 | + * Example call syntax: |
|
1248 | + * a) Api\Framework::includeJS('jscalendar','calendar') |
|
1249 | + * --> /phpgwapi/js/jscalendar/calendar.js |
|
1250 | + * b) Api\Framework::includeJS('/phpgwapi/inc/calendar-setup.js',array('lang'=>'de')) |
|
1251 | + * --> /phpgwapi/inc/calendar-setup.js?lang=de |
|
1252 | + * |
|
1253 | + * @param string $package package or complete path (relative to EGW_SERVER_ROOT) to be included |
|
1254 | + * @param string|array $file =null file to be included - no ".js" on the end or array with get params |
|
1255 | + * @param string $app ='phpgwapi' application directory to search - default = phpgwapi |
|
1256 | + * @param boolean $append =true should the file be added |
|
1257 | + */ |
|
1258 | 1258 | static function includeJS($package, $file=null, $app='phpgwapi') |
1259 | 1259 | { |
1260 | 1260 | self::$js_include_mgr->include_js_file($package, $file, $app); |
@@ -1367,14 +1367,14 @@ |
||
1367 | 1367 | } |
1368 | 1368 | |
1369 | 1369 | /** |
1370 | - * Get a default list of columns to search |
|
1371 | - * This is to be used as a fallback, for when the extending class does not define |
|
1372 | - * $this->columns_to_search. All the columns are considered, and any with $skip_columns_with in |
|
1373 | - * their name are discarded because these columns are expected to be foreign keys or other numeric |
|
1374 | - * values with no meaning to the user. |
|
1375 | - * |
|
1376 | - * @return array of column names |
|
1377 | - */ |
|
1370 | + * Get a default list of columns to search |
|
1371 | + * This is to be used as a fallback, for when the extending class does not define |
|
1372 | + * $this->columns_to_search. All the columns are considered, and any with $skip_columns_with in |
|
1373 | + * their name are discarded because these columns are expected to be foreign keys or other numeric |
|
1374 | + * values with no meaning to the user. |
|
1375 | + * |
|
1376 | + * @return array of column names |
|
1377 | + */ |
|
1378 | 1378 | protected function get_default_search_columns() |
1379 | 1379 | { |
1380 | 1380 | $skip_columns_with = array('_id', 'modified', 'modifier', 'status', 'cat_id', 'owner'); |
@@ -381,7 +381,7 @@ discard block |
||
381 | 381 | $zip = NULL; |
382 | 382 | $_f = NULL; |
383 | 383 | if($type == 'zip') |
384 | - { |
|
384 | + { |
|
385 | 385 | // has already been verified to be available in fopen_backup |
386 | 386 | $zip = new ZipArchive; |
387 | 387 | if(($zip->open($filename)) !== TRUE) |
@@ -719,9 +719,9 @@ discard block |
||
719 | 719 | while($file = $list[0]) |
720 | 720 | { |
721 | 721 | if(is_dir($file) && $file != '.' && $file != '..') |
722 | - self::remove_dir_content($dir.'/'.$file); |
|
722 | + self::remove_dir_content($dir.'/'.$file); |
|
723 | 723 | if(is_file($file) && $file != '.' && $file != '..') |
724 | - unlink($dir.'/'.$file); |
|
724 | + unlink($dir.'/'.$file); |
|
725 | 725 | array_shift($list); |
726 | 726 | } |
727 | 727 | //rmdir($dir); // dont remove own dir |
@@ -967,8 +967,8 @@ discard block |
||
967 | 967 | echo '<center>'.lang("Cant open %1, needs ZipArchive", $name)."<br>\n".'</center>'; |
968 | 968 | } |
969 | 969 | |
970 | - fclose($f); |
|
971 | - if (file_exists($name)) unlink($name); |
|
970 | + fclose($f); |
|
971 | + if (file_exists($name)) unlink($name); |
|
972 | 972 | return TRUE; |
973 | 973 | } |
974 | 974 | // save files .... |