Lines Matching defs:changelog
114 * Adds an entry to the linkbacks changelog
123 $changelog = $conf['metadir'] . '/_linkbacks.changes';
143 // add changelog line
145 io_saveFile($changelog, $logline, true); //global changelog cache
146 $this->_trimRecentCommentsLog($changelog);
156 function _trimRecentCommentsLog($changelog) {
159 if (@ file_exists($changelog) && (filectime($changelog) + 86400) < time() && !@ file_exists($changelog .
162 io_lock($changelog);
163 $lines = file($changelog);
166 io_unlock($changelog);
170 io_saveFile($changelog . '_tmp', ''); // presave tmp as 2nd lock
187 // however the extra robustness in making the changelog cache self-correcting is worth it
195 // save trimmed changelog
196 io_saveFile($changelog . '_tmp', implode('', $out_lines));
197 @ unlink($changelog);
198 if (!rename($changelog . '_tmp', $changelog)) {
200 io_unlock($changelog);
201 io_saveFile($changelog, implode('', $out_lines));
202 @ unlink($changelog . '_tmp');
204 io_unlock($changelog);