Explorar el Código

Formatting and adding FIXME to addressbook.php

Fredrik Jervfors hace 20 años
padre
commit
76681b17ff

+ 1 - 0
src/about.php

@@ -83,6 +83,7 @@ if ( count ($plugins) > 0 ) {
 } else {
     echo '<em>'._("none installed")."</em>\n\n";
 }
+
 ?>
 </small>
 <br /><br />

+ 2 - 1
src/addrbook_search.php

@@ -308,5 +308,6 @@ if ($show == 'form' && empty($listall)) {
     }
 
 }
+
 ?>
-</body></html>
+</body></html>

+ 10 - 9
src/addressbook.php

@@ -61,7 +61,6 @@ if($abook->localbackend == 0) {
     exit();
 }
 
-
 $defdata   = array();
 $formerror = '';
 $abortform = false;
@@ -158,6 +157,7 @@ if(sqgetGlobalVar('REQUEST_METHOD', $req_method, SQ_SERVER) && $req_method == 'P
                         $abortform = true;
                         list($ebackend, $enick) = explode(':', $sel[0]);
                         $olddata = $abook->lookup($enick, $ebackend);
+                        // FIXME: Test if $olddata really contains anything and return an error message if it doesn't
 
                         /* Display the "new address" form */
                         abook_create_form($form_url,'editaddr',_("Update address"),_("Update address"),$olddata);
@@ -175,13 +175,13 @@ if(sqgetGlobalVar('REQUEST_METHOD', $req_method, SQ_SERVER) && $req_method == 'P
                     if (!$r) {
                         /* Display error */
                         echo html_tag( 'table',
-                                       html_tag( 'tr',
-                                                 html_tag( 'td',
-                                                           "\n". '<strong><font color="' . $color[2] .
-                                                           '">' . _("ERROR") . ': ' . $abook->error . '</font></strong>' ."\n",
-                                                           'center' )
-                                                 ),
-                                       'center', '', 'width="100%"' );
+                                html_tag( 'tr',
+                                    html_tag( 'td',
+                                        "\n". '<strong><font color="' . $color[2] .
+                                        '">' . _("ERROR") . ': ' . $abook->error . '</font></strong>' ."\n",
+                                        'center' )
+                                    ),
+                                'center', '', 'width="100%"' );
 
                         /* Display the "new address" form again */
                         abook_create_form($form_url,'editaddr',_("Update address"),_("Update address"),$newdata);
@@ -291,7 +291,7 @@ if ($showaddrlist) {
                 }
 
                 // Print backend name
-                echo  html_tag( 'tr',
+                echo html_tag( 'tr',
                         html_tag( 'td', "\n" . '<strong>' . $row['source'] . '</strong>' . "\n", 'center', $color[0] ,'colspan="5"' )
                         );
 
@@ -379,5 +379,6 @@ echo "</form>\n";
 echo "<!-- start of addressbook_bottom hook-->\n";
 do_hook('addressbook_bottom');
 echo "\n<!-- end of addressbook_bottom hook-->\n";
+
 ?>
 </body></html>

+ 2 - 3
src/compose.php

@@ -34,8 +34,8 @@ require_once(SM_PATH . 'functions/plugin.php');
 require_once(SM_PATH . 'functions/display_messages.php');
 require_once(SM_PATH . 'class/deliver/Deliver.class.php');
 require_once(SM_PATH . 'functions/addressbook.php');
-require_once(SM_PATH . 'functions/identity.php');
 require_once(SM_PATH . 'functions/forms.php');
+require_once(SM_PATH . 'functions/identity.php');
 
 /* --------------------- Get globals ------------------------------------- */
 /** COOKIE VARS */
@@ -1658,5 +1658,4 @@ function deliverMessage($composeMessage, $draft=false) {
     return $succes;
 }
 
-// vim: et ts=4
-?>
+?>

+ 1 - 0
src/configtest.php

@@ -479,6 +479,7 @@ if( empty($ldap_server) ) {
         }
     }
 }
+
 ?>
 
 <p>Congratulations, your SquirrelMail setup looks fine to me!</p>

+ 2 - 0
src/delete_message.php

@@ -1,4 +1,5 @@
 <?php
+
 /**
  * delete_message.php
  *
@@ -23,5 +24,6 @@ include_once(SM_PATH . 'functions/display_messages.php');
 
 global $color;
 error_box('delete_message.php script is obsolete since 1.5.1.',$color);
+
 ?>
 </body></html>

+ 1 - 0
src/download.php

@@ -159,4 +159,5 @@ if (isset($absolute_dl) && $absolute_dl) {
 mime_print_body_lines ($imapConnection, $passed_id, $ent_id, $encoding);
 $mailbox_cache[$aMailbox['NAME']] = $aMailbox;
 sqsession_register($mailbox_cache,'mailbox_cache');
+
 ?>

+ 1 - 0
src/folders.php

@@ -367,6 +367,7 @@ if ($show_only_subscribed_folders) {
 
 do_hook('folders_bottom');
 sqimap_logout($imapConnection);
+
 ?>
     </td></tr>
     </table>

+ 1 - 0
src/help.php

@@ -211,5 +211,6 @@ do_hook('help_bottom');
 echo html_tag( 'tr',
             html_tag( 'td', '&nbsp;', 'left', $color[0] )
         );
+
 ?>
 </table></body></html>

+ 1 - 0
src/image.php

@@ -52,6 +52,7 @@ echo '<a href="'.$msg_url.'">'. _("View message") . '</a>';
 $DownloadLink = '../src/download.php?passed_id=' . $passed_id .
                '&amp;mailbox=' . urlencode($mailbox) .
                '&amp;ent_id=' . urlencode($ent_id) . '&amp;absolute_dl=true';
+
 ?>
 </b></td></tr>
 <tr><td align="center">

+ 15 - 14
src/login.php

@@ -173,23 +173,24 @@ echo html_tag( 'table',
                                     addHidden('js_autodetect_results', SMPREF_JS_OFF).
                                     $rcptaddress .
                                     addHidden('just_logged_in', '1'),
-                                'left', '', 'width="*"' )
-                            ) ,
-                        'center', $color[4], 'border="0" width="100%"' ) ,
-                    'left', $color[4] )
-                ) .
-                html_tag( 'tr',
-                    html_tag( 'td',
-                        '<center>'. addSubmit(_("Login")) .'</center>',
-                    'left' )
-                ),
-            '', $color[4], 'border="0" width="350"' ) . '</center>',
-        'center' )
-    ) ,
-'', $color[4], 'border="0" cellspacing="0" cellpadding="0" width="100%"' );
+                                    'left', '', 'width="*"' )
+                                ) ,
+                            'center', $color[4], 'border="0" width="100%"' ) ,
+                        'left', $color[4] )
+                        ) .
+                        html_tag( 'tr',
+                                html_tag( 'td',
+                                    '<center>'. addSubmit(_("Login")) .'</center>',
+                                    'left' )
+                                ),
+                        '', $color[4], 'border="0" width="350"' ) . '</center>',
+                        'center' )
+                        ) ,
+                        '', $color[4], 'border="0" cellspacing="0" cellpadding="0" width="100%"' );
 do_hook('login_form');
 echo '</form>' . "\n";
 
 do_hook('login_bottom');
+
 ?>
 </body></html>

+ 1 - 0
src/mailto.php

@@ -80,4 +80,5 @@ if($force_login == false && sqsession_is_registered('user_is_logged_in')) {
 
 session_write_close();
 header('Location: ' . get_location() . '/' . $redirect);
+
 ?>

+ 1 - 0
src/options.php

@@ -486,6 +486,7 @@ if ($optpage == SMOPT_PAGE_MAIN) {
         do_hook($bottom_hook_name);
     }
 }
+
 ?>
 </td></tr>
 </table>

+ 1 - 0
src/options_highlight.php

@@ -465,5 +465,6 @@ if ($action == 'edit' || $action == 'add') {
     echo "</form>\n";
 }
 do_hook('options_highlight_bottom');
+
 ?>
 </table></body></html>

+ 1 - 0
src/options_identities.php

@@ -357,4 +357,5 @@ function ShowTableInfo($full_name, $email_address, $reply_to, $signature, $post)
 
     return ($return_val);
 }
+
 ?>

+ 1 - 0
src/printer_friendly_bottom.php

@@ -186,4 +186,5 @@ function pf_clean_string ( $unclean_string, $num_leading_spaces ) {
 } /* end pf_clean_string() function */
 
 /* --end pf-specific functions */
+
 ?>

+ 1 - 0
src/printer_friendly_main.php

@@ -40,5 +40,6 @@ if ( ! sqgetGlobalVar('mailbox',$mailbox,SQ_GET) ||
         . '" name="bottom_frame" frameborder="0" />' . "\n";
     echo "</frameset>\n";
 }
+
 ?>
 </html>

+ 1 - 0
src/printer_friendly_top.php

@@ -39,5 +39,6 @@ echo '<body text="'.$color[8].'" bgcolor="'.$color[3].'" link="'.$color[7].'" vl
          '<input type="button" value="' . _("Close") . '" onclick="window.parent.close()" />'.
          '</form>',
      'right' );
+
 ?>
 </body></html>

+ 1 - 0
src/read_body.php

@@ -1009,5 +1009,6 @@ sqimap_logout($imapConnection);
  */
 $mailbox_cache[$iAccount.'_'.$aMailbox['NAME']] = $aMailbox;
 sqsession_register($mailbox_cache,'mailbox_cache');
+
 ?>
 </body></html>

+ 1 - 0
src/right_main.php

@@ -1,4 +1,5 @@
 <?php
+
 /**
  * right_main.php
  *

+ 1 - 0
src/search.php

@@ -1645,4 +1645,5 @@ do_hook('search_bottom');
 sqimap_logout($imapConnection);
 echo '</body></html>';
 sqsession_register($mailbox_cache,'mailbox_cache');
+
 ?>

+ 1 - 0
src/signout.php

@@ -95,6 +95,7 @@ html_tag( 'table',
          html_tag( 'td', '<br />', 'center' ) ,
     '', $color[0] ) ,
 'center', $color[4], 'width="50%" cellpadding="2" cellspacing="0" border="0"' )
+
 ?>
 </body>
 </html>

+ 2 - 0
src/view_html.php

@@ -1,4 +1,5 @@
 <?php
+
 /**
  * $Source$
  * Displays html message parts
@@ -97,4 +98,5 @@ $body = MagicHTML( $body, $passed_id, $message, $mailbox);
 /** TODO: charset might be part of html code. */
 header('Content-Type: text/html; charset=' . $charset);
 echo $body;
+
 ?>

+ 2 - 1
src/webmail.php

@@ -49,7 +49,7 @@ if (sqgetGlobalVar('startMessage', $startMessage)) {
     $startMessage = (int) $startMessage;
 }
 
-if (!sqgetGlobalVar('mailbox',$mailbox)) {
+if (!sqgetGlobalVar('mailbox', $mailbox)) {
     $mailbox = 'INBOX';
 }
 
@@ -180,6 +180,7 @@ if($ret != '') {
     $output = $ret;
 }
 echo $output;
+
 ?>
 </frameset>
 </html>