Skip to content

Commit

Permalink
Build script
Browse files Browse the repository at this point in the history
  • Loading branch information
rtripault committed Apr 28, 2013
1 parent 17c4f79 commit 8c1f826
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 5 deletions.
4 changes: 2 additions & 2 deletions _build/build.config.sample.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* @package tvsorter
* @subpackage build
*/
define('MODX_BASE_PATH', dirname(dirname(dirname(dirname(__FILE__)))) . '/modx/');
define('MODX_BASE_PATH', dirname(dirname(dirname(__FILE__))) . '/modx/');
define('MODX_CORE_PATH', MODX_BASE_PATH . 'core/');
define('MODX_MANAGER_PATH', MODX_BASE_PATH . 'manager/');
define('MODX_CONNECTORS_PATH', MODX_BASE_PATH . 'connectors/');
Expand All @@ -15,4 +15,4 @@
define('MODX_CORE_URL', MODX_BASE_URL . 'core/');
define('MODX_MANAGER_URL', MODX_BASE_URL . 'manager/');
define('MODX_CONNECTORS_URL', MODX_BASE_URL . 'connectors/');
define('MODX_ASSETS_URL', MODX_BASE_URL . 'assets/');
define('MODX_ASSETS_URL', MODX_BASE_URL . 'assets/');
7 changes: 5 additions & 2 deletions _build/build.transport.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,10 @@
// Instantiate modX
$modx = new modX();
$modx->initialize('mgr');
echo '<pre>'; // used for nice formatting of log messages
if (!XPDO_CLI_MODE) {
// used for nice formatting of log messages
echo '<pre>';
}
$modx->setLogLevel(modX::LOG_LEVEL_INFO);
$modx->setLogTarget('ECHO');

Expand Down Expand Up @@ -96,5 +99,5 @@
$tend = explode(" ", microtime());
$tend = $tend[1] + $tend[0];
$totalTime = sprintf("%2.4f s", ($tend - $tstart));
$modx->log(modX::LOG_LEVEL_INFO, "\n<br />Package Built.<br />\nExecution time: {$totalTime}\n");
$modx->log(modX::LOG_LEVEL_INFO, "\n\nPackage Built. \nExecution time: {$totalTime}\n");
exit ();
9 changes: 8 additions & 1 deletion _build/data/transport.menu.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,16 @@
* @package tvsorter
* @subpackage build
*/
$c = $modx->newQuery('modAction');
$c->sortby('id', 'DESC');
$c->limit(1);
/** @var modAction $last */
$last = $modx->getObject('modAction', $c);
$id = $last->get('id') + 1;

$action = $modx->newObject('modAction');
$action->fromArray(array(
//'id' => 1,
'id' => $id,
'namespace' => 'tvsorter',
'parent' => 0,
'controller' => 'index',
Expand Down
File renamed without changes.

0 comments on commit 8c1f826

Please sign in to comment.