delFsTree($pluginDestination . '/' . $dirEntry . '.' . $bu_dir); $installOk = true; } elseif (is_dir($pluginDestination . '/' . $dirEntry . '.' . $bu_dir)) { ## try to place old one back @rename($pluginDestination . '/' . $dirEntry . '.' . $bu_dir, $pluginDestination . '/' . $dirEntry); } } } foreach ($pluginInfo as $plugin => $pluginDetails) { # print 'Writing '.$pluginDestination.'/'.$plugin.'.info.txt<br/>'; file_put_contents($pluginDestination . '/' . $plugin . '.info.txt', serialize($pluginDetails)); } ## clean up delFsTree($GLOBALS['tmpdir'] . '/phpListPluginInstall'); if ($installOk) { upgradePlugins($pluginsForUpgrade); print s('Plugin installed successfully'); } else { print s('Error installing plugin'); } $zip->close(); print '<hr/>' . PageLinkButton('plugins', s('Continue')); return; } } else { Error(s('Plugin directory is not writable')); } } else { Error(s('Invalid plugin package')); } print s('Plugin installation failed');
} ## #17328 - remove list categories with quotes Sql_Query(sprintf("update %s set category = replace(category,\"\\\\'\",\" \")", $tables['list'])); ## longblobs are better at mixing character encoding. We don't know the encoding of anything we may want to store in cache ## before converting, it's quickest to clear the cache clearPageCache(); Sql_Query(sprintf('alter table %s change column content content longblob', $tables['urlcache'])); # mark the database to be our current version if ($success) { SaveConfig('version', VERSION, 0); # mark now to be the last time we checked for an update SaveConfig('updatelastcheck', date('Y-m-d H:i:s', time()), 0, true); ## also clear any possible value for "updateavailable" Sql_Query(sprintf('delete from %s where item = "updateavailable"', $tables['config'])); Info(s('Success'), 1); upgradePlugins(array_keys($GLOBALS['plugins'])); print subscribeToAnnouncementsForm(); ## check for old click track data $num = Sql_Fetch_Row_Query(sprintf('select count(*) from %s', $GLOBALS['tables']['linktrack'])); if ($num[0] > 0) { print '<p class="information">' . $GLOBALS['I18N']->get('The clicktracking system has changed') . '</p>'; printf($GLOBALS['I18N']->get('You have %s entries in the old statistics table'), $num[0]) . ' '; print ' ' . PageLinkButton('convertstats', $GLOBALS['I18N']->get('Convert Old data to new')); } if ($GLOBALS['commandline']) { output($GLOBALS['I18N']->get('Upgrade successful')); } } else { Error('An error occurred while upgrading your database'); if ($GLOBALS['commandline']) { output($GLOBALS['I18N']->get('Upgrade failed'));