Kawai Wiki

Rev

Rev 191 | Rev 228 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 191 Rev 200
Line 195... Line 195...
195
            query.append(", ").append(session.buildSelect(User.class, "creator"));
195
            query.append(", ").append(session.buildSelect(User.class, "creator"));
196
            query.append(", ").append(session.buildSelect(User.class, "modifier"));
196
            query.append(", ").append(session.buildSelect(User.class, "modifier"));
197
            query.append(" from Pages p");
197
            query.append(" from Pages p");
198
            query.append(" join Users creator on p.created_by = creator.id");
198
            query.append(" join Users creator on p.created_by = creator.id");
199
            query.append(" left join Users modifier on p.modified_by = modifier.id");
199
            query.append(" left join Users modifier on p.modified_by = modifier.id");
200
            query.append(" where p.deleted = 'F'");
-
 
-
 
200
            query.append(" where p.deleted = 'F' and p.language_id in (");
-
 
201
           
-
 
202
            List<Language> langs = Language.all();
-
 
203
            int count = 0;
-
 
204
            for(Language lang : langs) {
-
 
205
                if (count++ > 0) query.append(",");
-
 
206
                query.append(lang.getId());
-
 
207
            }
-
 
208
            query.append(")");
-
 
209
           
201
            if (!includeSystemPages) {
210
            if (!includeSystemPages) {
202
                query.append(" and p.system_page = 'F'");
211
                query.append(" and p.system_page = 'F'");
203
            }
212
            }
204
            query.append(" order by p.system_page, p.front_page, p.name, p.language_id");
213
            query.append(" order by p.system_page, p.front_page, p.name, p.language_id");
205
214