Skip to content

Commit

Permalink
Replaced usage of URL . 'symphony' with the ADMIN_URL constant.
Browse files Browse the repository at this point in the history
  • Loading branch information
Alistair Kearney committed May 21, 2010
1 parent 59aa99e commit d58c33d
Show file tree
Hide file tree
Showing 12 changed files with 39 additions and 39 deletions.
2 changes: 1 addition & 1 deletion extensions/devkit_debug/views/debug.php
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ protected function appendIncludes(DOMElement $wrapper) {
$this->createStylesheetElement(URL . '/extensions/devkit_debug/assets/devkit.css')
);
$wrapper->appendChild(
$this->createScriptElement(URL . '/symphony/assets/js/jquery.js')
$this->createScriptElement(ADMIN_URL . '/assets/js/jquery.js')
);
$wrapper->appendChild(
$this->createScriptElement(URL . '/extensions/devkit_debug/assets/jquery.scrollto.js')
Expand Down
2 changes: 1 addition & 1 deletion extensions/ds_sections/lib/class.datasource.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public function prepareSourceColumnValue(){

if ($section instanceof Section) {
return Widget::TableData(
Widget::Anchor($section->name, URL . '/symphony/blueprints/sections/edit/' . $section->handle . '/', array(
Widget::Anchor($section->name, ADMIN_URL . '/blueprints/sections/edit/' . $section->handle . '/', array(
'title' => $section->handle
))
);
Expand Down
2 changes: 1 addition & 1 deletion extensions/ds_sections/lib/class.event.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public function prepareDestinationColumnValue(){

if ($section instanceof Section) {
return Widget::TableData(
Widget::Anchor($section->name, URL . '/symphony/blueprints/sections/edit/' . $section->handle . '/', array(
Widget::Anchor($section->name, ADMIN_URL . '/blueprints/sections/edit/' . $section->handle . '/', array(
'title' => $section->handle
))
);
Expand Down
2 changes: 1 addition & 1 deletion extensions/ds_users/lib/class.datasource.php
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ public function render(Register $ParameterOutput){
public function prepareSourceColumnValue() {

return Widget::TableData(
Widget::Anchor("Users", URL . '/symphony/system/users/', array(
Widget::Anchor("Users", ADMIN_URL . '/system/users/', array(
'title' => 'Users'
))
);
Expand Down
2 changes: 1 addition & 1 deletion extensions/ds_views/lib/class.datasource.php
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ public function __buildPageXML($view, View $parent = null) {
public function prepareSourceColumnValue() {

return Widget::TableData(
Widget::Anchor("Views", URL . '/symphony/blueprints/views/', array(
Widget::Anchor("Views", ADMIN_URL . '/blueprints/views/', array(
'title' => 'Views'
))
);
Expand Down
2 changes: 1 addition & 1 deletion install/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ function missing($value){
}

if($errors->length() == 0){
redirect(URL . '/symphony');
redirect(ADMIN_URL);
}

}
Expand Down
18 changes: 9 additions & 9 deletions symphony/content/content.blueprintsdatasources.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ public function __viewIndex() {

// Name
$col_name = Widget::TableData(
Widget::Anchor($ds->about()->name, URL . "/symphony/blueprints/datasources/{$view_mode}/{$handle}/", array(
Widget::Anchor($ds->about()->name, ADMIN_URL . "/blueprints/datasources/{$view_mode}/{$handle}/", array(
'title' => $ds->parameters()->pathname
))
);
Expand All @@ -130,7 +130,7 @@ public function __viewIndex() {
if($fragment_views->hasChildNodes()) $fragment_views->appendChild(new DOMText(', '));

$fragment_views->appendChild(
Widget::Anchor($view['title'], URL . "/symphony/blueprints/views/edit/{$view['handle']}/")
Widget::Anchor($view['title'], ADMIN_URL . "/blueprints/views/edit/{$view['handle']}/")
);
}
}
Expand Down Expand Up @@ -236,7 +236,7 @@ protected function __prepareForm() {
);

if (!$this->datasource->allowEditorToParse()) {
redirect(URL . '/symphony/blueprints/datasources/info/' . $this->handle . '/');
redirect(ADMIN_URL . '/blueprints/datasources/info/' . $this->handle . '/');
}
}
}
Expand All @@ -252,7 +252,7 @@ protected function __actionForm() {
try{
$pathname = $this->datasource->save($this->errors);
$handle = preg_replace('/.php$/i', NULL, basename($pathname));
redirect(URL . "/symphony/blueprints/datasources/edit/{$handle}/:".($this->editing == true ? 'saved' : 'created')."/");
redirect(ADMIN_URL . "/blueprints/datasources/edit/{$handle}/:".($this->editing == true ? 'saved' : 'created')."/");
}

catch (DatasourceException $e) {
Expand Down Expand Up @@ -288,8 +288,8 @@ protected function __viewForm() {
'Data source updated at %1$s. <a href="%2$s">Create another?</a> <a href="%3$s">View all</a>',
array(
DateTimeObj::getTimeAgo(__SYM_TIME_FORMAT__),
URL . '/symphony/blueprints/datasources/new/',
URL . '/symphony/blueprints/datasources/'
ADMIN_URL . '/blueprints/datasources/new/',
ADMIN_URL . '/blueprints/datasources/'
)
),
AlertStack::SUCCESS
Expand All @@ -302,8 +302,8 @@ protected function __viewForm() {
'Data source created at %1$s. <a href="%2$s">Create another?</a> <a href="%3$s">View all</a>',
array(
DateTimeObj::getTimeAgo(__SYM_TIME_FORMAT__),
URL . '/symphony/blueprints/datasources/new/',
URL . '/symphony/blueprints/datasources/'
ADMIN_URL . '/blueprints/datasources/new/',
ADMIN_URL . '/blueprints/datasources/'
)
),
AlertStack::SUCCESS
Expand Down Expand Up @@ -598,7 +598,7 @@ public function __actionIndex() {
if(is_array($checked) && !empty($checked)) {
switch ($_POST['with-selected']) {
case 'delete':
$this->__actionDelete($checked, URL . '/symphony/blueprints/datasources/');
$this->__actionDelete($checked, ADMIN_URL . '/blueprints/datasources/');
break;
}
}
Expand Down
16 changes: 8 additions & 8 deletions symphony/content/content.blueprintsevents.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ public function __viewIndex() {


$col_name = Widget::TableData(
Widget::Anchor($event->about()->name, URL . "/symphony/blueprints/events/{$view_mode}/{$handle}/", array(
Widget::Anchor($event->about()->name, ADMIN_URL . "/blueprints/events/{$view_mode}/{$handle}/", array(
'title' => $event->parameters()->pathname
))
);
Expand All @@ -123,7 +123,7 @@ public function __viewIndex() {
if($fragment_views->hasChildNodes()) $fragment_views->appendChild(new DOMText(', '));

$fragment_views->appendChild(
Widget::Anchor($view['title'], URL . "/symphony/blueprints/views/edit/{$view['handle']}/")
Widget::Anchor($view['title'], ADMIN_URL . "/blueprints/views/edit/{$view['handle']}/")
);
}
}
Expand Down Expand Up @@ -227,7 +227,7 @@ protected function __prepareForm() {
);

if (!$this->event->allowEditorToParse()) {
redirect(URL . '/symphony/blueprints/events/info/' . $this->handle . '/');
redirect(ADMIN_URL . '/blueprints/events/info/' . $this->handle . '/');
}

$this->type = $this->event->getExtension();
Expand Down Expand Up @@ -284,7 +284,7 @@ protected function __actionForm() {
$pathname = $this->event->save($this->errors);
$handle = preg_replace('/.php$/i', NULL, basename($pathname));
redirect(
URL . "/symphony/blueprints/events/edit/{$handle}/:"
ADMIN_URL . "/blueprints/events/edit/{$handle}/:"
. ($this->editing == true ? 'saved' : 'created') . "/"
);
}
Expand Down Expand Up @@ -321,8 +321,8 @@ protected function __viewForm() {
'Event updated at %1$s. <a href="%2$s">Create another?</a> <a href="%3$s">View all</a>',
array(
DateTimeObj::getTimeAgo(__SYM_TIME_FORMAT__),
URL . '/symphony/blueprints/events/new/',
URL . '/symphony/blueprints/events/'
ADMIN_URL . '/blueprints/events/new/',
ADMIN_URL . '/blueprints/events/'
)
),
AlertStack::SUCCESS
Expand All @@ -335,8 +335,8 @@ protected function __viewForm() {
'Event created at %1$s. <a href="%2$s">Create another?</a> <a href="%3$s">View all</a>',
array(
DateTimeObj::getTimeAgo(__SYM_TIME_FORMAT__),
URL . '/symphony/blueprints/events/new/',
URL . '/symphony/blueprints/events/'
ADMIN_URL . '/blueprints/events/new/',
ADMIN_URL . '/blueprints/events/'
)
),
AlertStack::SUCCESS
Expand Down
22 changes: 11 additions & 11 deletions symphony/content/content.blueprintsutilities.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public function __viewIndex() {
$uRow = Widget::TableData(
Widget::Anchor(
$util,
URL . '/symphony/blueprints/utilities/edit/' . str_replace('.xsl', '', $util) . '/')
ADMIN_URL . '/blueprints/utilities/edit/' . str_replace('.xsl', '', $util) . '/')
);

$uRow->appendChild(Widget::Input("items[{$util}]", null, 'checkbox'));
Expand Down Expand Up @@ -100,12 +100,12 @@ public function __viewEdit() {
$file_abs = UTILITIES . '/' . $this->_existing_file;
$filename = $this->_existing_file;

if(!is_file($file_abs) && !is_readable($file_abs)) redirect(URL . '/symphony/blueprints/utilities/new/');
if(!is_file($file_abs) && !is_readable($file_abs)) redirect(ADMIN_URL . '/blueprints/utilities/new/');

$fields['name'] = $filename;
$fields['template'] = file_get_contents($file_abs);

$this->Form->setAttribute('action', URL . '/symphony/blueprints/utilities/edit/' . $this->_context[1] . '/');
$this->Form->setAttribute('action', ADMIN_URL . '/blueprints/utilities/edit/' . $this->_context[1] . '/');
}

else{
Expand All @@ -131,8 +131,8 @@ public function __viewEdit() {
'Utility updated at %1$s. <a href="%2$s">Create another?</a> <a href="%3$s">View all</a>',
array(
DateTimeObj::getTimeAgo(__SYM_TIME_FORMAT__),
URL . '/symphony/blueprints/utilities/new/',
URL . '/symphony/blueprints/utilities/'
ADMIN_URL . '/blueprints/utilities/new/',
ADMIN_URL . '/blueprints/utilities/'
)
),
AlertStack::SUCCESS
Expand All @@ -145,8 +145,8 @@ public function __viewEdit() {
'Utility created at %1$s. <a href="%2$s">Create another?</a> <a href="%3$s">View all</a>',
array(
DateTimeObj::getTimeAgo(__SYM_TIME_FORMAT__),
URL . '/symphony/blueprints/utilities/new/',
URL . '/symphony/blueprints/utilities/'
ADMIN_URL . '/blueprints/utilities/new/',
ADMIN_URL . '/blueprints/utilities/'
)
),
AlertStack::SUCCESS
Expand Down Expand Up @@ -198,7 +198,7 @@ public function __viewEdit() {
$li->setAttribute('class', 'odd');
}

$li->appendChild(Widget::Anchor($util, URL . '/symphony/blueprints/utilities/edit/' . str_replace('.xsl', '', $util) . '/', array()));
$li->appendChild(Widget::Anchor($util, ADMIN_URL . '/blueprints/utilities/edit/' . str_replace('.xsl', '', $util) . '/', array()));
$ul->appendChild($li);
}

Expand Down Expand Up @@ -300,7 +300,7 @@ public function __actionEdit(){
# Description: After saving the asset, the file path is provided.
//Extension::notify('Edit', getCurrentPage(), array('file' => $file));

redirect(URL . '/symphony/blueprints/utilities/edit/'.str_replace('.xsl', '', $fields['name']) . '/'.($this->_context[0] == 'new' ? 'created' : 'saved') . '/');
redirect(ADMIN_URL . '/blueprints/utilities/edit/'.str_replace('.xsl', '', $fields['name']) . '/'.($this->_context[0] == 'new' ? 'created' : 'saved') . '/');

}
}
Expand All @@ -313,7 +313,7 @@ public function __actionEdit(){
# Delegate: Delete
# Description: Prior to deleting the asset file. Target file path is provided.
//Extension::notify('Delete', getCurrentPage(), array('file' => WORKSPACE . '/' . $this->_existing_file_rel));
$this->__actionDelete(UTILITIES . '/' . $this->_existing_file, URL . '/symphony/blueprints/components/');
$this->__actionDelete(UTILITIES . '/' . $this->_existing_file, ADMIN_URL . '/blueprints/components/');
}
}

Expand All @@ -335,7 +335,7 @@ public function __actionIndex() {
if(is_array($checked) && !empty($checked)) {
switch ($_POST['with-selected']) {
case 'delete':
$this->__actionDelete($checked, URL . '/symphony/blueprints/utilities/');
$this->__actionDelete($checked, ADMIN_URL . '/blueprints/utilities/');
break;
}
}
Expand Down
2 changes: 1 addition & 1 deletion symphony/content/content.systemextensions.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public function view(){
$this->setTitle(__('%1$s &ndash; %2$s', array(__('Symphony'), __('Extensions'))));
$this->appendSubheading(__('Extensions'));

$path = URL . '/symphony/system/extensions/';
$path = ADMIN_URL . '/system/extensions/';
$this->Form->setAttribute('action', Administration::instance()->getCurrentPageURL());

## Define layout
Expand Down
4 changes: 2 additions & 2 deletions symphony/content/content.systemsettings.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public function __construct(){
public function __viewIndex() {
$this->appendSubheading(__('Settings'));

$path = URL . '/symphony/system/settings/';
$path = ADMIN_URL . '/system/settings/';

if(Extension::delegateSubscriptionCount('AddSettingsFieldsets', '/system/settings/extensions/') > 0){

Expand Down Expand Up @@ -197,7 +197,7 @@ public function __viewIndex() {
public function __viewExtensions() {
$this->appendSubheading(__('Settings'));

$path = URL . '/symphony/system/settings/';
$path = ADMIN_URL . '/system/settings/';

if(Extension::delegateSubscriptionCount('AddSettingsFieldsets', '/system/settings/extensions/') <= 0){
// No settings for extensions here
Expand Down
4 changes: 2 additions & 2 deletions symphony/lib/class.administration.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ public function getPageCallback($page=NULL, $update=false){
elseif(!$page && !$this->_callback) trigger_error(__('Cannot request a page callback without first specifying the page.'));

// Remove multiple slashes and any flags from the URL (e.g. :saved/ or :created/)
$this->_currentPage = URL . preg_replace(array('/:[^\/]+\/?$/', '/\/{2,}/'), '/', '/symphony' . $page);
$this->_currentPage = ADMIN_URL . preg_replace(array('/:[^\/]+\/?$/', '/\/{2,}/'), '/', $page);

$bits = preg_split('/\//', trim($page, '/'), 3, PREG_SPLIT_NO_EMPTY);

if($bits[0] == 'login'){
Expand Down

0 comments on commit d58c33d

Please sign in to comment.