After patch from miimooo.
This commit is contained in:
BIN
uc_views/.DS_Store
vendored
Normal file
BIN
uc_views/.DS_Store
vendored
Normal file
Binary file not shown.
@ -1,339 +1,274 @@
|
|||||||
GNU GENERAL PUBLIC LICENSE
|
GNU GENERAL PUBLIC LICENSE
|
||||||
Version 2, June 1991
|
|
||||||
|
|
||||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
|
Version 2, June 1991
|
||||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
Everyone is permitted to copy and distribute verbatim copies
|
|
||||||
of this license document, but changing it is not allowed.
|
|
||||||
|
|
||||||
Preamble
|
Copyright (C) 1989, 1991 Free Software Foundation, Inc. 675 Mass Ave,
|
||||||
|
Cambridge, MA 02139, USA. Everyone is permitted to copy and distribute
|
||||||
|
verbatim copies of this license document, but changing it is not allowed.
|
||||||
|
|
||||||
The licenses for most software are designed to take away your
|
Preamble
|
||||||
freedom to share and change it. By contrast, the GNU General Public
|
|
||||||
License is intended to guarantee your freedom to share and change free
|
|
||||||
software--to make sure the software is free for all its users. This
|
|
||||||
General Public License applies to most of the Free Software
|
|
||||||
Foundation's software and to any other program whose authors commit to
|
|
||||||
using it. (Some other Free Software Foundation software is covered by
|
|
||||||
the GNU Lesser General Public License instead.) You can apply it to
|
|
||||||
your programs, too.
|
|
||||||
|
|
||||||
When we speak of free software, we are referring to freedom, not
|
The licenses for most software are designed to take away your freedom to
|
||||||
price. Our General Public Licenses are designed to make sure that you
|
share and change it. By contrast, the GNU General Public License is
|
||||||
have the freedom to distribute copies of free software (and charge for
|
intended to guarantee your freedom to share and change free software--to
|
||||||
this service if you wish), that you receive source code or can get it
|
make sure the software is free for all its users. This General Public License
|
||||||
if you want it, that you can change the software or use pieces of it
|
applies to most of the Free Software Foundation's software and to any other
|
||||||
in new free programs; and that you know you can do these things.
|
program whose authors commit to using it. (Some other Free Software
|
||||||
|
Foundation software is covered by the GNU Library General Public License
|
||||||
|
instead.) You can apply it to your programs, too.
|
||||||
|
|
||||||
To protect your rights, we need to make restrictions that forbid
|
When we speak of free software, we are referring to freedom, not price. Our
|
||||||
anyone to deny you these rights or to ask you to surrender the rights.
|
General Public Licenses are designed to make sure that you have the
|
||||||
These restrictions translate to certain responsibilities for you if you
|
freedom to distribute copies of free software (and charge for this service if
|
||||||
distribute copies of the software, or if you modify it.
|
you wish), that you receive source code or can get it if you want it, that you
|
||||||
|
can change the software or use pieces of it in new free programs; and that
|
||||||
|
you know you can do these things.
|
||||||
|
|
||||||
For example, if you distribute copies of such a program, whether
|
To protect your rights, we need to make restrictions that forbid anyone to
|
||||||
gratis or for a fee, you must give the recipients all the rights that
|
deny you these rights or to ask you to surrender the rights. These restrictions
|
||||||
you have. You must make sure that they, too, receive or can get the
|
translate to certain responsibilities for you if you distribute copies of the
|
||||||
source code. And you must show them these terms so they know their
|
software, or if you modify it.
|
||||||
rights.
|
|
||||||
|
|
||||||
We protect your rights with two steps: (1) copyright the software, and
|
For example, if you distribute copies of such a program, whether gratis or for
|
||||||
(2) offer you this license which gives you legal permission to copy,
|
a fee, you must give the recipients all the rights that you have. You must make
|
||||||
distribute and/or modify the software.
|
sure that they, too, receive or can get the source code. And you must show
|
||||||
|
them these terms so they know their rights.
|
||||||
|
|
||||||
Also, for each author's protection and ours, we want to make certain
|
We protect your rights with two steps: (1) copyright the software, and (2)
|
||||||
that everyone understands that there is no warranty for this free
|
offer you this license which gives you legal permission to copy, distribute
|
||||||
software. If the software is modified by someone else and passed on, we
|
and/or modify the software.
|
||||||
want its recipients to know that what they have is not the original, so
|
|
||||||
that any problems introduced by others will not reflect on the original
|
|
||||||
authors' reputations.
|
|
||||||
|
|
||||||
Finally, any free program is threatened constantly by software
|
Also, for each author's protection and ours, we want to make certain that
|
||||||
patents. We wish to avoid the danger that redistributors of a free
|
everyone understands that there is no warranty for this free software. If the
|
||||||
program will individually obtain patent licenses, in effect making the
|
software is modified by someone else and passed on, we want its recipients
|
||||||
program proprietary. To prevent this, we have made it clear that any
|
to know that what they have is not the original, so that any problems
|
||||||
patent must be licensed for everyone's free use or not licensed at all.
|
introduced by others will not reflect on the original authors' reputations.
|
||||||
|
|
||||||
The precise terms and conditions for copying, distribution and
|
Finally, any free program is threatened constantly by software patents. We
|
||||||
modification follow.
|
wish to avoid the danger that redistributors of a free program will individually
|
||||||
|
obtain patent licenses, in effect making the program proprietary. To prevent
|
||||||
|
this, we have made it clear that any patent must be licensed for everyone's
|
||||||
|
free use or not licensed at all.
|
||||||
|
|
||||||
GNU GENERAL PUBLIC LICENSE
|
The precise terms and conditions for copying, distribution and modification
|
||||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
follow.
|
||||||
|
|
||||||
0. This License applies to any program or other work which contains
|
GNU GENERAL PUBLIC LICENSE
|
||||||
a notice placed by the copyright holder saying it may be distributed
|
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND
|
||||||
under the terms of this General Public License. The "Program", below,
|
MODIFICATION
|
||||||
refers to any such program or work, and a "work based on the Program"
|
|
||||||
means either the Program or any derivative work under copyright law:
|
|
||||||
that is to say, a work containing the Program or a portion of it,
|
|
||||||
either verbatim or with modifications and/or translated into another
|
|
||||||
language. (Hereinafter, translation is included without limitation in
|
|
||||||
the term "modification".) Each licensee is addressed as "you".
|
|
||||||
|
|
||||||
Activities other than copying, distribution and modification are not
|
0. This License applies to any program or other work which contains a notice
|
||||||
covered by this License; they are outside its scope. The act of
|
placed by the copyright holder saying it may be distributed under the terms
|
||||||
running the Program is not restricted, and the output from the Program
|
of this General Public License. The "Program", below, refers to any such
|
||||||
is covered only if its contents constitute a work based on the
|
program or work, and a "work based on the Program" means either the
|
||||||
Program (independent of having been made by running the Program).
|
Program or any derivative work under copyright law: that is to say, a work
|
||||||
Whether that is true depends on what the Program does.
|
containing the Program or a portion of it, either verbatim or with
|
||||||
|
modifications and/or translated into another language. (Hereinafter, translation
|
||||||
|
is included without limitation in the term "modification".) Each licensee is
|
||||||
|
addressed as "you".
|
||||||
|
|
||||||
1. You may copy and distribute verbatim copies of the Program's
|
Activities other than copying, distribution and modification are not covered
|
||||||
source code as you receive it, in any medium, provided that you
|
by this License; they are outside its scope. The act of running the Program is
|
||||||
conspicuously and appropriately publish on each copy an appropriate
|
not restricted, and the output from the Program is covered only if its contents
|
||||||
copyright notice and disclaimer of warranty; keep intact all the
|
constitute a work based on the Program (independent of having been made
|
||||||
notices that refer to this License and to the absence of any warranty;
|
by running the Program). Whether that is true depends on what the Program
|
||||||
and give any other recipients of the Program a copy of this License
|
does.
|
||||||
along with the Program.
|
|
||||||
|
|
||||||
You may charge a fee for the physical act of transferring a copy, and
|
1. You may copy and distribute verbatim copies of the Program's source
|
||||||
you may at your option offer warranty protection in exchange for a fee.
|
code as you receive it, in any medium, provided that you conspicuously and
|
||||||
|
appropriately publish on each copy an appropriate copyright notice and
|
||||||
|
disclaimer of warranty; keep intact all the notices that refer to this License
|
||||||
|
and to the absence of any warranty; and give any other recipients of the
|
||||||
|
Program a copy of this License along with the Program.
|
||||||
|
|
||||||
2. You may modify your copy or copies of the Program or any portion
|
You may charge a fee for the physical act of transferring a copy, and you
|
||||||
of it, thus forming a work based on the Program, and copy and
|
may at your option offer warranty protection in exchange for a fee.
|
||||||
distribute such modifications or work under the terms of Section 1
|
|
||||||
above, provided that you also meet all of these conditions:
|
|
||||||
|
|
||||||
a) You must cause the modified files to carry prominent notices
|
2. You may modify your copy or copies of the Program or any portion of it,
|
||||||
stating that you changed the files and the date of any change.
|
thus forming a work based on the Program, and copy and distribute such
|
||||||
|
modifications or work under the terms of Section 1 above, provided that you
|
||||||
|
also meet all of these conditions:
|
||||||
|
|
||||||
b) You must cause any work that you distribute or publish, that in
|
a) You must cause the modified files to carry prominent notices stating that
|
||||||
whole or in part contains or is derived from the Program or any
|
you changed the files and the date of any change.
|
||||||
part thereof, to be licensed as a whole at no charge to all third
|
|
||||||
parties under the terms of this License.
|
|
||||||
|
|
||||||
c) If the modified program normally reads commands interactively
|
b) You must cause any work that you distribute or publish, that in whole or in
|
||||||
when run, you must cause it, when started running for such
|
part contains or is derived from the Program or any part thereof, to be
|
||||||
interactive use in the most ordinary way, to print or display an
|
licensed as a whole at no charge to all third parties under the terms of this
|
||||||
announcement including an appropriate copyright notice and a
|
License.
|
||||||
notice that there is no warranty (or else, saying that you provide
|
|
||||||
a warranty) and that users may redistribute the program under
|
|
||||||
these conditions, and telling the user how to view a copy of this
|
|
||||||
License. (Exception: if the Program itself is interactive but
|
|
||||||
does not normally print such an announcement, your work based on
|
|
||||||
the Program is not required to print an announcement.)
|
|
||||||
|
|
||||||
These requirements apply to the modified work as a whole. If
|
c) If the modified program normally reads commands interactively when run,
|
||||||
identifiable sections of that work are not derived from the Program,
|
you must cause it, when started running for such interactive use in the most
|
||||||
and can be reasonably considered independent and separate works in
|
ordinary way, to print or display an announcement including an appropriate
|
||||||
themselves, then this License, and its terms, do not apply to those
|
copyright notice and a notice that there is no warranty (or else, saying that
|
||||||
sections when you distribute them as separate works. But when you
|
you provide a warranty) and that users may redistribute the program under
|
||||||
distribute the same sections as part of a whole which is a work based
|
these conditions, and telling the user how to view a copy of this License.
|
||||||
on the Program, the distribution of the whole must be on the terms of
|
(Exception: if the Program itself is interactive but does not normally print such
|
||||||
this License, whose permissions for other licensees extend to the
|
an announcement, your work based on the Program is not required to print
|
||||||
entire whole, and thus to each and every part regardless of who wrote it.
|
an announcement.)
|
||||||
|
|
||||||
Thus, it is not the intent of this section to claim rights or contest
|
These requirements apply to the modified work as a whole. If identifiable
|
||||||
your rights to work written entirely by you; rather, the intent is to
|
sections of that work are not derived from the Program, and can be
|
||||||
exercise the right to control the distribution of derivative or
|
reasonably considered independent and separate works in themselves, then
|
||||||
collective works based on the Program.
|
this License, and its terms, do not apply to those sections when you distribute
|
||||||
|
them as separate works. But when you distribute the same sections as part
|
||||||
|
of a whole which is a work based on the Program, the distribution of the
|
||||||
|
whole must be on the terms of this License, whose permissions for other
|
||||||
|
licensees extend to the entire whole, and thus to each and every part
|
||||||
|
regardless of who wrote it.
|
||||||
|
|
||||||
|
Thus, it is not the intent of this section to claim rights or contest your rights to
|
||||||
|
work written entirely by you; rather, the intent is to exercise the right to
|
||||||
|
control the distribution of derivative or collective works based on the
|
||||||
|
Program.
|
||||||
|
|
||||||
In addition, mere aggregation of another work not based on the Program
|
In addition, mere aggregation of another work not based on the Program
|
||||||
with the Program (or with a work based on the Program) on a volume of
|
with the Program (or with a work based on the Program) on a volume of a
|
||||||
a storage or distribution medium does not bring the other work under
|
storage or distribution medium does not bring the other work under the scope
|
||||||
the scope of this License.
|
of this License.
|
||||||
|
|
||||||
3. You may copy and distribute the Program (or a work based on it,
|
3. You may copy and distribute the Program (or a work based on it, under
|
||||||
under Section 2) in object code or executable form under the terms of
|
Section 2) in object code or executable form under the terms of Sections 1
|
||||||
Sections 1 and 2 above provided that you also do one of the following:
|
and 2 above provided that you also do one of the following:
|
||||||
|
|
||||||
a) Accompany it with the complete corresponding machine-readable
|
a) Accompany it with the complete corresponding machine-readable source
|
||||||
source code, which must be distributed under the terms of Sections
|
code, which must be distributed under the terms of Sections 1 and 2 above
|
||||||
1 and 2 above on a medium customarily used for software interchange; or,
|
on a medium customarily used for software interchange; or,
|
||||||
|
|
||||||
b) Accompany it with a written offer, valid for at least three
|
b) Accompany it with a written offer, valid for at least three years, to give
|
||||||
years, to give any third party, for a charge no more than your
|
any third party, for a charge no more than your cost of physically performing
|
||||||
cost of physically performing source distribution, a complete
|
source distribution, a complete machine-readable copy of the corresponding
|
||||||
machine-readable copy of the corresponding source code, to be
|
source code, to be distributed under the terms of Sections 1 and 2 above on
|
||||||
distributed under the terms of Sections 1 and 2 above on a medium
|
a medium customarily used for software interchange; or,
|
||||||
customarily used for software interchange; or,
|
|
||||||
|
|
||||||
c) Accompany it with the information you received as to the offer
|
c) Accompany it with the information you received as to the offer to distribute
|
||||||
to distribute corresponding source code. (This alternative is
|
corresponding source code. (This alternative is allowed only for
|
||||||
allowed only for noncommercial distribution and only if you
|
noncommercial distribution and only if you received the program in object
|
||||||
received the program in object code or executable form with such
|
code or executable form with such an offer, in accord with Subsection b
|
||||||
an offer, in accord with Subsection b above.)
|
above.)
|
||||||
|
|
||||||
The source code for a work means the preferred form of the work for
|
The source code for a work means the preferred form of the work for
|
||||||
making modifications to it. For an executable work, complete source
|
making modifications to it. For an executable work, complete source code
|
||||||
code means all the source code for all modules it contains, plus any
|
means all the source code for all modules it contains, plus any associated
|
||||||
associated interface definition files, plus the scripts used to
|
interface definition files, plus the scripts used to control compilation and
|
||||||
control compilation and installation of the executable. However, as a
|
installation of the executable. However, as a special exception, the source
|
||||||
special exception, the source code distributed need not include
|
code distributed need not include anything that is normally distributed (in
|
||||||
anything that is normally distributed (in either source or binary
|
either source or binary form) with the major components (compiler, kernel,
|
||||||
form) with the major components (compiler, kernel, and so on) of the
|
and so on) of the operating system on which the executable runs, unless that
|
||||||
operating system on which the executable runs, unless that component
|
component itself accompanies the executable.
|
||||||
itself accompanies the executable.
|
|
||||||
|
|
||||||
If distribution of executable or object code is made by offering
|
If distribution of executable or object code is made by offering access to
|
||||||
access to copy from a designated place, then offering equivalent
|
copy from a designated place, then offering equivalent access to copy the
|
||||||
access to copy the source code from the same place counts as
|
source code from the same place counts as distribution of the source code,
|
||||||
distribution of the source code, even though third parties are not
|
even though third parties are not compelled to copy the source along with the
|
||||||
compelled to copy the source along with the object code.
|
object code.
|
||||||
|
|
||||||
4. You may not copy, modify, sublicense, or distribute the Program
|
4. You may not copy, modify, sublicense, or distribute the Program except as
|
||||||
except as expressly provided under this License. Any attempt
|
expressly provided under this License. Any attempt otherwise to copy,
|
||||||
otherwise to copy, modify, sublicense or distribute the Program is
|
modify, sublicense or distribute the Program is void, and will automatically
|
||||||
void, and will automatically terminate your rights under this License.
|
terminate your rights under this License. However, parties who have received
|
||||||
However, parties who have received copies, or rights, from you under
|
copies, or rights, from you under this License will not have their licenses
|
||||||
this License will not have their licenses terminated so long as such
|
terminated so long as such parties remain in full compliance.
|
||||||
parties remain in full compliance.
|
|
||||||
|
|
||||||
5. You are not required to accept this License, since you have not
|
5. You are not required to accept this License, since you have not signed it.
|
||||||
signed it. However, nothing else grants you permission to modify or
|
However, nothing else grants you permission to modify or distribute the
|
||||||
distribute the Program or its derivative works. These actions are
|
Program or its derivative works. These actions are prohibited by law if you
|
||||||
prohibited by law if you do not accept this License. Therefore, by
|
do not accept this License. Therefore, by modifying or distributing the
|
||||||
modifying or distributing the Program (or any work based on the
|
Program (or any work based on the Program), you indicate your acceptance
|
||||||
Program), you indicate your acceptance of this License to do so, and
|
of this License to do so, and all its terms and conditions for copying,
|
||||||
all its terms and conditions for copying, distributing or modifying
|
distributing or modifying the Program or works based on it.
|
||||||
the Program or works based on it.
|
|
||||||
|
|
||||||
6. Each time you redistribute the Program (or any work based on the
|
6. Each time you redistribute the Program (or any work based on the
|
||||||
Program), the recipient automatically receives a license from the
|
Program), the recipient automatically receives a license from the original
|
||||||
original licensor to copy, distribute or modify the Program subject to
|
licensor to copy, distribute or modify the Program subject to these terms and
|
||||||
these terms and conditions. You may not impose any further
|
conditions. You may not impose any further restrictions on the recipients'
|
||||||
restrictions on the recipients' exercise of the rights granted herein.
|
exercise of the rights granted herein. You are not responsible for enforcing
|
||||||
You are not responsible for enforcing compliance by third parties to
|
compliance by third parties to this License.
|
||||||
this License.
|
|
||||||
|
|
||||||
7. If, as a consequence of a court judgment or allegation of patent
|
7. If, as a consequence of a court judgment or allegation of patent
|
||||||
infringement or for any other reason (not limited to patent issues),
|
infringement or for any other reason (not limited to patent issues), conditions
|
||||||
conditions are imposed on you (whether by court order, agreement or
|
are imposed on you (whether by court order, agreement or otherwise) that
|
||||||
otherwise) that contradict the conditions of this License, they do not
|
contradict the conditions of this License, they do not excuse you from the
|
||||||
excuse you from the conditions of this License. If you cannot
|
conditions of this License. If you cannot distribute so as to satisfy
|
||||||
distribute so as to satisfy simultaneously your obligations under this
|
simultaneously your obligations under this License and any other pertinent
|
||||||
License and any other pertinent obligations, then as a consequence you
|
obligations, then as a consequence you may not distribute the Program at all.
|
||||||
may not distribute the Program at all. For example, if a patent
|
For example, if a patent license would not permit royalty-free redistribution
|
||||||
license would not permit royalty-free redistribution of the Program by
|
of the Program by all those who receive copies directly or indirectly through
|
||||||
all those who receive copies directly or indirectly through you, then
|
you, then the only way you could satisfy both it and this License would be to
|
||||||
the only way you could satisfy both it and this License would be to
|
|
||||||
refrain entirely from distribution of the Program.
|
refrain entirely from distribution of the Program.
|
||||||
|
|
||||||
If any portion of this section is held invalid or unenforceable under
|
If any portion of this section is held invalid or unenforceable under any
|
||||||
any particular circumstance, the balance of the section is intended to
|
particular circumstance, the balance of the section is intended to apply and
|
||||||
apply and the section as a whole is intended to apply in other
|
the section as a whole is intended to apply in other circumstances.
|
||||||
circumstances.
|
|
||||||
|
|
||||||
It is not the purpose of this section to induce you to infringe any
|
It is not the purpose of this section to induce you to infringe any patents or
|
||||||
patents or other property right claims or to contest validity of any
|
other property right claims or to contest validity of any such claims; this
|
||||||
such claims; this section has the sole purpose of protecting the
|
section has the sole purpose of protecting the integrity of the free software
|
||||||
integrity of the free software distribution system, which is
|
distribution system, which is implemented by public license practices. Many
|
||||||
implemented by public license practices. Many people have made
|
people have made generous contributions to the wide range of software
|
||||||
generous contributions to the wide range of software distributed
|
distributed through that system in reliance on consistent application of that
|
||||||
through that system in reliance on consistent application of that
|
system; it is up to the author/donor to decide if he or she is willing to
|
||||||
system; it is up to the author/donor to decide if he or she is willing
|
distribute software through any other system and a licensee cannot impose
|
||||||
to distribute software through any other system and a licensee cannot
|
that choice.
|
||||||
impose that choice.
|
|
||||||
|
|
||||||
This section is intended to make thoroughly clear what is believed to
|
This section is intended to make thoroughly clear what is believed to be a
|
||||||
be a consequence of the rest of this License.
|
consequence of the rest of this License.
|
||||||
|
|
||||||
8. If the distribution and/or use of the Program is restricted in
|
8. If the distribution and/or use of the Program is restricted in certain
|
||||||
certain countries either by patents or by copyrighted interfaces, the
|
countries either by patents or by copyrighted interfaces, the original copyright
|
||||||
original copyright holder who places the Program under this License
|
holder who places the Program under this License may add an explicit
|
||||||
may add an explicit geographical distribution limitation excluding
|
geographical distribution limitation excluding those countries, so that
|
||||||
those countries, so that distribution is permitted only in or among
|
distribution is permitted only in or among countries not thus excluded. In such
|
||||||
countries not thus excluded. In such case, this License incorporates
|
case, this License incorporates the limitation as if written in the body of this
|
||||||
the limitation as if written in the body of this License.
|
License.
|
||||||
|
|
||||||
9. The Free Software Foundation may publish revised and/or new versions
|
9. The Free Software Foundation may publish revised and/or new versions
|
||||||
of the General Public License from time to time. Such new versions will
|
of the General Public License from time to time. Such new versions will be
|
||||||
be similar in spirit to the present version, but may differ in detail to
|
similar in spirit to the present version, but may differ in detail to address new
|
||||||
address new problems or concerns.
|
problems or concerns.
|
||||||
|
|
||||||
Each version is given a distinguishing version number. If the Program
|
Each version is given a distinguishing version number. If the Program specifies
|
||||||
specifies a version number of this License which applies to it and "any
|
a version number of this License which applies to it and "any later version",
|
||||||
later version", you have the option of following the terms and conditions
|
you have the option of following the terms and conditions either of that
|
||||||
either of that version or of any later version published by the Free
|
version or of any later version published by the Free Software Foundation. If
|
||||||
Software Foundation. If the Program does not specify a version number of
|
the Program does not specify a version number of this License, you may
|
||||||
this License, you may choose any version ever published by the Free Software
|
choose any version ever published by the Free Software Foundation.
|
||||||
Foundation.
|
|
||||||
|
|
||||||
10. If you wish to incorporate parts of the Program into other free
|
10. If you wish to incorporate parts of the Program into other free programs
|
||||||
programs whose distribution conditions are different, write to the author
|
whose distribution conditions are different, write to the author to ask for
|
||||||
to ask for permission. For software which is copyrighted by the Free
|
permission. For software which is copyrighted by the Free Software
|
||||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
Foundation, write to the Free Software Foundation; we sometimes make
|
||||||
make exceptions for this. Our decision will be guided by the two goals
|
exceptions for this. Our decision will be guided by the two goals of
|
||||||
of preserving the free status of all derivatives of our free software and
|
preserving the free status of all derivatives of our free software and of
|
||||||
of promoting the sharing and reuse of software generally.
|
promoting the sharing and reuse of software generally.
|
||||||
|
|
||||||
NO WARRANTY
|
NO WARRANTY
|
||||||
|
|
||||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE,
|
||||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT
|
||||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE
|
||||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
|
||||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT
|
||||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED,
|
||||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||||
REPAIR OR CORRECTION.
|
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND
|
||||||
|
PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||||
|
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL
|
||||||
|
NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||||
|
|
||||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR
|
||||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR
|
||||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE
|
||||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL,
|
||||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES
|
||||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
ARISING OUT OF THE USE OR INABILITY TO USE THE
|
||||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA
|
||||||
POSSIBILITY OF SUCH DAMAGES.
|
OR DATA BEING RENDERED INACCURATE OR LOSSES
|
||||||
|
SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE
|
||||||
|
PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN
|
||||||
|
IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF
|
||||||
|
THE POSSIBILITY OF SUCH DAMAGES.
|
||||||
|
|
||||||
END OF TERMS AND CONDITIONS
|
END OF TERMS AND CONDITIONS
|
||||||
|
|
||||||
How to Apply These Terms to Your New Programs
|
|
||||||
|
|
||||||
If you develop a new program, and you want it to be of the greatest
|
|
||||||
possible use to the public, the best way to achieve this is to make it
|
|
||||||
free software which everyone can redistribute and change under these terms.
|
|
||||||
|
|
||||||
To do so, attach the following notices to the program. It is safest
|
|
||||||
to attach them to the start of each source file to most effectively
|
|
||||||
convey the exclusion of warranty; and each file should have at least
|
|
||||||
the "copyright" line and a pointer to where the full notice is found.
|
|
||||||
|
|
||||||
<one line to give the program's name and a brief idea of what it does.>
|
|
||||||
Copyright (C) <year> <name of author>
|
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation; either version 2 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY 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 this program; if not, write to the Free Software Foundation, Inc.,
|
|
||||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
|
|
||||||
Also add information on how to contact you by electronic and paper mail.
|
|
||||||
|
|
||||||
If the program is interactive, make it output a short notice like this
|
|
||||||
when it starts in an interactive mode:
|
|
||||||
|
|
||||||
Gnomovision version 69, Copyright (C) year name of author
|
|
||||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
|
||||||
This is free software, and you are welcome to redistribute it
|
|
||||||
under certain conditions; type `show c' for details.
|
|
||||||
|
|
||||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
|
||||||
parts of the General Public License. Of course, the commands you use may
|
|
||||||
be called something other than `show w' and `show c'; they could even be
|
|
||||||
mouse-clicks or menu items--whatever suits your program.
|
|
||||||
|
|
||||||
You should also get your employer (if you work as a programmer) or your
|
|
||||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
|
||||||
necessary. Here is a sample; alter the names:
|
|
||||||
|
|
||||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
|
||||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
|
||||||
|
|
||||||
<signature of Ty Coon>, 1 April 1989
|
|
||||||
Ty Coon, President of Vice
|
|
||||||
|
|
||||||
This General Public License does not permit incorporating your program into
|
|
||||||
proprietary programs. If your program is a subroutine library, you may
|
|
||||||
consider it more useful to permit linking proprietary applications with the
|
|
||||||
library. If this is what you want to do, use the GNU Lesser General
|
|
||||||
Public License instead of this License.
|
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
// $Id: README.txt,v 1.3.2.1.2.2 2010/11/28 22:00:17 longwave Exp $
|
||||||
|
|
||||||
Welcome to Ubercart Views.
|
Welcome to Ubercart Views.
|
||||||
--------------------------
|
--------------------------
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
// $Id: theme.inc,v 1.1.2.2 2010/04/09 18:52:38 hanoii Exp $
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @file
|
* @file
|
||||||
@ -11,13 +12,9 @@
|
|||||||
function template_preprocess_uc_views_view_row_invoice(&$vars) {
|
function template_preprocess_uc_views_view_row_invoice(&$vars) {
|
||||||
require_once drupal_get_path('module', 'uc_order') . '/uc_order.admin.inc';
|
require_once drupal_get_path('module', 'uc_order') . '/uc_order.admin.inc';
|
||||||
$order_id = $vars['row']->{$vars['field_alias']};
|
$order_id = $vars['row']->{$vars['field_alias']};
|
||||||
|
// Clear credit cache, otherwise the load function below will return
|
||||||
if (module_exists('uc_credit')) {
|
// the same cached credit information for all the subsequent orders inovoices
|
||||||
// Clear credit cache, otherwise the load function below will return
|
uc_credit_cache('clear');
|
||||||
// the same cached credit information for all the subsequent orders
|
|
||||||
// invoices
|
|
||||||
uc_credit_cache('clear');
|
|
||||||
}
|
|
||||||
$order = uc_order_load($order_id);
|
$order = uc_order_load($order_id);
|
||||||
|
|
||||||
$invoice = uc_order_invoice($order);
|
$invoice = uc_order_invoice($order);
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
// $Id: uc-views-view-row-invoice.tpl.php,v 1.1.2.1 2009/09/29 13:40:01 madsph Exp $
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @file
|
* @file
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
; $Id: uc_views.info,v 1.2.2.1.2.2 2010/11/18 21:03:58 longwave Exp $
|
||||||
name = Ubercart Views
|
name = Ubercart Views
|
||||||
description = Makes Ubercart order, product and cart data available to Views and provides some standard views as templates for your own views.
|
description = Makes Ubercart order, product and cart data available to Views and provides some standard views as templates for your own views.
|
||||||
dependencies[] = uc_product
|
dependencies[] = uc_product
|
||||||
@ -6,9 +7,9 @@ dependencies[] = views
|
|||||||
package = "Ubercart - views"
|
package = "Ubercart - views"
|
||||||
core = 6.x
|
core = 6.x
|
||||||
|
|
||||||
; Information added by drupal.org packaging script on 2013-10-19
|
; Information added by drupal.org packaging script on 2010-12-23
|
||||||
version = "6.x-3.3+0-dev"
|
version = "6.x-3.1"
|
||||||
core = "6.x"
|
core = "6.x"
|
||||||
project = "uc_views"
|
project = "uc_views"
|
||||||
datestamp = "1382149712"
|
datestamp = "1293106023"
|
||||||
|
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
// $Id: uc_views.install,v 1.2.4.2 2010/11/18 15:17:22 longwave Exp $
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Remove database views that were previously in the core module - but has now been moved to uc_views_marketing
|
* Remove database views that were previously in the core module - but has now been moved to uc_views_marketing
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
// $Id: uc_views.module,v 1.1.4.1.2.2 2010/11/18 20:49:52 longwave Exp $
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Implementation of hook_views_api().
|
* Implementation of hook_views_api().
|
||||||
@ -44,17 +45,3 @@ function uc_views_date_api_fields($field) {
|
|||||||
return $values;
|
return $values;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Implementataion of hook_draggableviews_handlers().
|
|
||||||
*/
|
|
||||||
function uc_views_draggableviews_handlers() {
|
|
||||||
return array(
|
|
||||||
'ubercart' => array(
|
|
||||||
'file' => 'draggableviews_handler_ubercart.inc',
|
|
||||||
'title' => t('Ubercart'),
|
|
||||||
'description' => 'Ubercart product list position.',
|
|
||||||
'handler' => 'draggableviews_handler_ubercart',
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
; $Id: uc_views_addresses.info,v 1.1.2.2 2010/11/18 20:59:38 longwave Exp $
|
||||||
name = Ubercart Views Addresses
|
name = Ubercart Views Addresses
|
||||||
description = Views definitions for Ubercart Addresses module.
|
description = Views definitions for Ubercart Addresses module.
|
||||||
dependencies[] = views
|
dependencies[] = views
|
||||||
@ -5,9 +6,9 @@ dependencies[] = uc_addresses
|
|||||||
package = "Ubercart - views"
|
package = "Ubercart - views"
|
||||||
core = 6.x
|
core = 6.x
|
||||||
|
|
||||||
; Information added by drupal.org packaging script on 2013-10-19
|
; Information added by drupal.org packaging script on 2010-12-23
|
||||||
version = "6.x-3.3+0-dev"
|
version = "6.x-3.1"
|
||||||
core = "6.x"
|
core = "6.x"
|
||||||
project = "uc_views"
|
project = "uc_views"
|
||||||
datestamp = "1382149712"
|
datestamp = "1293106023"
|
||||||
|
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
// $Id: uc_views_addresses.module,v 1.1.2.3 2010/11/18 20:56:15 longwave Exp $
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @file
|
* @file
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
// $Id: uc_views_addresses.views.inc,v 1.1.2.1 2009/10/07 11:43:21 madsph Exp $
|
||||||
/**
|
/**
|
||||||
* @file
|
* @file
|
||||||
* Created with http://drupal.org/project/code_gen
|
* Created with http://drupal.org/project/code_gen
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
// $Id: uc_views_addresses_handler_filter_default_address.inc,v 1.1.2.1 2009/10/07 11:43:21 madsph Exp $
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
BIN
uc_views/uc_views_attribute/.DS_Store
vendored
Normal file
BIN
uc_views/uc_views_attribute/.DS_Store
vendored
Normal file
Binary file not shown.
@ -1,3 +1,4 @@
|
|||||||
|
; $Id: uc_views_attribute.info,v 1.1.2.3 2010/01/19 18:08:58 hanoii Exp $
|
||||||
name = Ubercart Views Attribute
|
name = Ubercart Views Attribute
|
||||||
description = Create views on Ubercart Attribute data.
|
description = Create views on Ubercart Attribute data.
|
||||||
dependencies[] = uc_stock
|
dependencies[] = uc_stock
|
||||||
@ -5,13 +6,12 @@ dependencies[] = uc_product
|
|||||||
dependencies[] = uc_order
|
dependencies[] = uc_order
|
||||||
dependencies[] = uc_attribute
|
dependencies[] = uc_attribute
|
||||||
dependencies[] = views
|
dependencies[] = views
|
||||||
dependencies[] = uc_views
|
|
||||||
package = "Ubercart - views"
|
package = "Ubercart - views"
|
||||||
core = 6.x
|
core = 7.x
|
||||||
|
|
||||||
; Information added by drupal.org packaging script on 2013-10-19
|
|
||||||
version = "6.x-3.3+0-dev"
|
files[] = views/uc_views_attribute_handler_field_order_product_attribute.inc
|
||||||
core = "6.x"
|
files[] = views/uc_views_attribute_handler_field_combination.inc
|
||||||
project = "uc_views"
|
files[] = views/uc_views_attribute_handler_field_combination_price.inc
|
||||||
datestamp = "1382149712"
|
files[] = views/uc_views_attribute_handler_filter_attr.inc
|
||||||
|
|
||||||
|
18
uc_views/uc_views_attribute/uc_views_attribute.install
Normal file
18
uc_views/uc_views_attribute/uc_views_attribute.install
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
<?php
|
||||||
|
// $Id: uc_views_attribute.install,v 1.1.2.2 2009/12/21 23:09:52 hanoii Exp $
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @file
|
||||||
|
* Install, update and uninstall functions for the uc_views_attribute module.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Implentation of the hook_install().
|
||||||
|
*/
|
||||||
|
function uc_views_attribute_install() { }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Implentation of the hook_uninstall().
|
||||||
|
*/
|
||||||
|
function uc_views_attribute_uninstall() { }
|
@ -1,12 +1,13 @@
|
|||||||
<?php
|
<?php
|
||||||
|
// $Id: uc_views_attribute.module,v 1.1.2.2 2009/12/21 23:09:52 hanoii Exp $
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Implementation of hook_views_api().
|
* Implements hook_views_api().
|
||||||
*/
|
*/
|
||||||
function uc_views_attribute_views_api() {
|
function uc_views_attribute_views_api() {
|
||||||
return array(
|
return array(
|
||||||
'api' => '2.0',
|
'api' => '2.0',
|
||||||
'path' => drupal_get_path('module', 'uc_views_attribute') .'/views',
|
'path' => drupal_get_path('module', 'uc_views_attribute') . '/views',
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,35 +1,26 @@
|
|||||||
<?php
|
<?php
|
||||||
|
// $Id: uc_views_attribute.views.inc,v 1.1.2.5 2010/04/29 13:38:55 hanoii Exp $
|
||||||
/**
|
/**
|
||||||
* @file
|
* @file
|
||||||
* Views 2 hooks and callback registries.
|
* Views 2 hooks and callback registries.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Implementation of hook_views_data().
|
* Implements hook_views_data().
|
||||||
*/
|
*/
|
||||||
function uc_views_attribute_views_data() {
|
function uc_views_attribute_views_data() {
|
||||||
$uc_product_attributes = drupal_get_schema('uc_product_attributes');
|
$uc_product_attributes = drupal_get_schema('uc_product_attributes');
|
||||||
|
|
||||||
//Create a filter for each product attribute
|
//Create a filter for each product attribute
|
||||||
$result = db_query("SELECT aid, name, description FROM {uc_attributes}");
|
$result = db_query("SELECT aid, name, description FROM {uc_attributes}");
|
||||||
while($row = db_fetch_object($result)) {
|
foreach($result as $row) {
|
||||||
$data['uc_order_products']['attr_'.$row->aid] = array(
|
$data['uc_order_products']['attr_' . $row->aid] = array(
|
||||||
'title' => 'Attribute: '.$row->name,
|
'title' => 'Attribute: ' . $row->name,
|
||||||
'help' => 'Attribute desc: '.$row->description,
|
'help' => 'Attribute desc: ' . $row->description,
|
||||||
'filter' => array(
|
'filter' => array(
|
||||||
'handler' => 'uc_views_attribute_handler_filter_attr',
|
'handler' => 'uc_views_attribute_handler_filter_attr',
|
||||||
),
|
),
|
||||||
'aid' => $row->aid,
|
'aid' => $row->aid,
|
||||||
);
|
);
|
||||||
|
|
||||||
// Create a filter for each product attribute
|
|
||||||
$data['uc_product_adjustments']['pattr_'.$row->aid] = array(
|
|
||||||
'title' => /*'Attribute: '.*/ $row->name,
|
|
||||||
'help' => 'Attribute desc: '.$row->description,
|
|
||||||
'filter' => array(
|
|
||||||
'handler' => 'uc_views_attribute_handler_filter_product_attr',
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Patch by hanoii
|
// Patch by hanoii
|
||||||
@ -38,8 +29,8 @@ function uc_views_attribute_views_data() {
|
|||||||
$uc_product_adjustments = drupal_get_schema('uc_product_adjustments');
|
$uc_product_adjustments = drupal_get_schema('uc_product_adjustments');
|
||||||
|
|
||||||
$data['uc_product_adjustments']['table']['join']['node'] = array(
|
$data['uc_product_adjustments']['table']['join']['node'] = array(
|
||||||
'left_field' => 'nid',
|
'left_field' => 'nid',
|
||||||
'field' => 'nid',
|
'field' => 'nid',
|
||||||
);
|
);
|
||||||
|
|
||||||
$data['uc_product_adjustments']['model'] = array(
|
$data['uc_product_adjustments']['model'] = array(
|
||||||
@ -54,7 +45,7 @@ function uc_views_attribute_views_data() {
|
|||||||
'relationship field' => 'model',
|
'relationship field' => 'model',
|
||||||
'handler' => 'views_handler_relationship',
|
'handler' => 'views_handler_relationship',
|
||||||
'label' => t('Model'),
|
'label' => t('Model'),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
$data['uc_product_adjustments']['combination'] = array(
|
$data['uc_product_adjustments']['combination'] = array(
|
||||||
@ -64,7 +55,6 @@ function uc_views_attribute_views_data() {
|
|||||||
'handler' => 'uc_views_attribute_handler_field_combination',
|
'handler' => 'uc_views_attribute_handler_field_combination',
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
$data['uc_product_adjustments']['combination_sell_price'] = array(
|
$data['uc_product_adjustments']['combination_sell_price'] = array(
|
||||||
'title' => t('Sell price w/attributes adjustment'),
|
'title' => t('Sell price w/attributes adjustment'),
|
||||||
'help' => t('The sell price of the product with all the price adjustments from its combination of attributes.'),
|
'help' => t('The sell price of the product with all the price adjustments from its combination of attributes.'),
|
||||||
@ -102,7 +92,7 @@ function uc_views_attribute_views_data() {
|
|||||||
|
|
||||||
// Add viewhandler for uc_order_product attributes
|
// Add viewhandler for uc_order_product attributes
|
||||||
$data['uc_order_products']['attributes'] = array(
|
$data['uc_order_products']['attributes'] = array(
|
||||||
'title' => t('Ordered product attributes'),
|
'title' => t('Product attributes'),
|
||||||
'help' => t('List of attribute selection for the ordered product.'),
|
'help' => t('List of attribute selection for the ordered product.'),
|
||||||
'group' => t('Ubercart order product'),
|
'group' => t('Ubercart order product'),
|
||||||
'field' => array(
|
'field' => array(
|
||||||
@ -116,7 +106,7 @@ function uc_views_attribute_views_data() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Implementation of hook_views_handlers().
|
* Implements hook_views_handlers().
|
||||||
*/
|
*/
|
||||||
function uc_views_attribute_views_handlers() {
|
function uc_views_attribute_views_handlers() {
|
||||||
return array(
|
return array(
|
||||||
@ -128,9 +118,8 @@ function uc_views_attribute_views_handlers() {
|
|||||||
'uc_views_attribute_handler_field_combination' => array('parent' => 'views_handler_field'),
|
'uc_views_attribute_handler_field_combination' => array('parent' => 'views_handler_field'),
|
||||||
'uc_views_attribute_handler_field_order_product_attribute' => array('parent' => 'views_handler_field'),
|
'uc_views_attribute_handler_field_order_product_attribute' => array('parent' => 'views_handler_field'),
|
||||||
'uc_views_attribute_handler_field_combination_price' => array('parent' => 'uc_views_handler_field_money_amount'),
|
'uc_views_attribute_handler_field_combination_price' => array('parent' => 'uc_views_handler_field_money_amount'),
|
||||||
// filters
|
//fiters
|
||||||
'uc_views_attribute_handler_filter_attr' => array('parent' => 'views_handler_filter_in_operator'),
|
'uc_views_attribute_handler_filter_attr' => array('parent' => 'views_handler_filter_in_operator'),
|
||||||
'uc_views_attribute_handler_filter_product_attr' => array('parent' => 'views_handler_filter_in_operator'),
|
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -138,8 +127,7 @@ function uc_views_attribute_views_handlers() {
|
|||||||
/**
|
/**
|
||||||
* Conditionally add editablefields support.
|
* Conditionally add editablefields support.
|
||||||
*/
|
*/
|
||||||
function uc_views_attribute_views_tables_alter(&$tables) {
|
function uc_views_attribute_views_tables_alter(&$tables) { }
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Load all attributes.
|
* Load all attributes.
|
||||||
@ -147,7 +135,7 @@ function uc_views_attribute_views_tables_alter(&$tables) {
|
|||||||
function uc_get_attributes() {
|
function uc_get_attributes() {
|
||||||
$result = db_query("SELECT aid FROM {uc_attributes} ORDER BY ordering");
|
$result = db_query("SELECT aid FROM {uc_attributes} ORDER BY ordering");
|
||||||
$chosen_attr = array();
|
$chosen_attr = array();
|
||||||
while ($attr = db_fetch_object($result)){
|
while ($attr = db_fetch_object($result)) {
|
||||||
$chosen_attr[$attr->aid] = uc_attribute_load($attr->aid);
|
$chosen_attr[$attr->aid] = uc_attribute_load($attr->aid);
|
||||||
}
|
}
|
||||||
return $chosen_attr;
|
return $chosen_attr;
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
// $Id: uc_views_attribute_handler_field_combination.inc,v 1.1.2.1 2009/09/22 07:32:01 madsph Exp $
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @file
|
* @file
|
||||||
@ -9,7 +10,7 @@
|
|||||||
* Field handler to provide a human-readable version of the stored serialized combination of attributes
|
* Field handler to provide a human-readable version of the stored serialized combination of attributes
|
||||||
*/
|
*/
|
||||||
class uc_views_attribute_handler_field_combination extends views_handler_field {
|
class uc_views_attribute_handler_field_combination extends views_handler_field {
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param integer $nid
|
* @param integer $nid
|
||||||
* Node ID
|
* Node ID
|
||||||
@ -26,7 +27,7 @@ class uc_views_attribute_handler_field_combination extends views_handler_field {
|
|||||||
$query_from = " FROM";
|
$query_from = " FROM";
|
||||||
$query_where = " WHERE";
|
$query_where = " WHERE";
|
||||||
$query_order = " ORDER BY";
|
$query_order = " ORDER BY";
|
||||||
$result = db_query("SELECT pa.nid, pa.aid, pa.ordering, a.name, a.ordering, ao.aid, COUNT(po.oid) FROM {uc_product_attributes} AS pa LEFT JOIN {uc_attributes} AS a ON pa.aid = a.aid LEFT JOIN {uc_attribute_options} AS ao ON a.aid = ao.aid LEFT JOIN {uc_product_options} AS po ON ao.oid = po.oid AND po.nid = %d WHERE pa.nid = %d GROUP BY ao.aid, pa.aid, a.name, pa.ordering, a.ordering, pa.nid HAVING count(po.oid) > 0 ORDER BY pa.ordering, a.ordering", $nid, $nid);
|
$result = db_query("SELECT pa.nid, pa.aid, pa.ordering, a.name, a.ordering, ao.aid, COUNT(po.oid) FROM {uc_product_attributes} AS pa LEFT JOIN {uc_attributes} AS a ON pa.aid = a.aid LEFT JOIN {uc_attribute_options} AS ao ON a.aid = ao.aid LEFT JOIN {uc_product_options} AS po ON ao.oid = po.oid AND po.nid = %d WHERE pa.nid = :pa.nid GROUP BY ao.aid, pa.aid, a.name, pa.ordering, a.ordering, pa.nid HAVING count(po.oid) > :count(po.oid) ORDER BY pa.ordering, a.ordering", array(':pa.nid' => $nid, ':count(po.oid)' => 0, '' => $nid));
|
||||||
$i = 1;
|
$i = 1;
|
||||||
$values = array();
|
$values = array();
|
||||||
|
|
||||||
@ -34,7 +35,7 @@ class uc_views_attribute_handler_field_combination extends views_handler_field {
|
|||||||
$query_select .= " ao$i.aid AS aid$i, ao$i.name AS name$i, ao$i.oid AS oid$i, po$i.ordering,";
|
$query_select .= " ao$i.aid AS aid$i, ao$i.name AS name$i, ao$i.oid AS oid$i, po$i.ordering,";
|
||||||
$query_from .= " ({uc_product_options} AS po$i LEFT JOIN {uc_attribute_options} AS ao$i ON po$i.oid = ao$i.oid AND po$i.nid = %d),";
|
$query_from .= " ({uc_product_options} AS po$i LEFT JOIN {uc_attribute_options} AS ao$i ON po$i.oid = ao$i.oid AND po$i.nid = %d),";
|
||||||
$values[] = $nid;
|
$values[] = $nid;
|
||||||
$query_where .= " ao$i.aid = ". $prod_attr->aid ." AND";
|
$query_where .= " ao$i.aid = " . $prod_attr->aid . " AND";
|
||||||
$query_order .= " po$i.ordering, ao$i.name,";
|
$query_order .= " po$i.ordering, ao$i.name,";
|
||||||
++$i;
|
++$i;
|
||||||
$attribute_ids[] = $prod_attr->aid;
|
$attribute_ids[] = $prod_attr->aid;
|
||||||
@ -48,16 +49,17 @@ class uc_views_attribute_handler_field_combination extends views_handler_field {
|
|||||||
$query_order = rtrim($query_order, ',');
|
$query_order = rtrim($query_order, ',');
|
||||||
|
|
||||||
if ($num_prod_attr) {
|
if ($num_prod_attr) {
|
||||||
|
// TODO Please convert this statement to the D7 database API syntax.
|
||||||
$result = db_query($query_select . $query_from . $query_where . $query_order, $values);
|
$result = db_query($query_select . $query_from . $query_where . $query_order, $values);
|
||||||
while ($row = db_fetch_object($result)) {
|
while ($row = db_fetch_object($result)) {
|
||||||
$attrs_info = array();
|
$attrs_info = array();
|
||||||
$attrs = array();
|
$attrs = array();
|
||||||
for ($i = 1 ; $i <= $num_prod_attr ; $i++) {
|
for ($i = 1; $i <= $num_prod_attr; $i++) {
|
||||||
$aid_key = "aid$i";
|
$aid_key = "aid$i";
|
||||||
$oid_key = "oid$i";
|
$oid_key = "oid$i";
|
||||||
$name_key = "name$i";
|
$name_key = "name$i";
|
||||||
$aid = $row->$aid_key;
|
$aid = $row->$aid_key;
|
||||||
$attr = db_result(db_query("SELECT name FROM {uc_attributes} WHERE aid = %d", $aid));
|
$attr = db_query("SELECT name FROM {uc_attributes} WHERE aid = :aid", array(':aid' => $aid))->fetchField();
|
||||||
$attrs_info[$attr] = $row->$name_key;
|
$attrs_info[$attr] = $row->$name_key;
|
||||||
$attrs[$aid] = $row->$oid_key;
|
$attrs[$aid] = $row->$oid_key;
|
||||||
}
|
}
|
||||||
@ -67,7 +69,7 @@ class uc_views_attribute_handler_field_combination extends views_handler_field {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Exclude configured combinations
|
// Exclude configured combinations
|
||||||
$result = db_query("SELECT * FROM {uc_product_adjustments} WHERE nid = %d", $nid);
|
$result = db_query("SELECT * FROM {uc_product_adjustments} WHERE nid = :nid", array(':nid' => $nid));
|
||||||
while ($row = db_fetch_object($result)) {
|
while ($row = db_fetch_object($result)) {
|
||||||
// TODO: Remove unserialize/asort/serialize because rc6+ already sorts it
|
// TODO: Remove unserialize/asort/serialize because rc6+ already sorts it
|
||||||
$c = unserialize($row->combination);
|
$c = unserialize($row->combination);
|
||||||
@ -125,13 +127,13 @@ class uc_views_attribute_handler_field_combination extends views_handler_field {
|
|||||||
if (is_string($combination)) {
|
if (is_string($combination)) {
|
||||||
$combination = unserialize($combination);
|
$combination = unserialize($combination);
|
||||||
$attributes = array();
|
$attributes = array();
|
||||||
foreach($combination as $aid => $oid) {
|
foreach ($combination as $aid => $oid) {
|
||||||
$attribute = uc_attribute_load($aid);
|
$attribute = uc_attribute_load($aid);
|
||||||
$option = uc_attribute_option_load($oid);
|
$option = uc_attribute_option_load($oid);
|
||||||
$attributes[] = "$attribute->name: $option->name";
|
$attributes[] = "$attribute->name: $option->name";
|
||||||
}
|
}
|
||||||
$items[] = implode($attributes, ', ');
|
$items[] = implode($attributes, ', ');
|
||||||
return theme('item_list', $items);
|
return theme('item_list', array('items' => $items));
|
||||||
}
|
}
|
||||||
// combination information is not found, render other node's attribute and options
|
// combination information is not found, render other node's attribute and options
|
||||||
else if ($this->options['fetch_if_null']) {
|
else if ($this->options['fetch_if_null']) {
|
||||||
@ -145,7 +147,7 @@ class uc_views_attribute_handler_field_combination extends views_handler_field {
|
|||||||
}
|
}
|
||||||
$items[] = implode($attributes, ', ');
|
$items[] = implode($attributes, ', ');
|
||||||
}
|
}
|
||||||
return theme('item_list', $items);
|
return theme('item_list', array('items' => $items));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return parent::render($values);
|
return parent::render($values);
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
// $Id: uc_views_attribute_handler_field_combination_price.inc,v 1.1.2.2 2010/06/15 23:13:53 hanoii Exp $
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @file
|
* @file
|
||||||
@ -37,14 +38,16 @@ class uc_views_attribute_handler_field_combination_price extends uc_views_handle
|
|||||||
// I did try to add it through
|
// I did try to add it through
|
||||||
// additional_fields => array('product_price' => array('table' => 'uc_products', 'field' => 'sell_price'))
|
// additional_fields => array('product_price' => array('table' => 'uc_products', 'field' => 'sell_price'))
|
||||||
// but it didn't work.
|
// but it didn't work.
|
||||||
$price = db_result(db_query("SELECT $uc_products_field FROM {uc_products} WHERE nid = %d AND vid = %d", $values->nid, $values->{$this->aliases['vid']}));
|
// TODO Please convert this statement to the D7 database API syntax. $offset_total = 0;
|
||||||
|
$price = db_query("SELECT $uc_products_field FROM {uc_products} WHERE nid = %d AND vid = %d", $values->nid, $values->{$this->aliases['vid']})->fetchField();
|
||||||
$offset_total = 0;
|
$offset_total = 0;
|
||||||
|
|
||||||
$combination =$values->{$this->aliases['combination']};
|
$combination = $values->{$this->aliases['combination']};
|
||||||
if ($combination) {
|
if ($combination) {
|
||||||
$combination = unserialize($combination);
|
$combination = unserialize($combination);
|
||||||
foreach ($combination as $aid => $oid) {
|
foreach ($combination as $aid => $oid) {
|
||||||
$offset = db_result(db_query("SELECT $uc_product_options_field FROM {uc_product_options} WHERE nid = %d AND oid = %d", $values->nid, $oid));
|
// TODO Please convert this statement to the D7 database API syntax.
|
||||||
|
$offset = db_query("SELECT $uc_product_options_field FROM {uc_product_options} WHERE nid = %d AND oid = %d", $values->nid, $oid)->fetchField();
|
||||||
$offset_total += $offset;
|
$offset_total += $offset;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
// $Id: uc_views_attribute_handler_field_order_product_attribute.inc,v 1.1.2.2 2010/01/12 20:07:04 hanoii Exp $
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Field handler to provide a human-readable version of the selected combination of attributes
|
* Field handler to provide a human-readable version of the selected combination of attributes
|
||||||
@ -21,9 +22,9 @@ class uc_views_attribute_handler_field_order_product_attribute extends views_han
|
|||||||
$result = '';
|
$result = '';
|
||||||
$rows = array();
|
$rows = array();
|
||||||
foreach ($data['attributes'] as $attribute => $option) {
|
foreach ($data['attributes'] as $attribute => $option) {
|
||||||
$rows[] = t('@attribute: @option', array('@attribute' => $attribute, '@option' => implode(', ', (array)$option)));
|
$rows[] = t('@attribute: @option', array('@attribute' => $attribute, '@option' => implode(', ', (array) $option)));
|
||||||
if (count($rows)) {
|
if (count($rows)) {
|
||||||
$result = theme('item_list', $rows, NULL, 'ul', array('class' => 'product-description'));
|
$result = theme('item_list', array('items' => $rows, 'title' => NULL, 'type' => 'ul', 'attributes' => array('class' => 'product-description')));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,9 +1,12 @@
|
|||||||
<?php
|
<?php
|
||||||
|
// $Id: uc_views_attribute_handler_filter_attr.inc,v 1.1.2.2 2009/12/16 08:56:34 madsph Exp $
|
||||||
/**
|
/**
|
||||||
* Filter by attributes - by justindodge
|
* Filter by attributes - by justindodge
|
||||||
*/
|
*/
|
||||||
class uc_views_attribute_handler_filter_attr extends views_handler_filter_in_operator {
|
class uc_views_attribute_handler_filter_attr extends views_handler_filter_in_operator {
|
||||||
function has_extra_options() { return TRUE; }
|
function has_extra_options() {
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
function option_definition() {
|
function option_definition() {
|
||||||
$options = parent::option_definition();
|
$options = parent::option_definition();
|
||||||
@ -15,11 +18,11 @@ class uc_views_attribute_handler_filter_attr extends views_handler_filter_in_ope
|
|||||||
|
|
||||||
function get_value_options() {
|
function get_value_options() {
|
||||||
if (!isset($this->value_options)) {
|
if (!isset($this->value_options)) {
|
||||||
$aid = explode('_',$this->field);
|
$aid = explode('_', $this->field);
|
||||||
$aid = $aid[1];
|
$aid = $aid[1];
|
||||||
|
|
||||||
$this->value_title = t('Options');
|
$this->value_title = t('Options');
|
||||||
$result = db_query("SELECT name, oid FROM {uc_attribute_options} WHERE aid = %d ORDER BY ordering", $aid);
|
$result = db_query("SELECT name, oid FROM {uc_attribute_options} WHERE aid = :aid ORDER BY ordering", array(':aid' => $aid));
|
||||||
|
|
||||||
while ($row = db_fetch_object($result)) {
|
while ($row = db_fetch_object($result)) {
|
||||||
$options[$row->oid] = $row->name;
|
$options[$row->oid] = $row->name;
|
||||||
@ -35,7 +38,10 @@ class uc_views_attribute_handler_filter_attr extends views_handler_filter_in_ope
|
|||||||
$form['type'] = array(
|
$form['type'] = array(
|
||||||
'#type' => 'radios',
|
'#type' => 'radios',
|
||||||
'#title' => t('Selection type'),
|
'#title' => t('Selection type'),
|
||||||
'#options' => array('select' => t('Checkboxes/Dropdown'), 'textfield' => t('Textfield')),
|
'#options' => array(
|
||||||
|
'select' => t('Checkboxes/Dropdown'),
|
||||||
|
'textfield' => t('Textfield'),
|
||||||
|
),
|
||||||
'#default_value' => $this->options['type'],
|
'#default_value' => $this->options['type'],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -43,7 +49,7 @@ class uc_views_attribute_handler_filter_attr extends views_handler_filter_in_ope
|
|||||||
function value_form(&$form, &$form_state) {
|
function value_form(&$form, &$form_state) {
|
||||||
parent::value_form($form, $form_state);
|
parent::value_form($form, $form_state);
|
||||||
if ($this->options['type'] == 'textfield') {
|
if ($this->options['type'] == 'textfield') {
|
||||||
$form['value'] = array (
|
$form['value'] = array(
|
||||||
'#type' => 'textfield',
|
'#type' => 'textfield',
|
||||||
'#title' => 'Text search',
|
'#title' => 'Text search',
|
||||||
);
|
);
|
||||||
@ -51,45 +57,45 @@ class uc_views_attribute_handler_filter_attr extends views_handler_filter_in_ope
|
|||||||
}
|
}
|
||||||
|
|
||||||
function query() {
|
function query() {
|
||||||
$aid = explode('_',$this->field);
|
$aid = explode('_', $this->field);
|
||||||
$aid = $aid[1];
|
$aid = $aid[1];
|
||||||
|
|
||||||
$key = db_result(db_query('SELECT name FROM {uc_attributes} WHERE aid = %d', $aid));
|
$key = db_query('SELECT name FROM {uc_attributes} WHERE aid = :aid', array(':aid' => $aid))->fetchField();
|
||||||
|
|
||||||
$this->ensure_my_table();
|
$this->ensure_my_table();
|
||||||
$this->real_field = 'data';
|
$this->real_field = 'data';
|
||||||
$field = "$this->table_alias.$this->real_field";
|
$field = "$this->table_alias.$this->real_field";
|
||||||
$upper = '';
|
$upper = '';
|
||||||
if($this->operator == 'not in') {
|
if ($this->operator == 'not in') {
|
||||||
$not = 'NOT';
|
$not = 'NOT';
|
||||||
}
|
}
|
||||||
if(!is_array($this->value)) {
|
if (!is_array($this->value)) {
|
||||||
$this->value = array($this->value);
|
$this->value = array($this->value);
|
||||||
}
|
}
|
||||||
foreach ($this->value as &$value) {
|
foreach ($this->value as &$value) {
|
||||||
if($this->options['type'] == 'textfield') {
|
if ($this->options['type'] == 'textfield') {
|
||||||
$optval = $value;
|
$optval = $value;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$optval = db_result(db_query('SELECT name FROM {uc_attribute_options} WHERE oid = %d', $value));
|
$optval = db_query('SELECT name FROM {uc_attribute_options} WHERE oid = :oid', array(':oid' => $value))->fetchField();
|
||||||
}
|
}
|
||||||
if(!$optval) {
|
if (!$optval) {
|
||||||
//If we let the query get added, only products with the attribute enabled & with the value of that attribute empty
|
//If we let the query get added, only products with the attribute enabled & with the value of that attribute empty
|
||||||
//will return. By default, I think it makes more sense to allow any product to return despite whether or not it
|
//will return. By default, I think it makes more sense to allow any product to return despite whether or not it
|
||||||
//has the attribute if the user put nothing in to search for.
|
//has the attribute if the user put nothing in to search for.
|
||||||
//Adding a new type of filter that merely captures whether or not the attribute exists at all for the product may
|
//Adding a new type of filter that merely captures whether or not the attribute exists at all for the product may
|
||||||
//be the best way to capture the alternative. Or, perhaps a config option could be added to this filter :
|
//be the best way to capture the alternative. Or, perhaps a config option could be added to this filter :
|
||||||
//"Show products only if they have this attribute enabled". If this option is unchecked, a blank value returns all
|
//"Show products only if they have this attribute enabled". If this option is unchecked, a blank value returns all
|
||||||
//products. If checked, a blank value at least filters out products that dont have this attribute available.
|
//products. If checked, a blank value at least filters out products that dont have this attribute available.
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
$var = array($key => array(0 => $optval));
|
$var = array($key => array(0 => $optval));
|
||||||
$servar = serialize($var);
|
$servar = serialize($var);
|
||||||
$l = strpos($servar,'{')+1;
|
$l = strpos($servar, '{') + 1;
|
||||||
$r = strpos($servar,'}')-$l;
|
$r = strpos($servar, '}') -$l;
|
||||||
$value = substr($servar,$l,$r);
|
$value = substr($servar, $l, $r);
|
||||||
//@todo - this method of building the query does allow for partial text matching (i.e. 'foo' matches in 'foobar').
|
//@todo - this method of building the query does allow for partial text matching (i.e. 'foo' matches in 'foobar').
|
||||||
$this->query->add_where($this->options['group'], "$upper(%s) $not LIKE $upper('%%%s%%')", $field, $value);
|
$this->query->add_where($this->options['group'], "$upper(%s) $not LIKE $upper('%%%s%%')", $field, $value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
// $Id: README.txt,v 1.1.2.1 2009/06/22 10:37:55 madsph Exp $
|
||||||
|
|
||||||
Welcome to Ubercart Views with Bulk operations.
|
Welcome to Ubercart Views with Bulk operations.
|
||||||
-----------------------------------------------
|
-----------------------------------------------
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
; $Id: uc_views_bulk_operations.info,v 1.1.2.2.2.1 2010/11/18 21:03:58 longwave Exp $
|
||||||
name = Ubercart Views Bulk Operations
|
name = Ubercart Views Bulk Operations
|
||||||
description = Print, delete or change the status of multiple orders, or add multiple nodes to the cart at once.
|
description = Print, delete or change the status of multiple orders, or add multiple nodes to the cart at once.
|
||||||
dependencies[] = uc_views
|
dependencies[] = uc_views
|
||||||
@ -5,9 +6,9 @@ dependencies[] = views_bulk_operations
|
|||||||
package = "Ubercart - views"
|
package = "Ubercart - views"
|
||||||
core = 6.x
|
core = 6.x
|
||||||
|
|
||||||
; Information added by drupal.org packaging script on 2013-10-19
|
; Information added by drupal.org packaging script on 2010-12-23
|
||||||
version = "6.x-3.3+0-dev"
|
version = "6.x-3.1"
|
||||||
core = "6.x"
|
core = "6.x"
|
||||||
project = "uc_views"
|
project = "uc_views"
|
||||||
datestamp = "1382149712"
|
datestamp = "1293106023"
|
||||||
|
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
// $Id: uc_views_bulk_operations.module,v 1.1.2.1.2.8 2010/11/18 16:08:27 longwave Exp $
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Implementation of hook_views_api().
|
* Implementation of hook_views_api().
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
// $Id: uc_views_bulk_operations.views.inc,v 1.1.2.1 2009/06/22 10:37:55 madsph Exp $
|
||||||
/**
|
/**
|
||||||
* @file
|
* @file
|
||||||
* Views 2 hooks and callback registries.
|
* Views 2 hooks and callback registries.
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
// $Id: uc_views_bulk_operations.views_default.inc,v 1.1.2.1 2009/06/22 10:37:55 madsph Exp $
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @file
|
* @file
|
||||||
@ -150,8 +151,7 @@ function uc_views_bulk_operations_views_default_views() {
|
|||||||
),
|
),
|
||||||
));
|
));
|
||||||
$handler->override_option('access', array(
|
$handler->override_option('access', array(
|
||||||
'type' => 'perm',
|
'type' => 'none',
|
||||||
'perm' => 'view all orders',
|
|
||||||
));
|
));
|
||||||
$handler->override_option('cache', array(
|
$handler->override_option('cache', array(
|
||||||
'type' => 'none',
|
'type' => 'none',
|
||||||
|
@ -1,12 +1,13 @@
|
|||||||
|
; $Id: uc_views_marketing.info,v 1.1.2.1.2.2 2010/11/18 14:20:40 longwave Exp $
|
||||||
name = Ubercart Views Marketing
|
name = Ubercart Views Marketing
|
||||||
description = Create views on Ubercart data for marketing purposes, such as a block for new products, lists of a users purchased products, most popular products, etc.
|
description = Create views on Ubercart data for marketing purposes, such as a block for new products, lists of a users purchased products, most popular products, etc.
|
||||||
dependencies[] = uc_views
|
dependencies[] = uc_views
|
||||||
package = "Ubercart - views"
|
package = "Ubercart - views"
|
||||||
core = 6.x
|
core = 6.x
|
||||||
|
|
||||||
; Information added by drupal.org packaging script on 2013-10-19
|
; Information added by drupal.org packaging script on 2010-12-23
|
||||||
version = "6.x-3.3+0-dev"
|
version = "6.x-3.1"
|
||||||
core = "6.x"
|
core = "6.x"
|
||||||
project = "uc_views"
|
project = "uc_views"
|
||||||
datestamp = "1382149712"
|
datestamp = "1293106023"
|
||||||
|
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
// $Id: uc_views_marketing.install,v 1.1.4.5 2010/11/18 14:47:25 longwave Exp $
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Implementation of hook_requirements().
|
* Implementation of hook_requirements().
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
// $Id: uc_views_marketing.module,v 1.1.2.1.2.2 2010/11/18 20:56:15 longwave Exp $
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Implementation of hook_views_api().
|
* Implementation of hook_views_api().
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
// $Id: uc_views_marketing.views.inc,v 1.1.4.3 2010/02/27 00:14:24 hanoii Exp $
|
||||||
/**
|
/**
|
||||||
* @file
|
* @file
|
||||||
* Views 2 hooks and callback registries.
|
* Views 2 hooks and callback registries.
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
// $Id: uc_views_marketing.views_default.inc,v 1.1.2.1.2.1 2010/11/18 14:20:40 longwave Exp $
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @file
|
* @file
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
// $Id: uc_views.views.inc,v 1.13.2.5.2.25 2010/12/22 18:49:05 hanoii Exp $
|
||||||
/**
|
/**
|
||||||
* @file
|
* @file
|
||||||
* Views 2 hooks and callback registries.
|
* Views 2 hooks and callback registries.
|
||||||
@ -43,12 +44,6 @@ function uc_views_views_data() {
|
|||||||
'filter' => array(
|
'filter' => array(
|
||||||
'handler' => 'views_handler_filter_numeric',
|
'handler' => 'views_handler_filter_numeric',
|
||||||
),
|
),
|
||||||
'argument' => array(
|
|
||||||
'handler' => 'views_handler_argument_numeric',
|
|
||||||
'name field' => 'title',
|
|
||||||
'numeric' => TRUE,
|
|
||||||
'validate type' => 'order_product_id',
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
|
|
||||||
$data['uc_order_products']['model'] = array(
|
$data['uc_order_products']['model'] = array(
|
||||||
@ -666,7 +661,7 @@ function uc_views_views_data() {
|
|||||||
);
|
);
|
||||||
$data[$key]['zone_name'] = array(
|
$data[$key]['zone_name'] = array(
|
||||||
'title' => t($value['prefix'].' zone name'),
|
'title' => t($value['prefix'].' zone name'),
|
||||||
'help' => t(preg_replace('/id|ID/i', ' ', $order_schema['fields'][$value['field']]['description'])),
|
'help' => t(ereg_replace(' (id|ID) ', ' ', $order_schema['fields'][$value['field']]['description'])),
|
||||||
'field' => array(
|
'field' => array(
|
||||||
'handler' => 'views_handler_field',
|
'handler' => 'views_handler_field',
|
||||||
'click sortable' => TRUE,
|
'click sortable' => TRUE,
|
||||||
@ -702,7 +697,7 @@ function uc_views_views_data() {
|
|||||||
// line items
|
// line items
|
||||||
$line_items = array();
|
$line_items = array();
|
||||||
foreach (_line_item_list() as $line_item) {
|
foreach (_line_item_list() as $line_item) {
|
||||||
if (!in_array($line_item['id'], array('subtotal', 'tax_subtotal', 'total')) && $line_item['stored']) {
|
if (!in_array($line_item['id'], array('subtotal', 'tax_subtotal', 'total', 'generic')) && $line_item['stored']) {
|
||||||
$line_items[$line_item['id']] = $line_item['title'];
|
$line_items[$line_item['id']] = $line_item['title'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -744,7 +739,7 @@ function uc_views_views_data() {
|
|||||||
'float' => TRUE,
|
'float' => TRUE,
|
||||||
),
|
),
|
||||||
'filter' => array(
|
'filter' => array(
|
||||||
'handler' => 'views_handler_filter_float',
|
'handler' => 'views_handler_filter_amount',
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -1002,9 +997,5 @@ function uc_views_views_plugins() {
|
|||||||
* Implementation of hook_views_query_substitutions().
|
* Implementation of hook_views_query_substitutions().
|
||||||
*/
|
*/
|
||||||
function uc_views_views_query_substitutions($view) {
|
function uc_views_views_query_substitutions($view) {
|
||||||
if (module_exists('uc_cart')) {
|
return array('***CURRENT_CART_ID***' => uc_cart_get_id());
|
||||||
if ($cart_id = uc_cart_get_id(FALSE)) {
|
|
||||||
return array('***CURRENT_CART_ID***' => $cart_id);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
// $Id: uc_views.views_default.inc,v 1.2.2.4 2009/06/30 08:54:23 madsph Exp $
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @file
|
* @file
|
||||||
@ -95,10 +96,6 @@ function uc_views_views_default_views() {
|
|||||||
),
|
),
|
||||||
));
|
));
|
||||||
$handler->override_option('access', array(
|
$handler->override_option('access', array(
|
||||||
'type' => 'perm',
|
|
||||||
'perm' => 'view all orders',
|
|
||||||
));
|
|
||||||
$handler->override_option('cache', array(
|
|
||||||
'type' => 'none',
|
'type' => 'none',
|
||||||
));
|
));
|
||||||
$handler->override_option('title', 'Orders');
|
$handler->override_option('title', 'Orders');
|
||||||
@ -161,275 +158,5 @@ function uc_views_views_default_views() {
|
|||||||
|
|
||||||
$views[$view->name] = $view;
|
$views[$view->name] = $view;
|
||||||
|
|
||||||
if (module_exists('draggableviews')) {
|
|
||||||
$view = new view;
|
|
||||||
$view->name = 'product_order';
|
|
||||||
$view->description = '';
|
|
||||||
$view->tag = 'Ubercart';
|
|
||||||
$view->view_php = '';
|
|
||||||
$view->base_table = 'node';
|
|
||||||
$view->is_cacheable = FALSE;
|
|
||||||
$view->api_version = 2;
|
|
||||||
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
|
|
||||||
$handler = $view->new_display('default', 'Defaults', 'default');
|
|
||||||
$handler->override_option('fields', array(
|
|
||||||
'title' => array(
|
|
||||||
'label' => 'Title',
|
|
||||||
'alter' => array(
|
|
||||||
'alter_text' => 0,
|
|
||||||
'text' => '',
|
|
||||||
'make_link' => 0,
|
|
||||||
'path' => '',
|
|
||||||
'link_class' => '',
|
|
||||||
'alt' => '',
|
|
||||||
'prefix' => '',
|
|
||||||
'suffix' => '',
|
|
||||||
'target' => '',
|
|
||||||
'help' => '',
|
|
||||||
'trim' => 0,
|
|
||||||
'max_length' => '',
|
|
||||||
'word_boundary' => 1,
|
|
||||||
'ellipsis' => 1,
|
|
||||||
'html' => 0,
|
|
||||||
'strip_tags' => 0,
|
|
||||||
),
|
|
||||||
'empty' => '',
|
|
||||||
'hide_empty' => 0,
|
|
||||||
'empty_zero' => 0,
|
|
||||||
'link_to_node' => 1,
|
|
||||||
'exclude' => 0,
|
|
||||||
'id' => 'title',
|
|
||||||
'table' => 'node',
|
|
||||||
'field' => 'title',
|
|
||||||
'relationship' => 'none',
|
|
||||||
),
|
|
||||||
'sell_price' => array(
|
|
||||||
'label' => 'Sell price',
|
|
||||||
'alter' => array(
|
|
||||||
'alter_text' => 0,
|
|
||||||
'text' => '',
|
|
||||||
'make_link' => 0,
|
|
||||||
'path' => '',
|
|
||||||
'link_class' => '',
|
|
||||||
'alt' => '',
|
|
||||||
'prefix' => '',
|
|
||||||
'suffix' => '',
|
|
||||||
'target' => '',
|
|
||||||
'help' => '',
|
|
||||||
'trim' => 0,
|
|
||||||
'max_length' => '',
|
|
||||||
'word_boundary' => 1,
|
|
||||||
'ellipsis' => 1,
|
|
||||||
'html' => 0,
|
|
||||||
'strip_tags' => 0,
|
|
||||||
),
|
|
||||||
'empty' => '',
|
|
||||||
'hide_empty' => 0,
|
|
||||||
'empty_zero' => 0,
|
|
||||||
'set_precision' => 0,
|
|
||||||
'precision' => '0',
|
|
||||||
'decimal' => '.',
|
|
||||||
'separator' => ',',
|
|
||||||
'prefix' => '',
|
|
||||||
'suffix' => '',
|
|
||||||
'format' => 'uc_price',
|
|
||||||
'revision' => 'themed',
|
|
||||||
'exclude' => 0,
|
|
||||||
'id' => 'sell_price',
|
|
||||||
'table' => 'uc_products',
|
|
||||||
'field' => 'sell_price',
|
|
||||||
'relationship' => 'none',
|
|
||||||
),
|
|
||||||
'ordering' => array(
|
|
||||||
'label' => 'List position',
|
|
||||||
'alter' => array(
|
|
||||||
'alter_text' => 0,
|
|
||||||
'text' => '',
|
|
||||||
'make_link' => 0,
|
|
||||||
'path' => '',
|
|
||||||
'link_class' => '',
|
|
||||||
'alt' => '',
|
|
||||||
'prefix' => '',
|
|
||||||
'suffix' => '',
|
|
||||||
'target' => '',
|
|
||||||
'help' => '',
|
|
||||||
'trim' => 0,
|
|
||||||
'max_length' => '',
|
|
||||||
'word_boundary' => 1,
|
|
||||||
'ellipsis' => 1,
|
|
||||||
'html' => 0,
|
|
||||||
'strip_tags' => 0,
|
|
||||||
),
|
|
||||||
'empty' => '',
|
|
||||||
'hide_empty' => 0,
|
|
||||||
'empty_zero' => 0,
|
|
||||||
'set_precision' => FALSE,
|
|
||||||
'precision' => 0,
|
|
||||||
'decimal' => '.',
|
|
||||||
'separator' => ',',
|
|
||||||
'prefix' => '',
|
|
||||||
'suffix' => '',
|
|
||||||
'exclude' => 0,
|
|
||||||
'id' => 'ordering',
|
|
||||||
'table' => 'uc_products',
|
|
||||||
'field' => 'ordering',
|
|
||||||
'relationship' => 'none',
|
|
||||||
),
|
|
||||||
));
|
|
||||||
$handler->override_option('sorts', array(
|
|
||||||
'ordering' => array(
|
|
||||||
'order' => 'ASC',
|
|
||||||
'id' => 'ordering',
|
|
||||||
'table' => 'uc_products',
|
|
||||||
'field' => 'ordering',
|
|
||||||
'relationship' => 'none',
|
|
||||||
),
|
|
||||||
));
|
|
||||||
$handler->override_option('filters', array(
|
|
||||||
'is_product' => array(
|
|
||||||
'operator' => '=',
|
|
||||||
'value' => '1',
|
|
||||||
'group' => '0',
|
|
||||||
'exposed' => FALSE,
|
|
||||||
'expose' => array(
|
|
||||||
'operator' => FALSE,
|
|
||||||
'label' => '',
|
|
||||||
),
|
|
||||||
'id' => 'is_product',
|
|
||||||
'table' => 'uc_products',
|
|
||||||
'field' => 'is_product',
|
|
||||||
'relationship' => 'none',
|
|
||||||
),
|
|
||||||
'status' => array(
|
|
||||||
'operator' => '=',
|
|
||||||
'value' => '1',
|
|
||||||
'group' => '0',
|
|
||||||
'exposed' => FALSE,
|
|
||||||
'expose' => array(
|
|
||||||
'operator' => FALSE,
|
|
||||||
'label' => '',
|
|
||||||
),
|
|
||||||
'id' => 'status',
|
|
||||||
'table' => 'node',
|
|
||||||
'field' => 'status',
|
|
||||||
'relationship' => 'none',
|
|
||||||
),
|
|
||||||
'tid' => array(
|
|
||||||
'operator' => 'or',
|
|
||||||
'value' => array(),
|
|
||||||
'group' => '0',
|
|
||||||
'exposed' => TRUE,
|
|
||||||
'expose' => array(
|
|
||||||
'use_operator' => 0,
|
|
||||||
'operator' => 'tid_op',
|
|
||||||
'identifier' => 'tid',
|
|
||||||
'label' => 'Taxonomy term',
|
|
||||||
'optional' => 1,
|
|
||||||
'single' => 1,
|
|
||||||
'remember' => 0,
|
|
||||||
'reduce' => 0,
|
|
||||||
),
|
|
||||||
'type' => 'select',
|
|
||||||
'limit' => TRUE,
|
|
||||||
'vid' => variable_get('uc_catalog_vid', 0),
|
|
||||||
'id' => 'tid',
|
|
||||||
'table' => 'term_node',
|
|
||||||
'field' => 'tid',
|
|
||||||
'hierarchy' => 1,
|
|
||||||
'relationship' => 'none',
|
|
||||||
'reduce_duplicates' => 0,
|
|
||||||
),
|
|
||||||
));
|
|
||||||
$handler->override_option('access', array(
|
|
||||||
'type' => 'perm',
|
|
||||||
'perm' => 'administer products',
|
|
||||||
));
|
|
||||||
$handler->override_option('cache', array(
|
|
||||||
'type' => 'none',
|
|
||||||
));
|
|
||||||
$handler->override_option('title', 'Product display order');
|
|
||||||
$handler->override_option('items_per_page', 30);
|
|
||||||
$handler->override_option('use_pager', '1');
|
|
||||||
$handler->override_option('style_plugin', 'draggabletable');
|
|
||||||
$handler->override_option('style_options', array(
|
|
||||||
'override' => 1,
|
|
||||||
'sticky' => 0,
|
|
||||||
'order' => 'asc',
|
|
||||||
'columns' => array(
|
|
||||||
'title' => 'title',
|
|
||||||
'sell_price' => 'sell_price',
|
|
||||||
'ordering' => 'ordering',
|
|
||||||
),
|
|
||||||
'info' => array(
|
|
||||||
'title' => array(
|
|
||||||
'sortable' => 0,
|
|
||||||
'separator' => '',
|
|
||||||
),
|
|
||||||
'sell_price' => array(
|
|
||||||
'sortable' => 0,
|
|
||||||
'separator' => '',
|
|
||||||
),
|
|
||||||
'ordering' => array(
|
|
||||||
'separator' => '',
|
|
||||||
),
|
|
||||||
),
|
|
||||||
'default' => -1,
|
|
||||||
'tabledrag_order' => array(
|
|
||||||
'field' => 'ordering',
|
|
||||||
'handler' => 'ubercart',
|
|
||||||
),
|
|
||||||
'tabledrag_order_visible' => array(
|
|
||||||
'visible' => 0,
|
|
||||||
),
|
|
||||||
'tabledrag_hierarchy' => array(
|
|
||||||
'field' => 'none',
|
|
||||||
'handler' => 'native',
|
|
||||||
),
|
|
||||||
'tabledrag_hierarchy_visible' => array(
|
|
||||||
'visible' => 0,
|
|
||||||
),
|
|
||||||
'draggableviews_depth_limit' => '0',
|
|
||||||
'draggableviews_repair' => array(
|
|
||||||
'repair' => 0,
|
|
||||||
),
|
|
||||||
'tabledrag_types_add' => 'Add type',
|
|
||||||
'tabledrag_expand' => array(
|
|
||||||
'expand_links' => 0,
|
|
||||||
'collapsed' => 0,
|
|
||||||
'by_uid' => 0,
|
|
||||||
),
|
|
||||||
'draggableviews_extensions' => array(
|
|
||||||
'extension_top' => '3',
|
|
||||||
'extension_bottom' => '3',
|
|
||||||
),
|
|
||||||
'tabledrag_lock' => array(
|
|
||||||
'lock' => 0,
|
|
||||||
),
|
|
||||||
'draggableviews_default_on_top' => '1',
|
|
||||||
'draggableviews_button_text' => 'Save order',
|
|
||||||
'draggableviews_arguments' => array(
|
|
||||||
'use_args' => 0,
|
|
||||||
),
|
|
||||||
));
|
|
||||||
$handler = $view->new_display('page', 'Page', 'page_1');
|
|
||||||
$handler->override_option('path', 'admin/store/products/order');
|
|
||||||
$handler->override_option('menu', array(
|
|
||||||
'type' => 'none',
|
|
||||||
'title' => '',
|
|
||||||
'description' => '',
|
|
||||||
'weight' => 0,
|
|
||||||
'name' => 'navigation',
|
|
||||||
));
|
|
||||||
$handler->override_option('tab_options', array(
|
|
||||||
'type' => 'none',
|
|
||||||
'title' => '',
|
|
||||||
'description' => '',
|
|
||||||
'weight' => 0,
|
|
||||||
'name' => 'navigation',
|
|
||||||
));
|
|
||||||
|
|
||||||
$views[$view->name] = $view;
|
|
||||||
}
|
|
||||||
|
|
||||||
return $views;
|
return $views;
|
||||||
}
|
}
|
@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
// $Id: uc_views_handler_field_cart_user.inc,v 1.1 2009/03/25 11:12:37 madsph Exp $
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Field handler to provide simple renderer that allows linking to a user from a cart id.
|
* Field handler to provide simple renderer that allows linking to a user from a cart id.
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
// $Id: uc_views_handler_field_conditional_addtocart.inc,v 1.1 2009/04/17 07:50:06 madsph Exp $
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @file
|
* @file
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
// $Id: uc_views_handler_field_conditional_buyitnow.inc,v 1.2 2009/04/17 07:50:06 madsph Exp $
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @file
|
* @file
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
// $Id: uc_views_handler_field_country.inc,v 1.1 2009/03/23 09:26:49 madsph Exp $
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @file
|
* @file
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
// $Id: uc_views_handler_field_money_amount.inc,v 1.1.2.3 2009/12/17 21:01:15 hanoii Exp $
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @file
|
* @file
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
// $Id: uc_views_handler_field_order_actions.inc,v 1.1.2.1.2.1 2010/11/18 02:18:28 longwave Exp $
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @file
|
* @file
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
// $Id: uc_views_handler_field_order_cc_data.inc,v 1.1.2.1 2010/01/12 15:17:29 hanoii Exp $
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @file
|
* @file
|
||||||
@ -12,16 +13,7 @@ class uc_views_handler_field_order_cc_data extends views_handler_field {
|
|||||||
$crypt = new uc_encryption_class;
|
$crypt = new uc_encryption_class;
|
||||||
$data = unserialize($values->{$this->field_alias});
|
$data = unserialize($values->{$this->field_alias});
|
||||||
$cc_data = $data['cc_data'];
|
$cc_data = $data['cc_data'];
|
||||||
|
$cc_data = unserialize($crypt->decrypt($key, $cc_data));
|
||||||
// In recent ubercart versions, they base64_encode() the payment details
|
|
||||||
// before encrypting. We can detect encoded data by the lack of colons,
|
|
||||||
// due to base64's limited character set.
|
|
||||||
// see uc_credit_cache()
|
|
||||||
$decrypted_data = $crypt->decrypt($key, $cc_data);
|
|
||||||
if (strpos($decrypted_data, ':') === FALSE) {
|
|
||||||
$decrypted_data = base64_decode($decrypted_data);
|
|
||||||
}
|
|
||||||
$cc_data = unserialize($decrypted_data);
|
|
||||||
|
|
||||||
return $cc_data[$this->definition['cc field']];
|
return $cc_data[$this->definition['cc field']];
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
// $Id: uc_views_handler_field_order_cost.inc,v 1.1.2.1 2010/01/12 15:17:29 hanoii Exp $
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @file
|
* @file
|
||||||
@ -19,7 +20,7 @@ class uc_views_handler_field_order_cost extends uc_views_handler_field_money_amo
|
|||||||
|
|
||||||
function render($values) {
|
function render($values) {
|
||||||
$this->field_alias = 'order_cost';
|
$this->field_alias = 'order_cost';
|
||||||
$cost = db_result(db_query("SELECT SUM(qty * cost) FROM {uc_order_products} WHERE order_id = %d", $values->{$this->aliases['order_id']}));
|
$cost = db_result(db_query("SELECT SUM(cost) FROM {uc_order_products} WHERE order_id = %d", $values->{$this->aliases['order_id']}));
|
||||||
$values->{$this->field_alias} = $cost;
|
$values->{$this->field_alias} = $cost;
|
||||||
return parent::render($values);
|
return parent::render($values);
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
// $Id: uc_views_handler_field_order_fullname.inc,v 1.1.2.1 2010/02/27 00:14:24 hanoii Exp $
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @file
|
* @file
|
||||||
@ -38,8 +39,8 @@ class uc_views_handler_field_order_fullname extends views_handler_field {
|
|||||||
|
|
||||||
function render($values) {
|
function render($values) {
|
||||||
$prefix = $this->definition['prefix'];
|
$prefix = $this->definition['prefix'];
|
||||||
$first = check_plain($values->{$this->aliases[$prefix . '_first_name']});
|
$first = $values->{$this->aliases[$prefix . '_first_name']};
|
||||||
$last = check_plain($values->{$this->aliases[$prefix . '_last_name']});
|
$last = $values->{$this->aliases[$prefix . '_last_name']};
|
||||||
switch ($this->options['format']) {
|
switch ($this->options['format']) {
|
||||||
case 'last_first':
|
case 'last_first':
|
||||||
return "$last $first";
|
return "$last $first";
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
// $Id: uc_views_handler_field_order_id.inc,v 1.1.4.2 2010/12/15 02:16:37 longwave Exp $
|
||||||
/**
|
/**
|
||||||
* @file
|
* @file
|
||||||
* Contains the basic 'order' field handler.
|
* Contains the basic 'order' field handler.
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
// $Id: uc_views_handler_field_order_status.inc,v 1.1.2.2 2009/07/01 05:27:21 madsph Exp $
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @file
|
* @file
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
// $Id: uc_views_handler_field_order_weight.inc,v 1.1.2.1 2010/12/22 17:18:02 hanoii Exp $
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @file
|
* @file
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
// $Id: uc_views_handler_field_zone.inc,v 1.1 2009/03/24 09:43:50 madsph Exp $
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @file
|
* @file
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
// $Id: uc_views_handler_filter_cart_current.inc,v 1.1.2.1 2010/11/18 17:31:43 longwave Exp $
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Filter handler for the current cart.
|
* Filter handler for the current cart.
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
// $Id: uc_views_handler_filter_country.inc,v 1.2 2009/03/24 09:43:50 madsph Exp $
|
||||||
/**
|
/**
|
||||||
* Filter by country code
|
* Filter by country code
|
||||||
*/
|
*/
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
// $Id: uc_views_handler_filter_payment_method.inc,v 1.1.2.1 2009/11/02 12:06:14 madsph Exp $
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @file
|
* @file
|
||||||
@ -24,12 +25,16 @@ class uc_views_handler_filter_payment_method extends views_handler_filter_in_ope
|
|||||||
*returns an array of DISTINCT payment methods from the uc_oders table
|
*returns an array of DISTINCT payment methods from the uc_oders table
|
||||||
*/
|
*/
|
||||||
function _distinct_payment_methods() {
|
function _distinct_payment_methods() {
|
||||||
$methods = array();
|
|
||||||
|
|
||||||
$result = db_query("SELECT DISTINCT payment_method AS payment_methods FROM {uc_orders}");
|
$methods = array();
|
||||||
while ($pm = db_fetch_object($result)) {
|
|
||||||
$methods[$pm->payment_methods] = $pm->payment_methods;
|
$result = db_query("SELECT DISTINCT payment_method AS payment_methods FROM {uc_orders}");
|
||||||
}
|
while($pm = db_fetch_object($result)) {
|
||||||
|
|
||||||
|
$methods[$pm->payment_methods] = $pm->payment_methods;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return $methods;
|
||||||
|
|
||||||
return $methods;
|
|
||||||
}
|
}
|
@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
// $Id: uc_views_handler_filter_zone.inc,v 1.1 2009/03/24 09:43:50 madsph Exp $
|
||||||
/**
|
/**
|
||||||
* Filter by zone code
|
* Filter by zone code
|
||||||
*/
|
*/
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
// $Id: views_handler_filter_order_status.inc,v 1.1 2009/03/09 09:36:12 madsph Exp $
|
||||||
/**
|
/**
|
||||||
* Filter by order status
|
* Filter by order status
|
||||||
* Thank you river_t for the Patch!
|
* Thank you river_t for the Patch!
|
||||||
|
Reference in New Issue
Block a user