diff options
| author | Robert Treat | 2013-05-18 22:15:06 +0000 |
|---|---|---|
| committer | Robert Treat | 2013-05-18 22:15:06 +0000 |
| commit | 8e59ea218458477471d4ef4ecf273de0d2ca94dd (patch) | |
| tree | 14b9f19050c31f3a3ef40f61701644d0e4237bc8 | |
| parent | 0b6b43700c56572351a0fa584c346d23eed186b0 (diff) | |
| parent | b32bb29e5c96d0ff8280b61346fbb8ba70babf7c (diff) | |
Merge branch 'official'
| -rw-r--r-- | HISTORY | 27 | ||||
| -rw-r--r-- | TODO | 3 | ||||
| -rw-r--r-- | admin.php | 2 | ||||
| -rw-r--r-- | classes/Misc.php | 12 | ||||
| -rw-r--r-- | classes/PluginManager.php | 15 | ||||
| -rw-r--r-- | lang/chinese-utf8-zh_CN.php | 112 | ||||
| -rw-r--r-- | lang/langcheck | 4 | ||||
| -rw-r--r-- | libraries/lib.inc.php | 5 | ||||
| -rwxr-xr-x | login.php | 5 | ||||
| -rw-r--r-- | plugins/Report/plugin.php | 1 | ||||
| -rw-r--r-- | servers.php | 8 |
11 files changed, 142 insertions, 52 deletions
@@ -4,13 +4,32 @@ phpPgAdmin History Version 5.1 ----------- -Released: +Released: 14th April 2013 Features -* Support for PostgreSQL 9.1 and 9.2 -* New plugin architecture +* Full support for PostgreSQL 9.1 and 9.2 +* New plugin architecture, including addition of several new hooks (asleonardo, ioguix) * Support nested groups of servers (Julien Rouhaud & ioguix) -* ... +* Expanded test coverage in Selenium test suite +* Highlight referencing fields on hovering Foriegn Key values when browsing tables (asleonardo) +* Simplified translation system implementation (ioguix) +* Don't show cancel/kill options in process page to non-superusers +* Add download ability from the History window (ioguix) +* User queries now paginate by default + +Bugs +* Fix several bugs with bytea support, including possible data corruption bugs when updating rows that have bytea fields +* Numeruous fixes for running under PHP Strict Standards +* Fix an issue with autocompletion of text based Foreign Keys +* Fix a bug when browsing tables with no unique key + +Translations +* Lithuanian (artvras) + +Incompatabilities +* We have stopped testing against Postgres versions < 8.4, which are EOL +* phpPgAdmin core is now UTF-8 only + Version 5.0 ----------- @@ -212,7 +212,6 @@ Miscellaneous Exotic ------ -* Support contrib/tsearch2 for easy full text indexes * Pivot reports (ADODB has a feature for this) * Parameterized reports (use prepared queries) * Full web accessability conformance @@ -228,7 +227,7 @@ Principles * One day we should make it all XHTML * everything properly escaped - prevent sql injection and cross-site scripting probs -* Support Postgres 7.4 and upwards +* Support Postgres 8.4 and upwards * psql -E is a cool way of seeing how to do schema queries * Checking out older versions of describe.c in src/bin/psql in the postgres distro is a good way of seeing how to query older versions of postgres for @@ -280,7 +280,7 @@ echo $misc->form; echo "<p><input type=\"checkbox\" id=\"vacuum_full\" name=\"vacuum_full\" /> <label for=\"vacuum_full\">{$lang['strfull']}</label></p>\n"; echo "<p><input type=\"checkbox\" id=\"vacuum_analyze\" name=\"vacuum_analyze\" /> <label for=\"vacuum_analyze\">{$lang['stranalyze']}</label></p>\n"; - echo "<p><input type=\"checkbox\" id=\"vacuum_freeze\" name=\"vacuum_freeze\" /><label for=\"vacuum_freeze\">{$lang['strfreeze']}</label></p>\n"; + echo "<p><input type=\"checkbox\" id=\"vacuum_freeze\" name=\"vacuum_freeze\" /> <label for=\"vacuum_freeze\">{$lang['strfreeze']}</label></p>\n"; echo "<input type=\"submit\" name=\"vacuum\" value=\"{$lang['strvacuum']}\" />\n"; echo "<input type=\"submit\" name=\"cancel\" value=\"{$lang['strcancel']}\" />\n"; echo "</form>\n"; diff --git a/classes/Misc.php b/classes/Misc.php index 0457b4d8..cd22df8b 100644 --- a/classes/Misc.php +++ b/classes/Misc.php @@ -520,7 +520,7 @@ * @param $script script tag */ function printHeader($title = '', $script = null, $frameset = false) { - global $appName, $lang, $_no_output, $conf; + global $appName, $lang, $_no_output, $conf, $plugin_manager; if (!isset($_no_output)) { header("Content-Type: text/html; charset=utf-8"); @@ -549,6 +549,16 @@ echo "</title>\n"; if ($script) echo "{$script}\n"; + + $plugins_head = array(); + $_params = array('heads' => &$plugins_head); + + $plugin_manager->do_hook('head', $_params); + + foreach($plugins_head as $tag) { + echo $tag; + } + echo "</head>\n"; } } diff --git a/classes/PluginManager.php b/classes/PluginManager.php index 3bc1eb39..203808f1 100644 --- a/classes/PluginManager.php +++ b/classes/PluginManager.php @@ -11,12 +11,14 @@ class PluginManager { */ private $plugins_list = array(); private $available_hooks = array( + 'head', 'toplinks', 'tabs', 'trail', 'navlinks', 'actionbuttons', - 'tree' + 'tree', + 'logout' ); private $actions = array(); private $hooks = array(); @@ -37,8 +39,13 @@ class PluginManager { // Verify is the activated plugin exists if (file_exists($plugin_file)) { include_once($plugin_file); - $plugin = new $activated_plugin($language); - $this->add_plugin($plugin); + try { + $plugin = new $activated_plugin($language); + $this->add_plugin($plugin); + } + catch (Exception $e) { + continue; + } } else { printf($lang['strpluginnotfound']."\t\n", $activated_plugin); exit; @@ -109,7 +116,7 @@ class PluginManager { if (!isset($this->plugins_list[$plugin_name])) { // Show an error and stop the application - printf($lang['strpluginnotfound']."\t\n", $name); + printf($lang['strpluginnotfound']."\t\n", $plugin_name); exit; } $plugin = $this->plugins_list[$plugin_name]; diff --git a/lang/chinese-utf8-zh_CN.php b/lang/chinese-utf8-zh_CN.php index 0737a689..d2f2a29a 100644 --- a/lang/chinese-utf8-zh_CN.php +++ b/lang/chinese-utf8-zh_CN.php @@ -1,9 +1,8 @@ <?php /** -* English language file for phpPgAdmin. Use this as a basis -* for new translations. +* Chinese language file for phpPgAdmin. * -* $Id: chinese-utf8-zh_CN.php,v 1.5 2007/12/31 13:00:29 ioguix Exp $ +* $Id: chinese-utf8-zh_CN.php,v 1.6 2013/04/15 cozhan $ */ // Language and character set @@ -12,7 +11,7 @@ $lang['applangdir'] = 'ltr'; // Welcome - $lang['strintro'] = '迎使用 phpPgAdmin。'; + $lang['strintro'] = '欢迎使用 phpPgAdmin。'; $lang['strppahome'] = 'phpPgAdmin 主页'; $lang['strpgsqlhome'] = 'PostgreSQL 主页'; $lang['strpgsqlhome_url'] = 'http://www.postgresql.org/'; @@ -27,6 +26,8 @@ $lang['strlogindisallowed'] = '出于安全原因禁止登录。'; $lang['strserver'] = '服务器'; $lang['strservers'] = '服务器'; + $lang['strgroupservers'] = '群组"%s"中的服务器'; + $lang['strallservers'] = '所有服务器'; $lang['strintroduction'] = '介绍'; $lang['strhost'] = '主机'; $lang['strport'] = '端口'; @@ -42,7 +43,7 @@ $lang['strdisable'] = '无效'; $lang['strdrop'] = '删除'; $lang['strdropped'] = '已删除'; - $lang['strnull'] = '空'; + $lang['strnull'] = '空值'; $lang['strnotnull'] = '非空'; $lang['strprev'] = '前一页'; $lang['strnext'] = '下一页'; @@ -57,9 +58,11 @@ $lang['stralter'] = '变更'; $lang['strok'] = '确认'; $lang['strcancel'] = '取消'; + $lang['strkill'] = '终止'; $lang['strac'] = '自动完成有效'; $lang['strsave'] = '保存'; $lang['strreset'] = '重置'; + $lang['strrestart'] = '重启'; $lang['strinsert'] = '插入'; $lang['strselect'] = '选择'; $lang['strdelete'] = '删除'; @@ -74,11 +77,11 @@ $lang['strcolumns'] = '列'; $lang['strrows'] = '行'; $lang['strrowsaff'] = '行已影响(变更)。'; - $lang['strobjects'] = '对象(s)'; + $lang['strobjects'] = '对象'; $lang['strback'] = '返回'; $lang['strqueryresults'] = '查询结果'; $lang['strshow'] = '显示'; - $lang['strempty'] = '空'; + $lang['strempty'] = '清空'; $lang['strlanguage'] = '语言'; $lang['strencoding'] = '编码'; $lang['strvalue'] = '值'; @@ -110,8 +113,6 @@ $lang['strseparator'] = ': '; $lang['strexpand'] = '扩展'; $lang['strcollapse'] = '崩溃'; - $lang['strexplain'] = '解释'; - $lang['strexplainanalyze'] = '解释分析'; $lang['strfind'] = '查找'; $lang['stroptions'] = '选项'; $lang['strrefresh'] = '刷新'; @@ -132,10 +133,24 @@ $lang['strfile'] = '文件'; $lang['strfileimported'] = '文件已导入。'; $lang['strtrycred'] = '对所有服务器使用该用户名和密码'; + $lang['strconfdropcred'] = '因为安全原因,中断连接将会销毁你的登录信息。你确定要中断连接吗?'; $lang['stractionsonmultiplelines'] = '多行上的操作'; $lang['strselectall'] = '选择所有'; $lang['strunselectall'] = '取消选择所有'; $lang['strlocale'] = '本地'; + $lang['strcollation'] = '校对'; + $lang['strctype'] = '字符类型'; + $lang['strdefaultvalues'] = '默认值'; + $lang['strnewvalues'] = '新值'; + $lang['strstart'] = '启动'; + $lang['strstop'] = '停止'; + $lang['strgotoppage'] = '回到顶端'; + $lang['strtheme'] = '主题'; + $lang['strcluster'] = '集群'; + + // Admin + $lang['stradminondatabase'] = '以下管理功能可应用于数据库 %s.'; + $lang['stradminontable'] = '以下管理功能可应用于表 %s.'; // User-supplied SQL history $lang['strhistory'] = '历史'; @@ -147,6 +162,7 @@ $lang['strnodatabaseselected'] = '请选择一个数据库.'; // Database sizes + $lang['strnoaccess'] = '无法访问'; $lang['strsize'] = '大小'; $lang['strbytes'] = '字节'; $lang['strkb'] = 'kB'; @@ -155,11 +171,11 @@ $lang['strtb'] = 'TB'; // Error handling - $lang['strnoframes'] = '该程序在具有框架(frames)功能的浏览器上工作的更好,但是也可以在不支持框架(frames)的浏览器上工作,请按下面的链接。'; - $lang['strnoframeslink'] = '不使用框架(frames)'; + $lang['strnoframes'] = '该程序在具有框架功能的浏览器上工作的更好,请按下面的链接在不支持框架的浏览器上工作。'; + $lang['strnoframeslink'] = '不使用框架'; $lang['strbadconfig'] = '您的 config.inc.php 已失效。您需要自行通过 config.inc.php-ist 恢复。'; $lang['strnotloaded'] = '您安装的 PHP 不支持PostgreSQL。 你需要重新编译PHP并使用 --with-pgsql 配置选项。'; - $lang['strpostgresqlversionnotsupported'] = '版本的PostgreSQL不被支持。 请更新到版本 %s 或更高版本。'; + $lang['strpostgresqlversionnotsupported'] = '旧版本的PostgreSQL不被支持。 请更新到版本 %s 或更高版本。'; $lang['strbadschema'] = '无效的模式。'; $lang['strbadencoding'] = '设定客户端编码错误。'; $lang['strsqlerror'] = 'SQL:错误'; @@ -177,6 +193,9 @@ $lang['strcannotdumponwindows'] = '复杂表和模式名称的转储在Windows 不被支持。'; $lang['strinvalidserverparam'] = '尝试用无效的服务器参数连接,可能有人正尝试攻击你的系统。'; $lang['strnoserversupplied'] = '没有选择数据库!'; + $lang['strbadpgdumppath'] = '导出错误:在 conf/config.inc.php 中指定的路径 %s 下执行pg_dump失败。请在配置中修改路径并重新登录。'; + $lang['strbadpgdumpallpath'] = '导出错误:在 conf/config.inc.php 中指定的路径 %s 下执行pg_dumpall失败。请在配置中修改路径并重新登录。'; + $lang['strconnectionfail'] = '无法连接服务器。'; // Tables $lang['strtable'] = '数据表'; @@ -185,7 +204,7 @@ $lang['strnotables'] = '查无数据表。'; $lang['strnotable'] = '查无此表。'; $lang['strcreatetable'] = '创建表'; - $lang['strcreatetablelike'] = '创建表从'; + $lang['strcreatetablelike'] = '创建表(以现有表为模板)'; $lang['strcreatetablelikeparent'] = '源表'; $lang['strcreatelikewithdefaults'] = '包含默认值'; $lang['strcreatelikewithconstraints'] = '包含约束'; @@ -206,6 +225,7 @@ $lang['strinsertrow'] = '插入行'; $lang['strrowinserted'] = '行已插入。'; $lang['strrowinsertedbad'] = '行插入失败。'; + $lang['strnofkref'] = '在外键 %s 中找不到相应的值。'; $lang['strrowduplicate'] = '行插入失败, 尝试再次插入。'; $lang['streditrow'] = '编辑行'; $lang['strrowupdated'] = '行已更新。'; @@ -236,17 +256,22 @@ $lang['strstructureanddata'] = '结构和数据'; $lang['strtabbed'] = '固定(Tabbed)'; $lang['strauto'] = '自动'; - $lang['strconfvacuumtable'] = '确定要清理 "%s"吗?'; + $lang['strconfvacuumtable'] = '确定要清理 "%s" 吗?'; $lang['strconfanalyzetable'] = '确定要分析 "%s" 吗?'; + $lang['strconfreindextable'] = '确定要重新索引 "%s" 吗?'; + $lang['strconfclustertable'] = '确定要集群 "%s" 吗?'; $lang['strestimatedrowcount'] = '估计的行数'; $lang['strspecifytabletoanalyze'] = '必须至少选择一个表来分析'; $lang['strspecifytabletoempty'] = '必须至少选择一个表来清空'; $lang['strspecifytabletodrop'] = '必须至少选择一个表来移除'; $lang['strspecifytabletovacuum'] = '必须至少选择一个表来清理(vacuum)'; + $lang['strspecifytabletoreindex'] = '必须至少选择一个要重新索引的表。'; + $lang['strspecifytabletocluster'] = '必须至少选择一个要集群的表。'; + $lang['strnofieldsforinsert'] = '无法在没有任何列定义的表中插入数据。'; // Columns $lang['strcolprop'] = '列属性'; - $lang['strnotableprovided'] = '没有指表!'; + $lang['strnotableprovided'] = '没有相应的表!'; // Users $lang['struser'] = '用户'; @@ -278,6 +303,7 @@ // Groups $lang['strgroup'] = '群组'; $lang['strgroups'] = '群组'; + $lang['strgroupgroups'] = '在"%s"中的群组'; $lang['strshowallgroups'] = '显示所有群组'; $lang['strnogroup'] = '查无此群组。'; $lang['strnogroups'] = '查无群组。'; @@ -304,7 +330,7 @@ $lang['strroles'] = '角色'; $lang['strshowallroles'] = '显示所有角色'; $lang['strnoroles'] = '查无角色。'; - $lang['strinheritsprivs'] = '继承特权?'; + $lang['strinheritsprivs'] = '继承权限?'; $lang['strcreaterole'] = '创建角色'; $lang['strcancreaterole'] = '创建角色?'; $lang['strrolecreated'] = '角色已创建。'; @@ -322,14 +348,14 @@ $lang['strroleneedsname'] = '必须指定角色名称。'; // Privileges - $lang['strprivilege'] = '特权'; - $lang['strprivileges'] = '特权'; - $lang['strnoprivileges'] = '这个对象拥有默认所属人的特权。'; + $lang['strprivilege'] = '权限'; + $lang['strprivileges'] = '权限'; + $lang['strnoprivileges'] = '这个对象拥有默认所属人的权限。'; $lang['strgrant'] = '赋予'; $lang['strrevoke'] = '撤回'; - $lang['strgranted'] = '特权已改变'; - $lang['strgrantfailed'] = '特权改变失败'; - $lang['strgrantbad'] = '必须指定至少一个用户或一个组和一个特权。'; + $lang['strgranted'] = '权限已改变'; + $lang['strgrantfailed'] = '权限改变失败'; + $lang['strgrantbad'] = '必须指定至少一个用户或一个组和一个权限。'; $lang['strgrantor'] = '赋予者'; $lang['strasterisk'] = '*'; @@ -362,7 +388,12 @@ $lang['strallobjects'] = '所有对象'; $lang['strdatabasealtered'] = '数据库已变更。'; $lang['strdatabasealteredbad'] = '数据库变更失败。'; - $lang['strspecifydatabasetodrop'] = '必须至少指定一个数据库来移除'; + $lang['strspecifydatabasetodrop'] = '必须至少指定一个要移除的数据库'; + $lang['strtemplatedb'] = '模板'; + $lang['strconfanalyzedatabase'] = '你确定要分析数据库"%s"中的所有表吗?'; + $lang['strconfvacuumdatabase'] = '你确定要清理数据库"%s"中的所有表吗?'; + $lang['strconfreindexdatabase'] = '你确定要重新索引数据库"%s"中的所有表吗?'; + $lang['strconfclusterdatabase'] = '你确定要集群数据库"%s"中的所有表吗?'; // Views $lang['strview'] = '视图'; @@ -390,7 +421,7 @@ $lang['strerrordupfields'] = '复制字段时发生错误'; $lang['strviewaltered'] = '视图已变更。'; $lang['strviewalteredbad'] = '视图变更失败。'; - $lang['strspecifyviewtodrop'] = '必须至少指定一个视图来移除'; + $lang['strspecifyviewtodrop'] = '必须至少指定一个要移除的视图'; // Sequences $lang['strsequence'] = '序列'; @@ -402,6 +433,7 @@ $lang['strlastvalue'] = '最后值'; $lang['strincrementby'] = '增量'; $lang['strstartvalue'] = '起始值'; + $lang['strrestartvalue'] = '重新计算'; $lang['strmaxvalue'] = '最大值'; $lang['strminvalue'] = '最小值'; $lang['strcachevalue'] = '缓存值'; @@ -414,6 +446,8 @@ $lang['strconfdropsequence'] = '确定要删除序列"%s"吗?'; $lang['strsequencedropped'] = '序列已删除。'; $lang['strsequencedroppedbad'] = '序列删除失败。'; + $lang['strsequencerestart'] = '重新计算序列。'; + $lang['strsequencerestartbad'] = '序列重新计算失败。'; $lang['strsequencereset'] = '序列已重置。'; $lang['strsequenceresetbad'] = '序列重置失败。'; $lang['strsequencealtered'] = '序列已变更。'; @@ -452,7 +486,8 @@ $lang['strconfcluster'] = '确定要集群 "%s"吗?'; $lang['strclusteredgood'] = '集群完成。'; $lang['strclusteredbad'] = '集群失败。'; - $lang['strcluster'] = '集群'; + $lang['strconcurrently'] = '并发'; + $lang['strnoclusteravailable'] = '表中没有集群索引。'; // Rules $lang['strrules'] = '规则'; @@ -587,7 +622,6 @@ $lang['strdelimiter'] = '分隔符'; $lang['strstorage'] = '磁盘存储'; $lang['strfield'] = '字段'; - $lang['strvalue'] = '值'; $lang['strnumfields'] = '列数'; $lang['strnumvalues'] = '值数'; $lang['strtypeneedsname'] = '必须指定类型名称。'; @@ -775,12 +809,24 @@ $lang['strturnedon'] = '打开'; $lang['strturnedoff'] = '关闭'; $lang['strenabled'] = '有效'; + $lang['strnovacuumconf'] = '没有自动清理配置。'; $lang['strvacuumbasethreshold'] = '清理基本临界值'; $lang['strvacuumscalefactor'] = '清理换算系数'; $lang['stranalybasethreshold'] = '分析基本临界值'; $lang['stranalyzescalefactor'] = '分析换算系数'; $lang['strvacuumcostdelay'] = '清理成本延迟'; $lang['strvacuumcostlimit'] = '清理成本限制'; + $lang['strvacuumpertable'] = '此表的自动清理配置'; + $lang['straddvacuumtable'] = '为此表增加自动清理配置'; + $lang['streditvacuumtable'] = '编辑表 %s 的自动清理配置'; + $lang['strdelvacuumtable'] = '删除表 %s 的自动清理配置?'; + $lang['strvacuumtablereset'] = '还原表 %s 的自动清理配置为默认值'; + $lang['strdelvacuumtablefail'] = '无法删除表 %s 的自动清理配置'; + $lang['strsetvacuumtablesaved'] = '已保存表 %s 的自动清理配置'; + $lang['strsetvacuumtablefail'] = '表 %s 的自动清理配置失败'; + $lang['strspecifydelvacuumtable'] = '请指定你希望移除自动清理配置的表。'; + $lang['strspecifyeditvacuumtable'] = '请指定你希望编辑自动清理配置的表。'; + $lang['strnotdefaultinred'] = '非默认值被标注为红色。'; // Table-level Locks $lang['strlocks'] = '锁'; @@ -818,14 +864,12 @@ $lang['strftsdicts'] = '字典'; $lang['strftsdict'] = '字典'; $lang['strftsemptymap'] = '空的全文检索配置映射。'; - $lang['strftswithmap'] = '附带映射(With map)'; - $lang['strftsmakedefault'] = '为本地化作成默认值'; $lang['strftsconfigaltered'] = '全文检索已变更。'; $lang['strftsconfigalteredbad'] = '全文检索变更失败。'; $lang['strftsconfigmap'] = '全文检索配置映射'; $lang['strftsparsers'] = '全文检索分析器'; - $lang['strftsnoparsers'] = '无 有效的全文检索分析器。'; - $lang['strftsnodicts'] = '无 有效的全文检索字典。'; + $lang['strftsnoparsers'] = '无有效的全文检索分析器。'; + $lang['strftsnodicts'] = '无有效的全文检索字典。'; $lang['strftsdictcreated'] = '全文检索字典已创建'; $lang['strftsdictcreatedbad'] = '全文检索字典创建失败。'; $lang['strftslexize'] = 'Lexize'; @@ -846,9 +890,13 @@ $lang['strftsmappingalteredbad'] = '全文检索映射变更失败。'; $lang['strftsmappingadded'] = '全文检索映射已添加。'; $lang['strftsmappingaddedbad'] = '全文检索映射添加失败。'; - $lang['strftsmappingdropped'] = '全文检索映射已删除。'; - $lang['strftsmappingdroppedbad'] = '全文检索映射移除失败。'; $lang['strftstabconfigs'] = '配置'; $lang['strftstabdicts'] = '字典'; $lang['strftstabparsers'] = '分析器'; + $lang['strftscantparsercopy'] = '不能在创建全文检索配置时指定分析器和模板。'; + + //Plugins + $lang['strpluginnotfound'] = '错误:没有找到\'%s\'插件。请检查该插件是否在plugins/目录下,或插件是否包含plugin.php。注意插件名大小写敏感。'; + $lang['stractionnotfound'] = '错误:动作\'%s\'不在插件\'%s\'中,或没有被指定为合法的动作。'; + $lang['strhooknotfound'] = '错误:连接\'%s\'不可用.'; ?> diff --git a/lang/langcheck b/lang/langcheck index 78f91e4f..1565c4fa 100644 --- a/lang/langcheck +++ b/lang/langcheck @@ -12,7 +12,9 @@ if (!ini_get('safe_mode')) set_time_limit(0); // Check arguments - if (sizeof($_SERVER['argv']) != 2) { + if (sizeof($_SERVER['argv']) != 2 or ( + is_file($_SERVER['argv'][1]) ? ( + substr_compare(pathinfo($_SERVER['argv'][1], PATHINFO_EXTENSION), "php", 0, 3, FALSE) == 0 ? TRUE : FALSE) : FALSE )) { echo "Usage: langcheck <language>\n\n"; echo " <language> is the filename without the .php extension\n"; exit; diff --git a/libraries/lib.inc.php b/libraries/lib.inc.php index 141aebb0..b33ae787 100644 --- a/libraries/lib.inc.php +++ b/libraries/lib.inc.php @@ -16,7 +16,7 @@ $appName = 'phpPgAdmin'; // Application version - $appVersion = '5.1-dev'; + $appVersion = '5.1'; // PostgreSQL and PHP minimum version $postgresqlMinVer = '7.4'; @@ -187,7 +187,6 @@ // Manage the plugins require_once('./classes/PluginManager.php'); - $plugin_manager = new PluginManager($_language); // Create data accessor object, if necessary if (!isset($_no_db_connection)) { @@ -235,4 +234,6 @@ return strtr($string, array_flip(get_html_translation_table(HTML_SPECIALCHARS, $quote_style))); } } + + $plugin_manager = new PluginManager($_language); ?> @@ -5,12 +5,15 @@ * * $Id: login.php,v 1.38 2007/09/04 19:39:48 ioguix Exp $ */ - global $conf; + global $conf, $plugin_manager; // This needs to be an include once to prevent lib.inc.php infinite recursive includes. // Check to see if the configuration file exists, if not, explain require_once('./libraries/lib.inc.php'); + if (!isset($plugin_manager)) + $plugin_manager = new PluginManager($_SESSION['webdbLanguage']); + $misc->printHeader($lang['strlogin']); $misc->printBody(); $misc->printTrail('root'); diff --git a/plugins/Report/plugin.php b/plugins/Report/plugin.php index 941129bc..de464a6a 100644 --- a/plugins/Report/plugin.php +++ b/plugins/Report/plugin.php @@ -18,7 +18,6 @@ class Report extends Plugin { * @param $language Current phpPgAdmin language. If it was not found in the plugin, English will be used. */ function __construct($language) { - global $data; /* loads $this->lang and $this->conf */ parent::__construct($language); diff --git a/servers.php b/servers.php index 746a5c4d..2e6112ef 100644 --- a/servers.php +++ b/servers.php @@ -14,15 +14,17 @@ if (!isset($msg)) $msg = ''; function doLogout() { - global $misc, $lang, $_reload_browser; - + global $misc, $lang, $_reload_browser, $plugin_manager; + + $plugin_manager->do_hook('logout', $_REQUEST['logoutServer']); + $server_info = $misc->getServerInfo($_REQUEST['logoutServer']); $misc->setServerInfo(null, null, $_REQUEST['logoutServer']); unset($_SESSION['sharedUsername'], $_SESSION['sharedPassword']); doDefault(sprintf($lang['strlogoutmsg'], $server_info['desc'])); - + $_reload_browser = true; } |
