Permalink
Browse files

Start using JPATH_ADMINISTRATOR.

  • Loading branch information...
1 parent 7f9abf6 commit 4c992a6643c99c5ece67918606397adaeea87cc4 @realityking committed May 7, 2012
View
2 admin/admin.rsgallery2.php
@@ -10,7 +10,7 @@
defined( '_JEXEC' ) or die( 'Access Denied.' );
// initialize RSG2 core functionality
-require_once( JPATH_SITE.'/administrator/components/com_rsgallery2/init.rsgallery2.php' );
+require_once( JPATH_ADMINISTRATOR.'/components/com_rsgallery2/init.rsgallery2.php' );
// instantate user variables but don't show a frontend template
rsgInstance::instance( 'request', false );
View
22 admin/includes/install.class.php
@@ -14,8 +14,8 @@
global $rsgConfig;
if( !isset( $rsgConfig )){
- require_once( JPATH_SITE . "/administrator/components/com_rsgallery2/includes/config.class.php" );
- require_once( JPATH_SITE . "/administrator/components/com_rsgallery2/includes/version.rsgallery2.php" );
+ require_once( JPATH_ADMINISTRATOR . "/components/com_rsgallery2/includes/config.class.php" );
+ require_once( JPATH_ADMINISTRATOR . "/components/com_rsgallery2/includes/version.rsgallery2.php" );
$rsgVersion = new rsgalleryVersion();
$rsgConfig = new rsgConfig( false );
@@ -161,7 +161,7 @@ function createTableStructure(){
function populate_db( $sqlfile='rsgallery2.sql') {
$database =& JFactory::getDBO();
- $sqlDir = JPATH_SITE . "/administrator/components/com_rsgallery2/sql/";
+ $sqlDir = JPATH_ADMINISTRATOR . "/components/com_rsgallery2/sql/";
$errors = array();
$query = fread( fopen( $sqlDir . $sqlfile, 'r' ), filesize( $sqlDir . $sqlfile ) );
@@ -706,11 +706,11 @@ function upgradeInstallX() {
if ($this->ComponentInstalled("com_rsgallery"))
{
//Yes, component is installed
- $config_file = JPATH_SITE . "/administrator/components/com_rsgallery2/language/english.php";
+ $config_file = JPATH_ADMINISTRATOR . "/components/com_rsgallery2/language/english.php";
if (file_exists($config_file))
{
//Supress notices on duplicate definitions with @, as we loaded the new english.php already
- @include_once( JPATH_SITE . "/administrator/components/com_rsgallery2/language/english.php");
+ @include_once( JPATH_ADMINISTRATOR . "/components/com_rsgallery2/language/english.php");
$version = _RSGALLERY_VERSION;
}
else
@@ -1167,7 +1167,7 @@ function handleSqlFile( $sqlfile ){
*/
function runSqlFile( $sqlfile ) {
$database =& JFactory::getDBO();
- $sqlDir = JPATH_SITE . "/administrator/components/com_rsgallery2/sql/";
+ $sqlDir = JPATH_ADMINISTRATOR . "/components/com_rsgallery2/sql/";
$errors = array();
@@ -1420,7 +1420,7 @@ function detect(){
*/
function migrate() {
- $comconfig = JPATH_SITE . "/administrator/components/com_akogallery/config.akogallery.php";
+ $comconfig = JPATH_ADMINISTRATOR . "/components/com_akogallery/config.akogallery.php";
if (! file_exists($comconfig))
return ( "Config file for AKOGallery does not exist" );
@@ -1671,7 +1671,7 @@ function copyImages($basedir, $prefix = "pony_"){
function migrate() {
//Set basedir to original images
- include_once(JPATH_SITE . "/administrator/components/com_ponygallery/config.ponygallery.php");
+ include_once(JPATH_ADMINISTRATOR . "/components/com_ponygallery/config.ponygallery.php");
$basedir = JPATH_SITE . $ag_pathoriginalimages . '/';
//Set prefix
@@ -1730,10 +1730,10 @@ function getName(){
**/
function detect(){
- $comdir = JPATH_SITE . "/administrator/components/com_zoom";
+ $comdir = JPATH_ADMINISTRATOR . "/components/com_zoom";
if( rsgInstall::componentInstalled( "com_zoom" )){
- include_once(JPATH_SITE . "/administrator/components/com_zoom/etc/zoom_config.php");
+ include_once(JPATH_ADMINISTRATOR . "/components/com_zoom/etc/zoom_config.php");
if ( $zoomConfig['version'] == "2.5.1 RC4" ) {
return true;
@@ -1862,7 +1862,7 @@ function detect(){
function migrate() {
$database = JFactory::getDBO();
//Set basedir from config file
- include_once(JPATH_SITE . "/administrator/components/com_easygallery/configuration.php");
+ include_once(JPATH_ADMINISTRATOR . "/components/com_easygallery/configuration.php");
$basedir = JPATH_SITE .$eg_original_path;
//Set prefix
View
2 admin/options/galleries.php
@@ -194,7 +194,7 @@ function edit( $option, $id ) {
// build the html select list
$lists['published'] = JHTML::_("select.booleanlist", 'published', 'class="inputbox"', $row->published );
- $file = JPATH_SITE .'/administrator/components/com_rsgallery2/options/galleries.item.xml';
+ $file = JPATH_ADMINISTRATOR . '/components/com_rsgallery2/options/galleries.item.xml';
$params = new JParameter( $row->params, $file );
html_rsg2_galleries::edit( $row, $lists, $params, $option );
View
2 admin/options/images.php
@@ -202,7 +202,7 @@ function editImage( $option, $id ) {
// build the html select list
$lists['published'] = JHTML::_("select.booleanlist", 'published', 'class="inputbox"', $row->published );
- $file = JPATH_SITE .'/administrator/components/com_rsgallery2/options/images.item.xml';
+ $file = JPATH_ADMINISTRATOR . '/components/com_rsgallery2/options/images.item.xml';
$params = new JParameter( $row->params, $file);
html_rsg2_images::editImage( $row, $lists, $params, $option );
View
2 install.rsgallery2.php
@@ -17,7 +17,7 @@ function com_install(){
$lang =& JFactory::getLanguage();
$lang->load('com_rsgallery2');
- require_once( JPATH_SITE . '/administrator/components/com_rsgallery2/includes/install.class.php' );
+ require_once( JPATH_ADMINISTRATOR . '/components/com_rsgallery2/includes/install.class.php' );
//Initialize install
$rsgInstall = new rsgInstall();
View
2 site/rsgallery2.php
@@ -10,7 +10,7 @@
defined( '_JEXEC' ) or die( 'Access Denied.' );
// initialize RSG2 core functionality
-require_once( JPATH_SITE. "/administrator/components/com_rsgallery2/init.rsgallery2.php" );
+require_once( JPATH_ADMINISTRATOR. "/components/com_rsgallery2/init.rsgallery2.php" );
// create a new instance of RSGallery2
rsgInstance::instance();
View
2 site/templates/meta/display.class.php
@@ -138,7 +138,7 @@ function viewChangelog() {
}
echo '<pre style="text-align: left;">';
- readfile( JPATH_SITE . '/administrator/components/com_rsgallery2/changelog.php' );
+ readfile( JPATH_ADMINISTRATOR . '/components/com_rsgallery2/changelog.php' );
echo '</pre>';
}

0 comments on commit 4c992a6

Please sign in to comment.