瀏覽代碼

Added some missing includes.
Initialize some vars to avoid warnings from PHP.

pallo 24 年之前
父節點
當前提交
23764ef6f6
共有 3 個文件被更改,包括 9 次插入0 次删除
  1. 2 0
      src/addrbook_popup.php
  2. 6 0
      src/addrbook_search.php
  3. 1 0
      src/addrbook_search_html.php

+ 2 - 0
src/addrbook_popup.php

@@ -12,6 +12,8 @@
 
    session_start();
 
+   if (!isset($strings_php))
+      include("../functions/strings.php");
    if (!isset($i18n_php))
       include('../functions/i18n.php');
    if (!isset($config_php))

+ 6 - 0
src/addrbook_search.php

@@ -128,6 +128,8 @@ function bcc_address($addr) {
 
    session_start();
    
+   if (!isset($strings_php))
+      include("../functions/strings.php");
    if (!isset($i18n_php))
       include('../functions/i18n.php');
 
@@ -160,6 +162,10 @@ function bcc_address($addr) {
 
    displayHtmlHeader();
 
+   // Initialize vars
+   if(!isset($query)) $query = "";
+   if(!isset($show))  $show  = "";
+
    // Choose correct colors for top and bottom frame
    if($show == 'form') {
       echo "<BODY BGCOLOR=\"$color[3]\" TEXT=\"$color[6]\" ";

+ 1 - 0
src/addrbook_search_html.php

@@ -136,6 +136,7 @@
           htmlspecialchars($addrquery));
 
    // List all backends to allow the user to choose where to search
+   if(!isset($backend)) $backend = "";
    if($abook->numbackends > 1) {
       printf("<STRONG>%s</STRONG>&nbsp;<SELECT NAME=backend>\n", 
              _("in"));