Permalink
Browse files

# some nitpick variable initializations to make the IDE happy.

  • Loading branch information...
1 parent 540c04b commit 7a2e3abfb25031d073b3b89bf154933ecc258f95 @mysnip mysnip committed Jan 5, 2012
Showing with 15 additions and 4 deletions.
  1. +2 −0 changes.php
  2. +2 −0 feed.php
  3. +7 −4 list.php
  4. +1 −0 profile.php
  5. +3 −0 report.php
View
2 changes.php
@@ -69,6 +69,8 @@
$prev_body = -1;
$prev_subject = -1;
+$message_hist = array();
+
foreach($diffs as $diff_info){
if(!isset($diff_info["user_id"])){
View
2 feed.php
@@ -41,6 +41,8 @@
$which = $PHORUM['forum_id'];
}
else {
+ $what = "";
+ $which= "";
trigger_error(
"The feed script was called with a folder id as the " .
"forum_id argument. This is not supported.",
View
11 list.php
@@ -170,13 +170,16 @@
$rows = NULL;
$bodies_in_list = isset($PHORUM['TMP']['bodies_in_list']) && $PHORUM['TMP']['bodies_in_list'];
+
+// always init cache key
+$cache_key = $PHORUM['forum_id']."-".$PHORUM['cache_version']."-".$page."-";
+$cache_key.= $PHORUM['threaded_list']."-".$PHORUM['threaded_read']."-".$PHORUM["language"];
+$cache_key.= "-".$PHORUM["count_views"]."-".($bodies_in_list?"1":"0")."-".$PHORUM['float_to_top'];
+$cache_key.= "-".$PHORUM['user']['tz_offset'];
+
if($PHORUM['cache_messages'] &&
(!$PHORUM['DATA']['LOGGEDIN'] || $PHORUM['use_cookies']) &&
!$PHORUM['count_views']) {
- $cache_key = $PHORUM['forum_id']."-".$PHORUM['cache_version']."-".$page."-";
- $cache_key.= $PHORUM['threaded_list']."-".$PHORUM['threaded_read']."-".$PHORUM["language"];
- $cache_key.= "-".$PHORUM["count_views"]."-".($bodies_in_list?"1":"0")."-".$PHORUM['float_to_top'];
- $cache_key.= "-".$PHORUM['user']['tz_offset'];
$rows = phorum_api_cache_get('message_list',$cache_key);
}
View
1 profile.php
@@ -27,6 +27,7 @@
$error = "";
// redirect if no profile id passed
+$profile_id=0;
if(!empty($PHORUM["args"][1])){
$profile_id = (int)$PHORUM["args"][1];
}
View
3 report.php
@@ -35,10 +35,13 @@
$template = "report";
$message=array();
+$message_id = 0;
// get the message
if (isset($PHORUM["args"][1]) && is_numeric($PHORUM["args"][1])) {
$message_id = $PHORUM["args"][1];
$message = $PHORUM['DB']->get_message($message_id);
+} else {
+ phorum_api_redirect(PHORUM_LIST_URL);
}
if (is_array($message) && count($message))

0 comments on commit 7a2e3ab

Please sign in to comment.