Details

      Description

      A problem exists where some board softwares do not have a board startdate causing the board startdate to be the date of the phpBB3 installation, not the date of the original board installation.

      Presently, to set the board startdate, the board startdate can be included in the convertor config schema or a separate function has to be written and included with the convertor files to set the board startdate. The convertor author should not have to write their own board startdate function since one already exists in the UCF in install_convert.php. The problem is, the in-built function very rarely runs due to the fact that it checks only if the phpBB3 $config board startdate is set. The phpBB3 $config board startdate will be unset only on very rare occasions. An additional check can be put in place to check if the convertor includes the board startdate in the convertor config_schema. If it is not included, then the in-built board startdate function will run.

        Activity

        Hide
        rxu Ruslan Uzdenov added a comment -

        install/install_convert.php, the whole code looks wrong:

        			if (!isset($config['board_startdate']))
        			{
        				$sql = 'SELECT MIN(user_regdate) AS board_startdate
        					FROM ' . USERS_TABLE;
        				$result = $db->sql_query($sql);
        				$row = $db->sql_fetchrow($result);
        				$db->sql_freeresult($result);
         
        				if (($row['board_startdate'] < $config['board_startdate'] && $row['board_startdate'] > 0) || !isset($config['board_startdate']))
        				{
        					set_config('board_startdate', $row['board_startdate']);
        					$db->sql_query('UPDATE ' . USERS_TABLE . ' SET user_regdate = ' . $row['board_startdate'] . ' WHERE user_id = ' . ANONYMOUS);
        				}
        			}

        Show
        rxu Ruslan Uzdenov added a comment - install/install_convert.php, the whole code looks wrong: if (!isset($config['board_startdate'])) { $sql = 'SELECT MIN(user_regdate) AS board_startdate FROM ' . USERS_TABLE; $result = $db->sql_query($sql); $row = $db->sql_fetchrow($result); $db->sql_freeresult($result);   if (($row['board_startdate'] < $config['board_startdate'] && $row['board_startdate'] > 0) || !isset($config['board_startdate'])) { set_config('board_startdate', $row['board_startdate']); $db->sql_query('UPDATE ' . USERS_TABLE . ' SET user_regdate = ' . $row['board_startdate'] . ' WHERE user_id = ' . ANONYMOUS); } }

          People

          • Assignee:
            nickvergessen Joas Schilling
            Reporter:
            D¡cky Richard Foote [X] (Inactive)
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development