Welcome, Guest
Username: Password: Remember me

TOPIC: some code works in admin but not front end

some code works in admin but not front end 06 Nov 2012 18:57 #5021

  • jcbenton
  • jcbenton's Avatar
  • Offline
  • Premium Member
  • Posts: 125
  • Thank you received: 9
  • Karma: 3
UPDATE: Solved myself after I realized I'm a moron.

Hello,

I have a line of code running a shell_exec() command in admin/tables/filename.php that does work perfectly on the admin side, but that line fails when the user executes the same item.

Ideas? Might be related to my other post regarding the error in jmodel.tem.php

www.j-cook.pro/forum/7-design-your-appli...itemphp-upload-class
--
Jerry Benton
Last Edit: 06 Nov 2012 19:22 by jcbenton.
The administrator has disabled public write access.

Re: shell_exec work in admin but not front end 06 Nov 2012 19:06 #5023

  • jcbenton
  • jcbenton's Avatar
  • Offline
  • Premium Member
  • Posts: 125
  • Thank you received: 9
  • Karma: 3
Nevermind. This was an error on my part. The backend passes some information that the front end does not have. Thinking up a work around :p
--
Jerry Benton
The administrator has disabled public write access.

Re: shell_exec work in admin but not front end 06 Nov 2012 19:19 #5024

  • jcbenton
  • jcbenton's Avatar
  • Offline
  • Premium Member
  • Posts: 125
  • Thank you received: 9
  • Karma: 3
Yay!
if(!isset($this->encoder)){
	// Get the default encoder
	$dbm = JFactory::getDBO();
        $querym = $dbm->getQuery(true);
        $querym->select('id');
        $querym->from('#__skm_encoders');
        $querym->where("default_encoder = '1' LIMIT 1");
    	$dbm->setQuery($querym);
	$encoder = $dbm->loadRow();
	$this->encoder = $encoder[0];
}
--
Jerry Benton
Last Edit: 06 Nov 2012 19:20 by jcbenton.
The administrator has disabled public write access.
Time to create page: 0.067 seconds

Get Started