Created
September 13, 2013 11:30
-
-
Save markphi2013/6549510 to your computer and use it in GitHub Desktop.
programstats ajax
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
echo $this->Js->object(); | |
?> | |
the out put is "[ ]" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function getProgramStats() | |
{ | |
if(isset($this->params['url']['program'])){ | |
$programUrl = $this->Program->find('first', array('conditions' => array('url'=> $this->params['url']['program']))); | |
$programStats = $this->Stats->getProgramStats($programUrl['Program']['database']); | |
return $programStats; | |
} | |
} | |
here url will alway be empty array cause we are on the program index and no program is selected yet . | |
$programUrl['Program']['database'] returns m4rh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment