svn: /web/php-rmtools/trunk/ docroot/rm/index.php script/createbranch.php template/header.php template/revision_list_yui.php

From: Date: Tue, 12 Jan 2010 11:04:10 +0000
Subject: svn: /web/php-rmtools/trunk/ docroot/rm/index.php script/createbranch.php template/header.php template/revision_list_yui.php
Groups: php.webmaster 
Request: Send a blank email to php-webmaster+get-6976@lists.php.net to get a copy of this message
pajoye Tue, 12 Jan 2010 11:04:10 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=293444 Log: - pass release name to json request in the row editor - fix help text in createbranch - catch possible errors when we initiate the storage in the main section Changed paths: U web/php-rmtools/trunk/docroot/rm/index.php U web/php-rmtools/trunk/script/createbranch.php U web/php-rmtools/trunk/template/header.php U web/php-rmtools/trunk/template/revision_list_yui.php Modified: web/php-rmtools/trunk/docroot/rm/index.php =================================================================== --- web/php-rmtools/trunk/docroot/rm/index.php 2010-01-12 11:04:05 UTC (rev 293443) +++ web/php-rmtools/trunk/docroot/rm/index.php 2010-01-12 11:04:10 UTC (rev 293444) @@ -12,15 +12,21 @@ include 'login.php'; +$json = filter_input(INPUT_GET, 'json', FILTER_VALIDATE_INT); $release_name = filter_input(INPUT_GET, 'release', FILTER_SANITIZE_NUMBER_FLOAT,FILTER_FLAG_ALLOW_FRACTION); +$mode = filter_input(INPUT_GET, 'mode', FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW|FILTER_FLAG_STRIP_HIGH); $title = $release_name; + try { $svn = new rm\Storage($release_name); } catch (Exception $e) { $error = $e->getMessage(); + if ($json) { + header('HTTP/1.0 500 Internal Error'); + } $tpl = 'error.php'; + $mode = 'error'; } -$mode = filter_input(INPUT_GET, 'mode', FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW|FILTER_FLAG_STRIP_HIGH); switch ($mode) { case 'list': @@ -38,7 +44,6 @@ break; case 'edit': - $json = filter_input(INPUT_GET, 'json', FILTER_VALIDATE_INT); if ($json) { $rev = filter_input(INPUT_POST, 'revision', FILTER_VALIDATE_INT); } else { @@ -89,6 +94,8 @@ $tpl = 'edit_revision.php'; } break; + case 'error': + break; case 'menu': default: @@ -101,6 +108,7 @@ $tpl = 'error.php'; } } + include TPL_PATH . '/header.php'; include TPL_PATH . '/'. $tpl; include TPL_PATH . '/footer.php'; Modified: web/php-rmtools/trunk/script/createbranch.php =================================================================== --- web/php-rmtools/trunk/script/createbranch.php 2010-01-12 11:04:05 UTC (rev 293443) +++ web/php-rmtools/trunk/script/createbranch.php 2010-01-12 11:04:10 UTC (rev 293444) @@ -7,7 +7,7 @@ use rmtools as rm; if ($argc < 4) { - echo "Usage: updatebranch <release name> <release branch name> <dev branch name> <last revision> <rm1> <rm2>... + echo "Usage: createbranch <release name> <release branch name> <dev branch name> <last revision> <rm1> <rm2>... <release name>\tname of the new release (5.3.3) <release branch name>\tname of the new release branch (PHP_5_3_3) <dev branch name>\tname of the new branch name (PHP_5_3) Modified: web/php-rmtools/trunk/template/header.php =================================================================== --- web/php-rmtools/trunk/template/header.php 2010-01-12 11:04:05 UTC (rev 293443) +++ web/php-rmtools/trunk/template/header.php 2010-01-12 11:04:10 UTC (rev 293444) @@ -42,7 +42,7 @@ color: #fff; padding-bottom: 8px; </style> -<?php if ($extra_head) { +<?php if (!$error && $extra_head) { include $extra_head; } ?> Modified: web/php-rmtools/trunk/template/revision_list_yui.php =================================================================== --- web/php-rmtools/trunk/template/revision_list_yui.php 2010-01-12 11:04:05 UTC (rev 293443) +++ web/php-rmtools/trunk/template/revision_list_yui.php 2010-01-12 11:04:10 UTC (rev 293444) @@ -31,7 +31,7 @@ }; var handleFailure = function(o) { - alert("Submission failed: " + o.status + "\nResponse: " + o.response.Text); + alert("Submission failed: " + o.status + "\nResponse: " + o.responseText); }; // Remove progressively enhanced content class, just before creating the module @@ -76,7 +76,7 @@ <div class="bd"> <form method="post" action= - "index.php?mode=edit&json=1"> + "index.php?mode=edit&json=1&release=<?php echo $release_name;?>"> <div id="meta"></div><label for= "comment">Comment:</label> <textarea name="comment">

« previous php.webmaster (#6976) next »