News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

2.0.14 to 2.0.15 Error

Started by Kestryll, November 21, 2017, 01:59:38 PM

Previous topic - Next topic

Kestryll

I'm trying to update my SMF forum but I'm getting an 'Error in Package Installation' notice.
Apparently './Sources/PersonalMessage.php' failed the testing prior to updating.

It did give me some details but I'm not conversant enough with SMF coding to know what this means.
Am I missing a file somewhere or is this something new?

QuoteCode: (Find) [Select]
// Who matches those criteria?
      // !!! This doesn't support sent item searching.
      $request = $smcFunc['db_query']('', '
         SELECT id_member
         FROM {db_prefix}members
         WHERE real_name LIKE {raw:real_name_implode}',
         array(
            'real_name_implode' => '\'' . implode('\' OR real_name LIKE \'', $possible_users) . '\'',
         )
      );
      // Simply do nothing if there're too many members matching the criteria.
      if ($smcFunc['db_num_rows']($request) > $maxMembersToSearch)
         $userQuery = '';
      elseif ($smcFunc['db_num_rows']($request) == 0)
      {
         $userQuery = 'AND pm.id_member_from = 0 AND (pm.from_name LIKE {raw:guest_user_name_implode})';
         $searchq_parameters['guest_user_name_implode'] = '\'' . implode('\' OR pm.from_name LIKE \'', $possible_users) . '\'';
      }
      else
      {
         $memberlist = array();
         while ($row = $smcFunc['db_fetch_assoc']($request))
            $memberlist[] = $row['id_member'];
         $userQuery = 'AND (pm.id_member_from IN ({array_int:member_list}) OR (pm.id_member_from = 0 AND (pm.from_name LIKE {raw:guest_user_name_implode})))';
         $searchq_parameters['guest_user_name_implode'] = '\'' . implode('\' OR pm.from_name LIKE \'', $possible_users) . '\'';
         $searchq_parameters['member_list'] = $memberlist;
      }
      $smcFunc['db_free_result']($request);

QuoteCode: (Replace) [Select]
if (!empty($possible_users))
      {
         // We need to bring this into the query and do it nice and cleanly.
         $where_params = array();
         $where_clause = array();
         foreach ($possible_users as $k => $v)
         {
            $where_params['name_' . $k] = $v;
            $where_clause[] = '{raw:real_name} LIKE {string:name_' . $k . '}';
            if (!isset($where_params['real_name']))
               $where_params['real_name'] = $smcFunc['db_case_sensitive'] ? 'LOWER(real_name)' : 'real_name';
         }

         // Who matches those criteria?
         // !!! This doesn't support sent item searching.
         $request = $smcFunc['db_query']('', '
            SELECT id_member
            FROM {db_prefix}members
            WHERE ' . implode(' OR ', $where_clause),
            $where_params
         );

         // Simply do nothing if there're too many members matching the criteria.
         if ($smcFunc['db_num_rows']($request) > $maxMembersToSearch)
            $userQuery = '';
         elseif ($smcFunc['db_num_rows']($request) == 0)
         {
            $where_params['real_name'] = 'pm.from_name';
            $searchq_parameters = array_merge($searchq_parameters, $where_params);
            $userQuery = 'AND pm.id_member_from = 0 AND (' . implode(' OR ', $where_clause) . ')';
         }
         else
         {
            $memberlist = array();
            while ($row = $smcFunc['db_fetch_assoc']($request))
               $memberlist[] = $row['id_member'];

            $where_params['real_name'] = 'pm.from_name';
            $searchq_parameters = array_merge($searchq_parameters, $where_params);
            $searchq_parameters['member_list'] = $memberlist;
            $userQuery = 'AND (pm.id_member_from IN ({array_int:member_list}) OR (pm.id_member_from = 0 AND (' . implode(' OR ', $where_clause) . ')))';
         }
         $smcFunc['db_free_result']($request);
      }
      else
         $userQuery = '';

Gwenwyfar

Do you have any mods installed?
"It is impossible to communicate with one that does not wish to communicate"

Kestryll

Now that you mention it I do have a mod called 'Search Sent PMs' installed. Given that the issue is with PMs that may well be the culprit.
I'll uninstall it and give the update a try.

Kestryll

That did it.
I didn't think I had installed anything related to the PMs but apparently back in the 1.X days I did.

Thanks for the suggestion!

Gwenwyfar

No problem, glad that solved it for you :) Always a good idea to check mods whenever an install has failures.
"It is impossible to communicate with one that does not wish to communicate"

aegersz

if you want to run that mod then you may want to let the author (dougiefresh, i believe) know if you are running the mod's latest version as some 2.0.15 compatability fixes may be in order.

i have had to make changes already so go to the mods board and report it there.
The configuration of my Linux VPS (SMF 2.0 with 160+ mods & some assorted manual tweaks) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum). My (House) music DJ dedication page is here

Advertisement: