public
Description: Git mirror of the CMS Made Simple 2.0 rewrite
Homepage: http://cmsmadesimple.org
Clone URL: git://github.com/tedkulp/cmsmadesimple-2-0.git
Search Repo:
Adds support for the cssid parameter.


git-svn-id: http://svn.cmsmadesimple.org/svn/cmsmadesimple/trunk@4081 
3d254a34-79dc-0310-9e5f-be208747d8a0
calguy1000 (author)
Wed Aug 22 13:49:13 -0700 2007
commit  195b546e24e1498eeb1a909181e5252d832a1107
tree    692bf3314fc2dcd103c566477e2b1b49dc5c8c37
parent  e0234b9f11ef7bb768e80ab37c825219f9172309
...
29
30
31
 
 
 
32
33
34
35
36
37
38
 
39
40
41
...
52
53
54
 
 
55
56
57
...
29
30
31
32
33
34
35
36
37
38
39
40
 
41
42
43
44
...
55
56
57
58
59
60
61
62
0
@@ -29,13 +29,16 @@ if (isset($_GET["templateid"])) $templateid = $_GET["templateid"];
0
 $mediatype = '';
0
 if (isset($_GET["mediatype"])) $mediatype = $_GET["mediatype"];
0
 
0
+$cssid = '';
0
+if (isset($_GET['cssid'])) $cssid = $_GET['cssid'];
0
+
0
 $name = '';
0
 if (isset($_GET['name'])) $name = $_GET['name'];
0
 
0
 $stripbackground = false;
0
 if (isset($_GET["stripbackground"])) $stripbackground = true;
0
 
0
-if ($templateid == '' && $name == '') return '';
0
+if ($templateid == '' && $name == '' && $cssid == '') return '';
0
 
0
 require_once('config.php');
0
 
0
@@ -52,6 +55,8 @@ if (isset($config['old_stylesheet']) && $config['old_stylesheet'] == false)
0
   // select the stylesheet(s)
0
   if ($name != '')
0
     $sql="SELECT css_text, css_name FROM ".$config['db_prefix']."css WHERE css_name = " . $db->qstr($name);
0
+ else if( $cssid != '' )
0
+ $sql="SELECT css_text, css_name FROM ".$config['db_prefix']."css WHERE css_id = ".$db->qstr($cssid);
0
   else
0
     $sql="SELECT c.css_text, c.css_id, c.css_name FROM ".$config['db_prefix']."css c,".$config['db_prefix']."css_assoc ac WHERE ac.assoc_type='template' AND ac.assoc_to_id = ".$db->qstr($templateid)." AND ac.assoc_css_id = c.css_id AND c.media_type = " . $db->qstr($mediatype) . " ORDER BY ac.create_date";
0
   $result = $db->Execute($sql);

Comments

    No one has commented yet.