From 08f28e3fd94b4d6d0e6a0d21bedaf7a7d0594c3b Mon Sep 17 00:00:00 2001 From: Christian Seel Date: Thu, 10 May 2012 00:13:14 +0200 Subject: [PATCH] removed default fanpage id and added error message if pageid is missing --- fblikes.snippet.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/fblikes.snippet.php b/fblikes.snippet.php index 900b002..44f12df 100644 --- a/fblikes.snippet.php +++ b/fblikes.snippet.php @@ -23,15 +23,14 @@ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR * A PARTICULAR PURPOSE. See the GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License along with - * fbLikes; if not, write to the Free Software Foundation, Inc., 59 Temple Place, - * Suite 330, Boston, MA 02111-1307 USA */ -$pageid = $modx->getOption('pageid',$scriptProperties,"19110642979"); +$pageid = $modx->getOption('pageid',$scriptProperties,""); $expiretime = $modx->getOption('expiretime',$scriptProperties,"10800"); $cacheKey = 'fblikes/' . $pageid; +if (empty($pageid)) return "You need to specify the fanpage id (pageid parameter)!"; + // get data from cache $cached_data = $modx->cacheManager->get($cacheKey);