Advertisement
Guest User

roundcubeplugin owncloud

a guest
Jul 10th, 2012
27
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 3.18 KB | None | 0 0
  1. userSettings.php
  2.  
  3. 1,16c1,16
  4. < <?php
  5. < if ($_POST) {
  6. <   $myID = OC_RoundCube_App::existLoginData(OC_User::getUser());
  7. <   $mailuser = OC_RoundCube_App::cryptMyEntry($_POST['mailUsername']);
  8. <   $mailpass = OC_RoundCube_App::cryptMyEntry($_POST['mailPassword']);
  9. <   $stmt = OC_DB::prepare("UPDATE *PREFIX*roundcube SET mailUser = '$mailuser', mailPass = '$mailpass' WHERE id = $myID");
  10. <   $result = $stmt->execute();
  11. < }
  12. <
  13. < // fill template
  14. < $tmpl = new OC_Template( 'roundcube', 'userSettings');
  15. < /*foreach($params as $param){
  16. <                 $value = OC_Appconfig::getValue('roundcube', $param,'');
  17. <                 $tmpl->assign($param, $value);
  18. < }*/
  19. < return $tmpl->fetchPage();
  20. ---
  21. > <?php
  22. > if ($_POST) {
  23. >   $myID = OC_RoundCube_App::existLoginData(OC_User::getUser());
  24. >   $mailuser = OC_RoundCube_App::cryptMyEntry($_POST['mailUsername']);
  25. >   $mailpass = OC_RoundCube_App::cryptMyEntry($_POST['mailPassword']);
  26. >   $stmt = OC_DB::prepare("UPDATE *PREFIX*roundcube SET mailUser = '$mailuser', mailPass = '$mailpass' WHERE id = $myID");
  27. >   $result = $stmt->execute();
  28. > }
  29. >
  30. > // fill template
  31. > $tmpl = new OC_Template( 'roundcube', 'userSettings');
  32. > /*foreach($params as $param){
  33. >                 $value = OC_Appconfig::getValue('roundcube', $param,'');
  34. >                 $tmpl->assign($param, $value);
  35. > }*/
  36. > return $tmpl->fetchPage();
  37.  
  38.  
  39. =================================================
  40.  
  41. RoundcubeLogin.class.php
  42.  
  43. 267,268c267,268
  44. <         // Get current session ID cookie
  45. <         if ($_COOKIE['roundcube_sessid'])
  46. ---
  47. >          // Get current session ID cookie
  48. >         if (isset($_COOKIE['roundcube_sessid']))
  49. 271c271
  50. <         if ($_COOKIE['roundcube_sessauth'])
  51. ---
  52. >         if (isset($_COOKIE['roundcube_sessauth']))
  53. 322,323c322,330
  54. <         $port = ($_SERVER['HTTPS']) ? 443 : 80;
  55. <         $host = (($port == 443) ? "ssl://" : "").$_SERVER['HTTP_HOST'];
  56. ---
  57. >        $port = (isset($_SERVER['HTTPS'])) ? 443 : 80;
  58. >       if(isset($_SERVER['HTTP_X_FORWARDED_HOST'])){
  59. >           $port = 443;
  60. >           $host = "ssl://" .$_SERVER['HTTP_X_FORWARDED_HOST'];
  61. >           $reqhost = $_SERVER['HTTP_X_FORWARDED_HOST'];
  62. >       }else{
  63. >           $host = (($port == 443) ? "ssl://" : "").$_SERVER['HTTP_HOST'];
  64. >           $reqhost = $_SERVER['HTTP_HOST'];
  65. >       }
  66. 332,333c339,340
  67. <         // Add roundcube session ID if available
  68. <         if (!$_COOKIE['roundcube_sessid'] && $this->rcSessionID)
  69. ---
  70. >          // Add roundcube session ID if available
  71. >         if (!isset($_COOKIE['roundcube_sessid']) && $this->rcSessionID)
  72. 336c343
  73. <         if (!$_COOKIE['roundcube_sessauth'] && $this->rcSessionAuth)
  74. ---
  75. >         if (!isset($_COOKIE['roundcube_sessauth']) && $this->rcSessionAuth)
  76. 341c348
  77. <         // Create POST request with the given data
  78. ---
  79. >        // Create POST request with the given data
  80. 345c352
  81. <                 . "Host: ".$_SERVER['HTTP_HOST']."\r\n"
  82. ---
  83. >                 . "Host: ".$reqhost."\r\n"
  84. 359c366
  85. <                 . "Host: ".$_SERVER['HTTP_HOST']."\r\n"
  86. ---
  87. >                 . "Host: ".$reqhost."\r\n"
  88.  
  89.  
  90. =================================================
  91.  
  92. mail.php
  93.  
  94.  
  95. 152c152
  96. <           echo "//".$removeHeaderNav;
  97. ---
  98. >           echo "".$removeHeaderNav;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement