Explorar o código

Handle project and user templating again.

Nathaniel van Diepen %!s(int64=10) %!d(string=hai) anos
pai
achega
421c3197d2
Modificáronse 1 ficheiros con 2 adicións e 6 borrados
  1. 2 6
      api.php

+ 2 - 6
api.php

@@ -9,9 +9,7 @@
 			switch($_GET['type']){
 				case 'user':
 					back(true);
-					if(!isset($_GET['template'])){
-						$ret['template'] = file_get_contents(PATH_DATA.'pages/user.template');
-					}
+					$ret['template'] = 'user';
 					if($user = userObj($id)){
 						$context = array(
 							'name'=>$user['name'],
@@ -67,9 +65,7 @@
 				break;
 				case 'project':
 					back(true);
-					if(!isset($_GET['template'])){
-						$ret['template'] = file_get_contents(PATH_DATA.'pages/project.template');
-					}
+					$ret['template'] = 'project';
 					if($context = projectObj($id)){
 						$context['user'] = userObj($context['user']);
 						if($LOGGEDIN){