/** * @param $branch * @return bool */ function is_trunk($branch) { return $branch == full('trunk'); }
// (c) Copyright 2002-2016 by authors of the Tiki Wiki CMS Groupware Project // // All Rights Reserved. See copyright.txt for details and a complete list of authors. // Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details. // $Id$ require dirname(__FILE__) . '/svntools.php'; // Perform basic checks info("Verifying..."); if (!isset($_SERVER['argc']) || $_SERVER['argc'] != 3) { error("Missing argument. Expecting tagged version to build increment from and to.\n\nExamples:\n\t2.0 2.2\n\t2.1 2.2"); } $fromVersion = $_SERVER['argv'][1]; $toVersion = $_SERVER['argv'][2]; $from = full("tags/{$fromVersion}"); $to = full("tags/{$toVersion}"); $fromRep = get_info($source); $toRep = get_info($branch); $local = get_info('.'); if (!isset($fromRep->entry)) { error("The origin tag does not exist."); } if (!isset($toRep->entry)) { error("The destination tag does not exist."); } if (!isset($local->entry)) { error("The current folder is not a local copy."); } if (has_uncommited_changes('.')) { error("Local copy contains uncommited changes."); }
// $Id$ require dirname(__FILE__) . '/svntools.php'; // Perform basic checks info("Verifying..."); if (!isset($_SERVER['argc']) || $_SERVER['argc'] != 2) { error("Missing argument. Expecting branch to merge as argument.\n\nExamples:\n\tbranches/experimental/foobar"); } $local = get_info('.'); if (!isset($local->entry)) { error("Local copy not found."); } $destination = $local->entry->url; if (!is_trunk($destination)) { error("This script is likely not to be appropriate for this working copy. This script can be used in:\n\ttrunk"); } $source = full($_SERVER['argv'][1]); if (!is_experimental($source)) { error("The provided source cannot be used to update this working copy. Only experimental branches can be used."); } if (has_uncommited_changes('.')) { error("Working copy has uncommited changes. Revert or commit them before merging a branch."); } $revision = (int) get_info($destination)->entry->commit['revision']; $last = find_last_merge($source, $destination); $sDest = short($destination); $sSource = short($source); if ($last !== $revision) { error("You must branchupdate {$sSource} from {$sDest} before merging."); } // Proceed to update info("Updating...");
<?php // (c) Copyright 2002-2010 by authors of the Tiki Wiki/CMS/Groupware Project // // All Rights Reserved. See copyright.txt for details and a complete list of authors. // Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details. // $Id$ require dirname(__FILE__) . '/svntools.php'; // Perform basic checks if (!isset($_SERVER['argc']) || $_SERVER['argc'] != 2) { error("Missing argument. Expecting branch to review as argument.\n\nExamples:\n\tbranches/experimental/plugin_ui"); } $source = full($_SERVER['argv'][1]); $trunk = full('trunk'); if (!is_experimental($source)) { error("This script is only valid to review experimental branches."); } $last = find_last_merge($source, $trunk); if (!$last) { error("Could not find previous merge."); } $eS = escapeshellarg($source); $eT = escapeshellarg($trunk); passthru("svn diff {$eT}@{$last} {$eS}");
function make_link($atts) { extract(shortcode_atts(array('link' => '/', 'type' => 'full', 'tw' => 'tw', 'fb' => 'fb', 'pt' => 'pt', 'ig' => 'ig'), $atts)); switch ($type) { case 'full': return full($link); case 'short': return short($link); case 'wide': return wide($link); case 'socials': return socials(array('main' => $link, 'tw' => $tw, 'fb' => $fb, 'pt' => $pt, 'ig' => $ig)); } }
<?php // (c) Copyright 2002-2016 by authors of the Tiki Wiki CMS Groupware Project // // All Rights Reserved. See copyright.txt for details and a complete list of authors. // Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details. // $Id$ require dirname(__FILE__) . '/svntools.php'; // Perform basic checks info("Verifying..."); if (!isset($_SERVER['argc']) || $_SERVER['argc'] != 2) { error("Missing argument. Expecting branch to create from trunk as argument.\n\nExamples:\n\tbranches/5.x\n\tbranches/experimental/foobar"); } $source = full('trunk'); $branch = full($_SERVER['argv'][1]); $repo = get_info($source); $target = get_info($branch); if (isset($target->entry)) { error("The branch already exists."); } if (!is_valid_branch($branch)) { error("The provided branch is not an acceptable branch location."); } $revision = (int) $repo->entry->commit['revision']; // Execute info("Branching..."); if (!branch($source, $branch, $revision)) { error("Branch could not be created."); }
} if (!$options['no-secdb'] && important_step("Generate SecDB file 'db/tiki-secdb_{$version}_mysql.sql'")) { write_secdb(ROOT . "/db/tiki-secdb_{$version}_mysql.sql", ROOT, $secdbVersion); important_step("Commit SecDB file", true, "[REL] SecDB for {$secdbVersion}"); } if ($isPre) { if (!$options['no-packaging'] && important_step("Build packages files (based on the branch)")) { build_packages($packageVersion, $branch); echo color("\nMake sure these tarballs are tested by at least 3 different people.\n\n", 'cyan'); } else { echo color("This was the last step.\n", 'cyan'); } } else { if (!$options['no-tagging']) { $fb = full($branch); $ft = full($tag); $tagAlreadyExists = isset(get_info($ft)->entry); if ($tagAlreadyExists && important_step("The Tag '{$tag}' already exists: Delete the existing tag in order to create a new one")) { `svn rm {$ft} -m "[REL] Deleting tag '{$tag}' in order to create a new one"`; $tagAlreadyExists = false; info(">> Tag '{$tag}' deleted."); } if (!$tagAlreadyExists) { update_working_copy('.'); $revision = (int) get_info(ROOT)->entry->commit['revision']; if (important_step("Tag release using branch '{$branch}' at revision {$revision}")) { `svn copy {$fb} -r{$revision} {$ft} -m "[REL] Tagging release"`; info(">> Tag '{$tag}' created."); } } }
function getlist() { fwrite(STDOUT, "-FILE: "); $getfile = trim(fgets(STDIN)); $handle = fopen($getfile, "r"); while (!feof($handle)) { $line = fgets($handle); $try = trim($line); full($try); } fclose($handle); }
if (pomeriggio($dati['database'], $data["id"], $dati["user"])) { echo ' <a href="' . $dati['info']['root'] . 'aule/' . $data["id"] . '" class="btn btn-danger btn-block btn-lg">Elimina iscrizione</a>'; } } echo ' </p> </div> </div>'; require_once 'shared/footer.php'; } } else { require_once 'shared/404.php'; } } else { if (isset($id) && classe($dati['database'], $dati["user"]) && !pomeriggio($dati['database'], $id, $dati["user"]) && !full($dati['database'], $id) && tempopomeriggio($dati['database'], $id)) { if ($dati['database']->count("pomeriggio", array("AND" => array("persona" => $dati["user"], "aula" => $id, "stato" => 1))) != 0) { $dati['database']->update("pomeriggio", array("stato" => 0), array("AND" => array("persona" => $dati["user"], "aula" => $id))); } else { $dati['database']->insert("pomeriggio", array("persona" => $dati["user"], "aula" => $id, "stato" => 0)); } } else { if (isset($id) && classe($dati['database'], $dati["user"]) && pomeriggio($dati['database'], $id, $dati["user"]) && tempopomeriggio($dati['database'], $id)) { $dati['database']->delete("pomeriggio", array("AND" => array("persona" => $dati["user"], "aula" => $id))); } else { $pageTitle = "Aule studio"; $datatable = true; $readmore = true; require_once 'shared/header.php'; echo '<div class="jumbotron no-color edge-bottom"> <div class="container text-center">