Lines Matching +full:commit +full:- +full:message

56         if(!$this->dt)
58 $this->dt =& plugin_load('syntax', 'data_entry');
59 if(!$this->dt)
61 …('Error loading the data table class from GIT Helper. Make sure the data plugin is installed.',-1);
80 $pattern = '/----.*dataentry.*\R----/s';
87 // Re-use the handle method to get the formatted data
90 $formatted = $this->dt->handle($cleanedMatch, null, null, $dummy);
93 // Re-use the save_data method to .... (drum roll) save the data.
95 $html = $this->dt->_saveData($formatted, $entry['id'], 'Title'.count($output));
109 $res = $this->loadSqlite();
118 $this->sqlite->query($sql);
125 $res = $this->loadSqlite();
128 $res = $this->sqlite->query("SELECT status FROM git WHERE repo = 'local'");
129 $rows = $this->sqlite->res2arr($res);
138 $res = $this->loadSqlite();
144 $this->sqlite->query($sql);
146 $this->changeReadOnly(true);
147 $this->sendNotificationEMail();
153 $this->getConf('');
159 $mail->to($notify);
160 $mail->subject('An improvement has been submitted for approval!');
161 … $mail->setBody('Please review the proposed changes before the next meeting: '.$local_status_page);
163 return $mail->send();
169 $this->getConf('');
175 $repo->git_path = $git_exe_path;
176 $repo->clone_from($origin);
182 msg($e->getMessage());
222 …$renderer->doc .= "<select id='git_commit' width=\"800\" style=\"width: 800px\" onchange='ChangeGi…
224 $renderer->doc .= "<option>Select a commit</option>";
225 foreach($commits as $commit)
227 // Replace merge commit message with a more user friendly msg, leaving the orrigional
228 $raw_message = $commit['message'];
234 $renderer->doc .= "<option value=\"".$commit['hash']."\"";
235 // Is this option already selected before an html round-trip ??
236 if ($commit['hash'] === $selected_hash) $renderer->doc .= "selected=\"selected\"";
237 if ($commit['hash'] === 'all') $renderer->doc .= ">".$msg."</option>";
238 else $renderer->doc .= ">".$index." - ".$msg."</option>";
241 $renderer->doc .= '</select>';
249 foreach($commits as $commit)
251 $hash = $commit['hash'];
256 …$renderer->doc .= "<div class=\"commit_div\" id='".$hash."' style=\"".$divVisibility." width: 100%…
261 $files = explode("\n", $repo->get_status());
265 $files = explode("\n", $repo->get_files_by_commit('origin/master..HEAD'));
269 $files = explode("\n", $repo->get_files_by_commit($hash));
275 …$renderer->doc .= "<p><br/>No files have changed for the selected item. If a merge is selected, th…
279 $renderer->doc .= '<br/><h3>The content of the selected commit:</h3>';
281 … $renderer->doc .= "<table><tr><th>Change type</th><th>Page</th><th>Changes</th></tr>";
286 $renderer->doc .= "<tr><td>";
290 $renderer->doc .= "Added:";
292 $renderer->doc .= "Modified:";
294 $renderer->doc .= "Added:";
296 $renderer->doc .= "Removed:";
298 $renderer->doc .= "Removed:";
300 $renderer->doc .= "Removed:";
302 $renderer->doc .= "</td><td>";
304 $page = $this->getPageFromFile($file);
305 $renderer->doc .= '<a href="'.DOKU_URL.'doku.php?id='.$page.'">'.$page.'</a>';
307 $renderer->doc .= "</td><td>";
308 $renderer->doc .= ' <form method="post">';
309 … $renderer->doc .= ' <input type="hidden" name="filename" value="'.$file.'" />';
310 …$renderer->doc .= ' <input type="hidden" name="hash" value="'.$commit['hash'].'" />'; …
311 $renderer->doc .= ' <input type="submit" value="View Changes" />';
312 $renderer->doc .= ' </form>';
313 $renderer->doc .= "</td>";
314 $renderer->doc .= "</tr>";
316 $renderer->doc .= "</table>";
318 $renderer->doc .= "</div>\n";
330 // Replace all sorts of stuff so it makes sense to non-technical users.
343 $this->getConf('');
346 $page = $this->getPageFromFile($fileForDiff);
350 $renderer->doc .= '<div id="diff_table" class="table">';
353 $renderer->doc .= '<h2>Changes to: '.$page.'</h2>';
356 if ($hash === 'all') $renderer->doc .= '<p>Left = The current page in Live<br/>';
357 … else $renderer->doc .= '<p>Left = The page before the selected commited retrieved from GIT <br/>';
358 $renderer->doc .= 'Right = The page after the selected commit</p>';
360 // LEFT: Find the file before for the selected commit
361 if ($hash === 'all') $l_text = $repo->getFile($fileForDiff, 'origin/master');
362 else $l_text = $repo->getFile($fileForDiff, $hash."~1");
364 // RIGHT: Find the file for the selected commit
365 if ($hash === 'all') $r_text = $repo->getFile($fileForDiff, 'HEAD');
366 else $r_text = $repo->getFile($fileForDiff, $hash);
368 else if ($mode == 'Commit local') {
369 $renderer->doc .= '<p>Left = The last page commited to GIT <br/>';
370 $renderer->doc .= 'Right = Current wiki content</p>';
373 $l_text = $repo->getFile($fileForDiff, 'HEAD');
378 $r_text = $this->getFileContents($current_filename);
381 $renderer->doc .= '<p>Left = Current wiki content<br/>';
382 $renderer->doc .= 'Right = Upstream changes to be merged</p>';
387 $l_text = $this->getFileContents($current_filename);
390 $r_text = $repo->getFile($fileForDiff, $hash);
396 $renderer->doc .= '<table class="diff diff_inline">';
397 $renderer->doc .= $tdf->format($df);
398 $renderer->doc .= '</table>';
399 $renderer->doc .= '</div>';
405 $isAdmin = $this->isCurrentUserAnAdmin();
408 $renderer->doc .= '<form method="post">';
409 …$renderer->doc .= ' <input type="submit" name="cmd[revert]" value="Reject and revert Approval Su…
410 $renderer->doc .= ' <input type="submit" name="cmd[push]" value="Push to live!" />';
411 $renderer->doc .= '</form>';
436 if ($this->sqlite) return true;
438 $this->sqlite =& plugin_load('helper', 'sqlite');
439 if (is_null($this->sqlite)) {
440 msg('The sqlite plugin could not loaded from the GIT Plugin helper', -1);
443 if($this->sqlite->init('git',DOKU_PLUGIN.'git/db/')){
446 msg('Submitting changes failed as the GIT cache failed to initialise.', -1);
455 $res = $this->loadSqlite();
459 $res = $this->sqlite->query($sql);
460 $rows = $this->sqlite->res2arr($res);
462 if ($timestamp < time() - (60 * 30)) // 60 seconds x 5 minutes
474 $res = $this->loadSqlite();
478 $res = $this->sqlite->query($sql);
479 $rows = $this->sqlite->res2arr($res);
490 $res = $this->loadSqlite();
494 $res = $this->sqlite->query($sql);
495 $rows = $this->sqlite->res2arr($res);
497 if ($timestamp < time() - (60 * 60)) // 60 seconds x 60 minutes = 1 hour
508 $res = $this->loadSqlite();
512 $res = $this->sqlite->query($sql);
513 $rows = $this->sqlite->res2arr($res);
522 $this->getConf('');
527 $res = $this->loadSqlite();
531 if ($this->hasUpstreamCacheTimedOut())
534 $repo->git_path = $git_exe_path;
536 if ($repo->test_origin() === false) {
541 $repo->fetch();
542 $log = $repo->get_log();
548 $this->sqlite->query($sql);
553 $this->sqlite->query($sql);
558 $updatesAvailable = $this->readUpstreamStatusFromCache();